Skip to content

Commit cf31ffc

Browse files
committed
add moment test
1 parent 82be7f2 commit cf31ffc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/test_body_aerodynamics.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ include("utils.jl")
4646
aerodynamic_model_type=model,
4747
core_radius_fraction=core_radius_fraction
4848
)
49-
results_NEW = solve(solver_object, body_aero)
49+
results_NEW = solve(solver_object, body_aero; reference_point=[0,1,0])
5050

5151
@test results_NEW isa Dict
5252

@@ -98,6 +98,9 @@ include("utils.jl")
9898
@test isapprox(results_NEW["cs"], CS_ref, rtol=1e-4)
9999
@test isapprox(results_NEW["lift"], Ltot_ref, rtol=1e-4)
100100
@test isapprox(results_NEW["drag"], Dtot_ref, rtol=1e-4)
101+
@test isapprox(results_NEW["Fx"], results_NEW["Mz"], rtol=1e-4) # 1 meter arm
102+
@test isapprox(results_NEW["My"], 0.0, atol=1e-3)
103+
@test isapprox(results_NEW["Fz"], -results_NEW["Mx"], rtol=1e-4) # 1 meter arm
101104

102105
# Check array shapes
103106
@test length(results_NEW["cl_distribution"]) == length(body_aero.panels)

0 commit comments

Comments
 (0)