Skip to content

Commit 64e69b9

Browse files
committed
adds more forceful deprecationwarning
1 parent efd7e46 commit 64e69b9

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

aerosandbox/geometry/airfoil/default_airfoil_aerodynamics.py

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,18 @@
22
import warnings
33
from aerosandbox.library.aerodynamics.viscous import Cf_flat_plate
44

5-
65
warnings.warn(
7-
"This file is deprecated.\n"
6+
"This file is deprecated and will be removed in the subsequent version of ASB.\n"
87
"You can use `asb.Airfoil.get_aero_from_neuralfoil()` instead\n"
98
"to get airfoil aerodynamics for any airfoil.",
109
DeprecationWarning
1110
)
1211

13-
def print_default_warning():
14-
warnings.warn("\n".join([
15-
"Warning: Using a placeholder aerodynamics model for this Airfoil!",
16-
"It's highly recommended that you either:",
17-
"\ta) Specify polar functions in the Airfoil constructor, or",
18-
"\tb) Call Airfoil.generate_polars() to auto-generate these polar functions with XFoil."
19-
]), stacklevel=3)
20-
2112

2213
def default_CL_function(alpha, Re, mach=0, deflection=0):
2314
"""
2415
Lift coefficient.
2516
"""
26-
print_default_warning()
2717
Cl_inc = np.pi * np.sind(2 * alpha)
2818
beta = (1 - mach) ** 2
2919

@@ -35,7 +25,6 @@ def default_CD_function(alpha, Re, mach=0, deflection=0):
3525
"""
3626
Drag coefficient.
3727
"""
38-
print_default_warning()
3928
Cf = Cf_flat_plate(Re_L=Re, method="hybrid-sharpe-convex")
4029

4130
### Form factor model from Raymer, "Aircraft Design". Section 12.5, Eq. 12.30
@@ -55,5 +44,4 @@ def default_CM_function(alpha, Re, mach=0, deflection=0):
5544
"""
5645
Pitching moment coefficient, as measured about quarter-chord.
5746
"""
58-
print_default_warning()
5947
return np.zeros_like(alpha)

0 commit comments

Comments
 (0)