-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwake.jl
More file actions
37 lines (32 loc) · 928 Bytes
/
wake.jl
File metadata and controls
37 lines (32 loc) · 928 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
"""
frozen_wake(body_aero::BodyAerodynamics, va_distribution)
Update the filaments of the panels with frozen wake model.
Replaces older filaments if present by checking length of filaments.
# Arguments
- `body_aero`::BodyAerodynamics: see: [BodyAerodynamics](@ref)
- `va_distribution::Matrix{Float64}`: Array of velocity vectors at each panel
# Returns
- nothing
"""
function frozen_wake!(body_aero::BodyAerodynamics, va_distribution)
for (i, panel) in enumerate(body_aero.panels)
va_i = va_distribution[i, :]
vel_mag = norm(va_i)
direction = va_i / vel_mag
reinit!(
panel.filaments[4],
panel.TE_point_1,
direction,
vel_mag,
1
)
reinit!(
panel.filaments[5],
panel.TE_point_2,
direction,
vel_mag,
-1
)
end
return nothing
end