-
-
Notifications
You must be signed in to change notification settings - Fork 238
Closed
Labels
AerodynamicsAny problem to be worked on top of RocketPy's AerodynamicAny problem to be worked on top of RocketPy's AerodynamicBugSomething isn't workingSomething isn't working
Description
Use case
Try to add fins to a rocket object using the airfoil option:
FinSet = TestRocket.addFins(
n=3,
rootChord=0.077,
tipChord=47/1000,
span=0.104,
distanceToCM=-0.99586,
airfoil='NACA0012_Cl.csv'
)Contents of 'NACA0012_Cl.csv' are:
0, 6.86E-09
0.200712864, 1.05E+00
1.560796326, 0.0Expected result
Fins are added properly with no errors or warnings.
What happens instead
RuntimeWarning: divide by zero encountered in double_scalars FD = 2 * np.pi * AR / (cn *np.cos(gamac))
RuntimeWarning: invalid value encountered in double_scalars Cnalfa1 = cn * FD * (Af/self.area) * np.cos(gamac) / (2 + FD * ( 1 + (4/FD**2) )**0.5)
Furthermore, the resulting cldata created has a nan (not a number) everywhere a zero is expected.
[[0.00000000e+00 5.18408620e-09]
[2.00712864e-01 7.19089724e-01]
[1.56079633e+00 nan]]I believe the error from originates from calling cnalfa1 with cn=0.0 in line 610 of the Rocket.py file.
Applies to versions:
Master branch only, no releases yet.
Metadata
Metadata
Assignees
Labels
AerodynamicsAny problem to be worked on top of RocketPy's AerodynamicAny problem to be worked on top of RocketPy's AerodynamicBugSomething isn't workingSomething isn't working