|
1 | 1 | using Test |
2 | 2 | using LinearAlgebra |
3 | 3 | using VortexStepMethod |
4 | | -using VortexStepMethod: Wing, Section, add_section!, refine_mesh_by_splitting_provided_sections!, refine_aerodynamic_mesh! |
| 4 | +using VortexStepMethod: Wing, Section, add_section!, refine_mesh_by_splitting_provided_sections!, refine! |
5 | 5 | import Base: == |
6 | 6 |
|
7 | 7 | """ |
|
98 | 98 | add_section!(example_wing, [0.0, 1.0, 0.0], [0.0, 1.0, 0.0], INVISCID) |
99 | 99 | add_section!(example_wing, [0.0, -1.0, 0.0], [0.0, -1.0, 0.0], INVISCID) |
100 | 100 | add_section!(example_wing, [0.0, -1.5, 0.0], [0.0, -1.5, 0.0], INVISCID) |
101 | | - refine_aerodynamic_mesh!(example_wing) |
| 101 | + refine!(example_wing) |
102 | 102 | sections = example_wing.refined_sections |
103 | 103 |
|
104 | 104 | # Test right to left order |
105 | 105 | example_wing_1 = Wing(10) |
106 | 106 | add_section!(example_wing_1, [0.0, -1.5, 0.0], [0.0, -1.5, 0.0], INVISCID) |
107 | 107 | add_section!(example_wing_1, [0.0, -1.0, 0.0], [0.0, -1.0, 0.0], INVISCID) |
108 | 108 | add_section!(example_wing_1, [0.0, 1.0, 0.0], [0.0, 1.0, 0.0], INVISCID) |
109 | | - refine_aerodynamic_mesh!(example_wing_1) |
| 109 | + refine!(example_wing_1) |
110 | 110 | sections_1 = example_wing_1.refined_sections |
111 | 111 |
|
112 | 112 | # Test random order |
113 | 113 | example_wing_2 = Wing(10) |
114 | 114 | add_section!(example_wing_2, [0.0, 1.0, 0.0], [0.0, 1.0, 0.0], INVISCID) |
115 | 115 | add_section!(example_wing_2, [0.0, -1.5, 0.0], [0.0, -1.5, 0.0], INVISCID) |
116 | 116 | add_section!(example_wing_2, [0.0, -1.0, 0.0], [0.0, -1.0, 0.0], INVISCID) |
117 | | - refine_aerodynamic_mesh!(example_wing_2) |
| 117 | + refine!(example_wing_2) |
118 | 118 | sections_2 = example_wing_2.refined_sections |
119 | 119 |
|
120 | 120 | for i in eachindex(sections) |
|
133 | 133 | wing = Wing(n_panels; spanwise_distribution=LINEAR) |
134 | 134 | add_section!(wing, [0.0, span/2, 0.0], [-1.0, span/2, 0.0], INVISCID) |
135 | 135 | add_section!(wing, [0.0, -span/2, 0.0], [-1.0, -span/2, 0.0], INVISCID) |
136 | | - refine_aerodynamic_mesh!(wing) |
| 136 | + refine!(wing) |
137 | 137 | sections = wing.refined_sections |
138 | 138 |
|
139 | 139 | @test length(sections) == wing.n_panels + 1 |
|
149 | 149 | wing = Wing(n_panels; spanwise_distribution=COSINE) |
150 | 150 | add_section!(wing, [0.0, span/2, 0.0], [-1.0, span/2, 0.0], INVISCID) |
151 | 151 | add_section!(wing, [0.0, -span/2, 0.0], [-1.0, -span/2, 0.0], INVISCID) |
152 | | - refine_aerodynamic_mesh!(wing) |
| 152 | + refine!(wing) |
153 | 153 | sections = wing.refined_sections |
154 | 154 |
|
155 | 155 | @test length(sections) == wing.n_panels + 1 |
|
173 | 173 | add_section!(wing, [0.0, span/2, 0.0], [-1.0, span/2, 0.0], INVISCID) |
174 | 174 | add_section!(wing, [0.0, -span/2, 0.0], [-1.0, -span/2, 0.0], INVISCID) |
175 | 175 |
|
176 | | - refine_aerodynamic_mesh!(wing) |
| 176 | + refine!(wing) |
177 | 177 | sections = wing.unrefined_sections |
178 | 178 | @test length(sections) == wing.n_panels + 1 |
179 | 179 | @test sections[1].LE_point ≈ [0.0, span/2, 0.0] |
|
188 | 188 | add_section!(wing, [0.0, span/2, 0.0], [-1.0, span/2, 0.0], INVISCID) |
189 | 189 | add_section!(wing, [0.0, -span/2, 0.0], [-1.0, -span/2, 0.0], INVISCID) |
190 | 190 |
|
191 | | - refine_aerodynamic_mesh!(wing) |
| 191 | + refine!(wing) |
192 | 192 | sections = wing.refined_sections |
193 | 193 | @test length(sections) == wing.n_panels + 1 |
194 | 194 | @test sections[1].LE_point ≈ [0.0, span/2, 0.0] |
|
206 | 206 | add_section!(wing, [0.0, y, 0.0], [-1.0, y, 0.0], INVISCID) |
207 | 207 | end |
208 | 208 |
|
209 | | - refine_aerodynamic_mesh!(wing) |
| 209 | + refine!(wing) |
210 | 210 | sections = wing.refined_sections |
211 | 211 | @test length(sections) == wing.n_panels + 1 |
212 | 212 |
|
|
226 | 226 | add_section!(wing, [0.0, 5.0, 0.0], [-1.0, 5.0, 0.0], INVISCID) |
227 | 227 | add_section!(wing, [0.0, -5.0, 0.0], [-1.0, -5.0, 0.0], INVISCID) |
228 | 228 |
|
229 | | - refine_aerodynamic_mesh!(wing) |
| 229 | + refine!(wing) |
230 | 230 | sections = wing.refined_sections |
231 | 231 |
|
232 | 232 | # Calculate expected quarter-chord points |
|
284 | 284 | add_section!(wing, [0.0, 0.0, 0.0], [-1.0, 0.0, 0.0], LEI_AIRFOIL_BREUKELS, (2.0, 0.5)) |
285 | 285 | add_section!(wing, [0.0, -span/2, 0.0], [-1.0, -span/2, 0.0], LEI_AIRFOIL_BREUKELS, (4.0, 1.0)) |
286 | 286 |
|
287 | | - refine_aerodynamic_mesh!(wing) |
| 287 | + refine!(wing) |
288 | 288 | sections = wing.refined_sections |
289 | 289 | @test length(sections) == wing.n_panels + 1 |
290 | 290 |
|
|
316 | 316 | add_section!(wing, [0.0, -1.0, 0.0], [1.0, -1.0, 0.0], INVISCID) |
317 | 317 | add_section!(wing, [0.0, -2.0, 0.0], [1.0, -2.0, 0.0], INVISCID) |
318 | 318 |
|
319 | | - refine_aerodynamic_mesh!(wing) |
| 319 | + refine!(wing) |
320 | 320 | new_sections = wing.refined_sections |
321 | 321 |
|
322 | 322 | @test length(new_sections) - 1 == 6 |
|
346 | 346 | add_section!(wing, [0.0, 0.0, 0.0], [1.0, 0.0, 0.0], INVISCID) |
347 | 347 | add_section!(wing, [0.0, -span/2, 0.0], [1.0, -span/2, 0.0], INVISCID) |
348 | 348 |
|
349 | | - refine_aerodynamic_mesh!(wing) |
| 349 | + refine!(wing) |
350 | 350 |
|
351 | 351 | @test length(wing.refined_panel_mapping) == n_panels |
352 | 352 |
|
|
391 | 391 | add_section!(wing, [0.0, -span/6, 0.0], [1.0, -span/6, 0.0], INVISCID) |
392 | 392 | add_section!(wing, [0.0, -span/2, 0.0], [1.0, -span/2, 0.0], INVISCID) |
393 | 393 |
|
394 | | - refine_aerodynamic_mesh!(wing) |
| 394 | + refine!(wing) |
395 | 395 |
|
396 | 396 | @test length(wing.refined_panel_mapping) == n_panels |
397 | 397 |
|
|
435 | 435 | add_section!(wing, [0.0, -2.0, 0.0], [1.0, -2.0, 0.0], INVISCID) |
436 | 436 | add_section!(wing, [0.0, -6.0, 0.0], [1.0, -6.0, 0.0], INVISCID) |
437 | 437 |
|
438 | | - refine_aerodynamic_mesh!(wing) |
| 438 | + refine!(wing) |
439 | 439 |
|
440 | 440 | @test length(wing.refined_panel_mapping) == n_panels |
441 | 441 |
|
|
0 commit comments