Skip to content

Commit 696d631

Browse files
committed
enh:airfoilInfo
1 parent ff8ae3d commit 696d631

File tree

1 file changed

+23
-14
lines changed

1 file changed

+23
-14
lines changed

rocketpy/AeroSurfaces.py

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -382,13 +382,13 @@ def evaluateLiftCoefficient(self):
382382
else:
383383
# Defines clalpha2D as the derivative of the
384384
# lift coefficient curve for a specific airfoil
385-
airfoilCl = Function(
385+
self.airfoilCl = Function(
386386
self.airfoil[0],
387387
interpolation="linear",
388388
)
389389

390390
# Differentiating at x = 0 to get cl_alpha
391-
clalpha2D_Mach0 = airfoilCl.differentiate(x=1e-3, dx=1e-3)
391+
clalpha2D_Mach0 = self.airfoilCl.differentiate(x=1e-3, dx=1e-3)
392392

393393
# Convert to radians if needed
394394
if self.airfoil[1] == "degrees":
@@ -633,23 +633,31 @@ def rollInfo(self):
633633
self.rollForcingInterferenceFactor
634634
)
635635
)
636-
# TODO: lacks a title for the plot
636+
# lacks a title for the plot
637637
self.rollParameters[0]()
638-
# TODO: lacks a title for the plot
638+
# lacks a title for the plot
639639
self.rollParameters[1]()
640640

641641
return None
642642

643-
def airfoilPlots(self):
643+
def airfoilInfo(self):
644+
"""Prints out airfoil related information of the
645+
fin set.
646+
647+
Parameters
648+
----------
649+
None
650+
651+
Return
652+
------
653+
None
654+
"""
644655
if self.airfoil is not None:
645-
airfoilCl = Function(
646-
self.airfoil[0],
647-
inputs="angle of attack",
648-
outputs="lift coefficient",
649-
interpolation="linear",
650-
extrapolation=None,
651-
)
652-
airfoilCl.plot1D()
656+
print("\n\nAerodynamic Information\n")
657+
print("Airfoil's Lift Curve as a Function of Alpha ({}))".format(self.airfoil[1]))
658+
self.airfoilCl.plot1D()
659+
660+
return None
653661

654662
def allInfo(self):
655663
"""Prints out all data and graphs available about the Rocket.
@@ -675,7 +683,7 @@ def allInfo(self):
675683
self.geometricalInfo()
676684
self.aerodynamicInfo()
677685
self.rollInfo()
678-
self.airfoilPlots()
686+
self.airfoilInfo()
679687

680688
return None
681689

@@ -1479,6 +1487,7 @@ def geometricInfo(self):
14791487
return None
14801488

14811489
def aerodynamicInfo(self):
1490+
14821491
print(f"\nTail name: {self.name}")
14831492
print(f"Tail Center of Pressure Position in Local Coordinates: {self.cp} m")
14841493
print(f"Tail Lift Coefficient Slope: {self.clalpha:.3f} 1/rad")

0 commit comments

Comments
 (0)