2
2
import warnings
3
3
from aerosandbox .library .aerodynamics .viscous import Cf_flat_plate
4
4
5
-
6
5
warnings .warn (
7
- "This file is deprecated.\n "
6
+ "This file is deprecated and will be removed in the subsequent version of ASB .\n "
8
7
"You can use `asb.Airfoil.get_aero_from_neuralfoil()` instead\n "
9
8
"to get airfoil aerodynamics for any airfoil." ,
10
9
DeprecationWarning
11
10
)
12
11
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
- "\t a) Specify polar functions in the Airfoil constructor, or" ,
18
- "\t b) Call Airfoil.generate_polars() to auto-generate these polar functions with XFoil."
19
- ]), stacklevel = 3 )
20
-
21
12
22
13
def default_CL_function (alpha , Re , mach = 0 , deflection = 0 ):
23
14
"""
24
15
Lift coefficient.
25
16
"""
26
- print_default_warning ()
27
17
Cl_inc = np .pi * np .sind (2 * alpha )
28
18
beta = (1 - mach ) ** 2
29
19
@@ -35,7 +25,6 @@ def default_CD_function(alpha, Re, mach=0, deflection=0):
35
25
"""
36
26
Drag coefficient.
37
27
"""
38
- print_default_warning ()
39
28
Cf = Cf_flat_plate (Re_L = Re , method = "hybrid-sharpe-convex" )
40
29
41
30
### 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):
55
44
"""
56
45
Pitching moment coefficient, as measured about quarter-chord.
57
46
"""
58
- print_default_warning ()
59
47
return np .zeros_like (alpha )
0 commit comments