@@ -10,7 +10,7 @@ function form_factor(wing :: HalfWing, M)
10
10
Kf = form_factor_wing .(xcs, tcs, sweeps, M)
11
11
end
12
12
13
- form_factor (wing :: Wing , M) = ( form_factor (wing. left, M) + form_factor (wing. right, M)) / 2
13
+ form_factor (wing :: Wing , M) = [ form_factor (wing. left, M); form_factor (wing. right, M) ]
14
14
15
15
# Schlichting averaged skin-friction coefficients
16
16
cf_lam (Re_c, k_lam = 1. ) = 1.328 / √ (Re_c * k_lam)
@@ -33,14 +33,16 @@ function wetted_area_drag(mean_chords, S_wets, K_fs, x_tr, V, ρ, M, μ)
33
33
34
34
# Profile drag
35
35
Dp_by_q = sum (@. cfs * S_wets * K_fs)
36
+
37
+ return Dp_by_q
36
38
end
37
39
38
- function wetted_area_drag (wing :: HalfWing , x_tr, V, ρ, a_ref = 330. , μ = 1.5e-5 )
40
+ function wetted_area_drag (wing :: AbstractWing , x_tr, V, ρ, a_ref, μ)
39
41
# Chord processing
40
42
mean_chords = (forward_sum ∘ chords)(wing) / 2
41
43
42
44
# Wetted areas
43
- S_wets = @. mean_chords * wing . spans / cos (wing . dihedrals)
45
+ S_wets = mean_chords .* spans (wing) . / cos .( dihedrals (wing) )
44
46
45
47
# Form factors
46
48
M = V / a_ref
@@ -49,20 +51,7 @@ function wetted_area_drag(wing :: HalfWing, x_tr, V, ρ, a_ref = 330., μ = 1.5e
49
51
wetted_area_drag (mean_chords, S_wets, K_fs, x_tr, V, ρ, M, μ)
50
52
end
51
53
52
- function wetted_area_drag (wing :: WingMesh , x_tr, V, ρ, a_ref = 330. , μ = 1.5e-5 )
53
- # Chord processing
54
- mean_chords = (forward_sum ∘ chords)(wing. surface) / 2
55
-
56
- # Wetted areas
57
- surf_pans = camber_panels (wing)
58
- S_wets = sum (panel_area, surf_pans, dims = 1 )
59
-
60
- # Form factors
61
- M = V / a_ref
62
- K_fs = form_factor (wing. surface, M)
63
-
64
- wetted_area_drag (mean_chords, S_wets, K_fs, x_tr, V, ρ, M, μ)
65
- end
54
+ wetted_area_drag (wing :: WingMesh , x_tr, V, ρ, a_ref, μ) = wetted_area_drag (wing. surface, x_tr, V, ρ, a_ref, μ)
66
55
67
56
# Sato's local-friction and local-dissipation based on power balance method from Mark Drela, Flight Vehicle Aerodynamics, eq. 4.115.
68
57
function local_dissipation_drag (wing :: Wing , wetted_areas, ρ_es, u_es, x_tr, V, ρ, M, μ)
@@ -79,8 +68,10 @@ function local_dissipation_drag(wing :: WingMesh, ρ_es, u_es, x_tr, V, ρ, M,
79
68
# Chord processing
80
69
mean_chords = (forward_sum ∘ chords)(wing. surface) / 2
81
70
82
- # Compute weighted wetted areas based on inviscid edge velocity distribution .
71
+ # Compute wetted area of camber (for now) .
83
72
S_wets = panel_area .(camber_panels (wing))
73
+
74
+ # Calculate weighted wetted areas based on inviscid edge velocity distribution.
84
75
weighted_S_wets = sum (@. ρ_es * u_es^ 3 * S_wets; dims = 1 ) ./ (ρ * V^ 3 )
85
76
86
77
wetted_area_drag (mean_chords, weighted_S_wets, 1. , x_tr, V, ρ, M, μ)
@@ -91,18 +82,26 @@ abstract type AbstractProfileDrag end
91
82
struct FormFactor <: AbstractProfileDrag end
92
83
struct Dissipation <: AbstractProfileDrag end
93
84
94
- profile_drag_coefficient (wing :: HalfWing , x_tr, V, rho_ref, a_ref, area_ref, μ) = wetted_area_drag (wing, x_tr, V, rho_ref, a_ref, μ) / area_ref
95
- profile_drag_coefficient (wing :: WingMesh , x_tr, V, rho_ref, a_ref, area_ref, μ) = wetted_area_drag (wing, x_tr, V, rho_ref, a_ref, μ) / area_ref
96
- profile_drag_coefficient (wing :: Wing , x_tr, V, rho_ref, a_ref, area_ref, μ) = profile_drag_coefficient (wing. left, x_tr, V, rho_ref, a_ref, area_ref, μ) + profile_drag_coefficient (wing. right, x_tr, V, rho_ref, a_ref, area_ref, μ)
85
+ profile_drag_coefficient (wing :: AbstractWing , x_tr, V, rho_ref, a_ref, area_ref, μ) = wetted_area_drag (wing, x_tr, V, rho_ref, a_ref, μ) / area_ref
86
+
87
+ """
88
+ profile_drag_coefficient(wing :: AbstractWing, x_tr, refs :: References)
97
89
90
+ Estimate the profile drag coefficient of a `Wing`` using the **wetted-area method** based on Schlichting's skin-friction coefficient formula.
91
+ """
98
92
profile_drag_coefficient (wing :: AbstractWing , x_tr, refs :: References ) = profile_drag_coefficient (wing, x_tr, refs. speed, refs. density, refs. sound_speed, refs. area, refs. viscosity)
99
93
100
94
profile_drag_coefficient (wing :: AbstractWing , x_tr, edge_speeds, panels, refs :: References ) = local_dissipation_drag (wing, panel_area .(panels), refs. density, edge_speeds, x_tr, refs. speed, refs. density, mach_number (refs), refs. viscosity) / refs. area
101
95
96
+ """
97
+ profile_drag_coefficient(wing :: WingMesh, x_tr, edge_speeds, panels, refs :: References)
98
+
99
+ Estimate the profile drag coefficient of a `Wing` using the **local-friction and local-dissipation method** based on Schlichting's skin-friction coefficient formula.
100
+ """
102
101
profile_drag_coefficient (wing :: WingMesh , x_tr, edge_speeds, refs :: References ) = local_dissipation_drag (wing, refs. density, edge_speeds, x_tr, refs. speed, refs. density, mach_number (refs), refs. viscosity) / refs. area
103
102
104
103
function wave_drag (M, Λ, t_by_c, Cl, κ_A)
105
104
M_drag_divergence = κ_A / cos (Λ) - t_by_c / cos (Λ)^ 2 - Cl / (10 * cos (Λ)^ 3 ) # Drag divergence Mach number
106
- M_crit = M_drag_divergnece - (0.1 / 80 )^ (1 / 3 ) # Critical Mach number
105
+ M_crit = M_drag_divergence - (0.1 / 80 )^ (1 / 3 ) # Critical Mach number
107
106
CD_wave = ifelse (M > M_crit, 20 * (Mach - M_crit)^ 4 , 0. )
108
107
end
0 commit comments