Skip to content
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
Manifest.toml
.vscode/settings.json
venv
results/TUDELFT_V3_LEI_KITE/polars/$C_L$ vs $C_D$.pdf
*.bin
results/TUDELFT_V3_LEI_KITE/polars/tutorial_testing_stall_model_n_panels_54_distribution_split_provided.pdf
docs/build/

5 changes: 5 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,19 @@ BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
Colors = "5ae59095-9a9b-59fe-a467-6f913c188581"
ControlPlots = "23c2ee80-7a9e-4350-b264-8e670f12517c"
DelimitedFiles = "8bb1440f-4735-579b-a4ab-409b98df4dab"
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
Interpolations = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59"
LaTeXStrings = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
Measures = "442fdcdd-2543-5da2-b0f3-8c86c306513e"
NonlinearSolve = "8913a72c-1f9b-4ce2-8d82-65094dcecaec"
Serialization = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
SharedArrays = "1a1011a3-84de-559e-8e89-a11a2f7dc383"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
Timers = "21f18d07-b854-4dab-86f0-c15a3821819a"
Xfoil = "19641d66-a62d-11e8-2441-8f57a969a9c4"

[compat]
BenchmarkTools = "1"
Expand Down
46 changes: 46 additions & 0 deletions data/HL5_ram_air_kite_foil.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
A
1.0000000 0.0000479
0.9666341 0.0017363
0.9038341 0.0066154
0.8342935 0.0136262
0.7624304 0.0214202
0.6907649 0.0299758
0.6203655 0.0397261
0.5500472 0.0504400
0.4788028 0.0614558
0.4074159 0.0732084
0.3368400 0.0848204
0.2692757 0.0941998
0.2083741 0.0988242
0.1573868 0.0983570
0.1169140 0.0924067
0.0828168 0.0826568
0.0560463 0.0704667
0.0361758 0.0577955
0.0215498 0.0452424
0.0115826 0.0329061
0.0055625 0.0219130
0.0019945 0.0124293
0.0002467 0.0035649
0.0004755 -0.0045913
0.0027675 -0.0130849
0.0077900 -0.0220373
0.0162007 -0.0306320
0.0285895 -0.0396469
0.0466671 -0.0494062
0.0728758 -0.0593274
0.1094090 -0.0681156
0.1556860 -0.0747603
0.2093904 -0.0783204
0.2712652 -0.0798598
0.3359510 -0.0788043
0.4038697 -0.0747532
0.4742506 -0.0687364
0.5453696 -0.0615892
0.6158254 -0.0528273
0.6875958 -0.0427482
0.7594140 -0.0320344
0.8304601 -0.0220930
0.9008044 -0.0130373
0.9663063 -0.0044401
1.0000000 0.0000479
37 changes: 10 additions & 27 deletions examples/ram_air_kite.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,7 @@ using DataFrames
using LinearAlgebra

# Create wing geometry
wing = KiteWing("data/HL5_ram_air_kite_body.obj")

alphas = deg2rad.(-10:1:25) # Range of angles from -10 to 25 degrees
polars = zeros(length(alphas), 4) # Matrix for [alpha, CD, CL, CM]
for (i, alpha) in enumerate(alphas)
# Simplified aerodynamic coefficients
cd = 0.015 + 0.015 * abs(alpha/10)^1.5 # Drag increases with angle
cl = 5.0 * alpha + 0.01 * alpha^2 * exp(-alpha/20) # Lift with stall behavior
cm = -0.02 * alpha # Linear pitching moment

polars[i, :] .= [alpha, cd, cl, cm]
end

for gamma in range(wing.gamma_tip - wing.gamma_tip/10, -wing.gamma_tip + wing.gamma_tip/10, 20)
add_section!(wing, gamma, ("polar_data", polars))
end
wing = KiteWing("data/HL5_ram_air_kite_body.obj", "data/HL5_ram_air_kite_foil.dat")
wing_aero = WingAerodynamics([wing])

# Create solvers
Expand Down Expand Up @@ -59,34 +44,32 @@ plot_geometry(

# Solving and plotting distributions
@time results = solve(VSM, wing_aero)
@time results_with_stall = solve(VSM_with_stall_correction, wing_aero)
@time results = solve(VSM, wing_aero)

CAD_y_coordinates = [panel.aerodynamic_center[2] for panel in wing_aero.panels]

plot_distribution(
[CAD_y_coordinates, CAD_y_coordinates],
[results, results_with_stall],
["VSM", "VSM with stall correction"];
[CAD_y_coordinates],
[results],
["VSM"];
title="CAD_spanwise_distributions_alpha_$(round(aoa, digits=1))_beta_$(round(side_slip, digits=1))_yaw_$(round(yaw_rate, digits=1))_v_a_$(round(v_a, digits=1))",
data_type=".pdf",
is_save=false,
is_show=true
)

plot_polars(
[VSM, VSM_with_stall_correction],
[wing_aero, wing_aero],
[VSM],
[wing_aero],
[
"VSM CAD 19ribs",
"VSM CAD 19ribs , with stall correction",
"VSM from Ram Air Kite OBJ and DAT file",
];
angle_range=range(0, 25, length=25),
angle_range=range(0, 20, length=20),
angle_type="angle_of_attack",
angle_of_attack=0,
side_slip=0,
yaw_rate=0,
v_a=10,
title="tutorial_testing_stall_model_n_panels_$(wing.n_panels)_distribution_$(wing.spanwise_panel_distribution)",
title="ram_kite_panels_$(wing.n_panels)_distribution_$(wing.spanwise_panel_distribution)",
data_type=".pdf",
is_save=false,
is_show=true
Expand Down
1 change: 0 additions & 1 deletion examples/stall_model.jl
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ plot_polars(
angle_type="angle_of_attack",
angle_of_attack=0,
side_slip=0,
yaw_rate=0,
v_a=10,
title="tutorial_testing_stall_model_n_panels_$(n_panels)_distribution_$(spanwise_panel_distribution)",
data_type=".pdf",
Expand Down
Loading
Loading