Skip to content

Commit 62368ea

Browse files
committed
test second plot
1 parent 02eb456 commit 62368ea

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

test/test_plotting.jl

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ using VortexStepMethod
22
using ControlPlots
33
using Test
44

5-
function result_vsm()
5+
function create_wa()
66
# Step 1: Define wing parameters
77
n_panels = 20 # Number of panels
88
span = 20.0 # Wing span [m]
@@ -43,7 +43,7 @@ plt.ioff()
4343
@test isfile("/tmp/plot.pdf")
4444
rm("/tmp/plot.pdf")
4545
show_plot(fig)
46-
wa = result_vsm()
46+
wa = create_wa()
4747
if Sys.islinux()
4848
fig = plot_geometry(
4949
wa,
@@ -61,6 +61,23 @@ plt.ioff()
6161
rm("/tmp/Rectangular_wing_geometry_side_view.pdf")
6262
@test isfile("/tmp/Rectangular_wing_geometry_top_view.pdf")
6363
rm("/tmp/Rectangular_wing_geometry_top_view.pdf")
64+
# Step 5: Initialize the solvers
65+
vsm_solver = Solver(aerodynamic_model_type="VSM")
66+
llt_solver = Solver(aerodynamic_model_type="LLT")
67+
# Step 6: Solve the VSM and LLT
68+
results_vsm = solve(vsm_solver, wa)
69+
results_llt = solve(llt_solver, wa)
70+
# Step 7: Plot spanwise distributions
71+
y_coordinates = [panel.aerodynamic_center[2] for panel in wa.panels]
72+
73+
fig = plot_distribution(
74+
[y_coordinates, y_coordinates],
75+
[results_vsm, results_llt],
76+
["VSM", "LLT"],
77+
title="Spanwise Distributions"
78+
)
79+
@test fig isa plt.PyPlot.Figure
6480
end
6581
end
66-
plt.ion()
82+
plt.ion()
83+
nothing

0 commit comments

Comments
 (0)