diff --git a/rocketpy/AeroSurface.py b/rocketpy/AeroSurface.py index 112742eb7..c1ad19d0d 100644 --- a/rocketpy/AeroSurface.py +++ b/rocketpy/AeroSurface.py @@ -566,24 +566,24 @@ def evaluate_lift_coefficient(self): """ if not self.airfoil: # Defines clalpha2D as 2*pi for planar fins - clalpha2D = Function(lambda mach: 2 * np.pi / self.__beta(mach)) + clalpha2D_incompressible = 2 * np.pi else: - # Defines clalpha2D as the derivative of the - # lift coefficient curve for a specific airfoil + # Defines clalpha2D as the derivative of the lift coefficient curve + # for the specific airfoil self.airfoil_cl = Function( self.airfoil[0], interpolation="linear", ) - # Differentiating at x = 0 to get cl_alpha - clalpha2D_mach0 = self.airfoil_cl.differentiate(x=1e-3, dx=1e-3) + # Differentiating at alpha = 0 to get cl_alpha + clalpha2D_incompressible = self.airfoil_cl.differentiate(x=1e-3, dx=1e-3) # Convert to radians if needed if self.airfoil[1] == "degrees": - clalpha2D_mach0 *= 180 / np.pi + clalpha2D_incompressible *= 180 / np.pi - # Correcting for compressible flow - clalpha2D = Function(lambda mach: clalpha2D_mach0 / self.__beta(mach)) + # Correcting for compressible flow (apply Prandtl-Glauert correction) + clalpha2D = Function(lambda mach: clalpha2D_incompressible / self.__beta(mach)) # Diederich's Planform Correlation Parameter FD = 2 * np.pi * self.AR / (clalpha2D * np.cos(self.gamma_c)) diff --git a/rocketpy/plots/aero_surface_plots.py b/rocketpy/plots/aero_surface_plots.py index 681163239..b051c740f 100644 --- a/rocketpy/plots/aero_surface_plots.py +++ b/rocketpy/plots/aero_surface_plots.py @@ -111,8 +111,9 @@ def airfoil(self): None """ - if self.aero_surface.airfoil: # TODO: see issue #144 - self.aero_surface.airfoil_cl.plot1D() + if self.aero_surface.airfoil: + print("Airfoil lift curve:") + self.aero_surface.airfoil_cl.plot1D(force_data=True) return None def roll(self): @@ -122,7 +123,8 @@ def roll(self): ------- None """ - # lacks a title in the plots + print("Roll parameters:") + # TODO: lacks a title in the plots self.aero_surface.roll_parameters[0]() self.aero_surface.roll_parameters[1]() return None @@ -138,6 +140,7 @@ class for more information on how this plot is made. Also, this method ------- None """ + print("Lift coefficient:") self.aero_surface.cl() self.aero_surface.clalpha_single_fin() self.aero_surface.clalpha_multiple_fins() diff --git a/rocketpy/prints/aero_surface_prints.py b/rocketpy/prints/aero_surface_prints.py index 22d99b141..6d0d6a74d 100644 --- a/rocketpy/prints/aero_surface_prints.py +++ b/rocketpy/prints/aero_surface_prints.py @@ -142,7 +142,12 @@ def airfoil(self): if self.aero_surface.airfoil: print(f"Airfoil information:") print(f"--------------------") - print(f"Hey, this will be implemented later!\n") # TODO: issue #144 + print( + f"Number of points defining the lift curve: {len(self.aero_surface.airfoil_cl.x_array)}" + ) + print( + f"Lift coefficient derivative at Mach 0 and AoA 0: {self.aero_surface.clalpha(0):.5f} 1/rad\n" + ) return None def roll(self): @@ -166,7 +171,7 @@ def roll(self): f"Damping interference factor: {self.aero_surface.roll_damping_interference_factor:.3f} rad" ) print( - "Forcing interference factor: {self.aero_surface.rollForcingInterferenceFactor:.3f} rad\n" + f"Forcing interference factor: {self.aero_surface.roll_forcing_interference_factor:.3f} rad\n" ) return None