Skip to content

Commit 29f372d

Browse files
committed
#185 adding a working pyramid model example
1 parent 5e56cc3 commit 29f372d

5 files changed

Lines changed: 214 additions & 173 deletions

File tree

data/pyramid_model/polars/1.csv

Lines changed: 0 additions & 17 deletions
This file was deleted.
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
alpha,Cd,Cs,Cl,Cm
2+
-10.0,0.1759893858334057,2.963819078393553e-21,-0.7493726713784946,0.2323775006207747
3+
-9.5,0.16289734924603438,2.7877286866584314e-21,-0.6924217529040287,0.2150382675337481
4+
-9.0,0.1504301874457461,2.6166544368792525e-21,-0.6371323632116463,0.1982607529225381
5+
-8.5,0.13862765245364775,2.4505707167459407e-21,-0.583498032661642,0.182046261914037
6+
-8.0,0.1275294962908461,2.2894519139484196e-21,-0.5315122916143107,0.16639609963513724
7+
-7.5,0.11717547097844788,2.133272416176612e-21,-0.4811686704299467,0.15131157121273117
8+
-7.0,0.10760532853756002,1.9820066111204418e-21,-0.4324606994688453,0.13679398177371113
9+
-6.5,0.09885882098928928,1.8356288864698326e-21,-0.38538190909130093,0.12284463644496953
10+
-6.0,0.09097570035474245,1.694113629914708e-21,-0.3399258296576083,0.10946484035339869
11+
-5.5,0.08399571865502635,1.557435229144991e-21,-0.2960859915280623,0.09665589862589102
12+
-5.0,0.0779586279112478,1.4255680718506053e-21,-0.2538559250629577,0.0844191163893389
13+
-4.5,0.07276768079432067,1.304392579507697e-21,-0.21595504346747285,0.07305505165488536
14+
-4.0,0.06820918462412777,1.1952100521496464e-21,-0.18295885873231385,0.06261743540439639
15+
-3.5,0.06414747339522936,1.0911261953022303e-21,-0.15164504939606627,0.05273733222084856
16+
-3.0,0.06044688110218564,9.852467144912246e-22,-0.11879129399731583,0.0430458066872185
17+
-2.5,0.056971741739556846,8.706773152424055e-22,-0.08117527107464828,0.03317392338648285
18+
-2.0,0.0535863893019032,7.405237030815495e-22,-0.0355746591666493,0.0227527469016182
19+
-1.5,0.050350423572556896,5.856067102929198e-22,0.026226099750827674,0.011481449300827454
20+
-1.0,0.04735778299115752,4.0923582258582316e-22,0.10429086281980794,-0.00026565530478757544
21+
-0.5,0.04452430953672641,2.232497256236004e-22,0.189614400178524,-0.011844789267901869
22+
0.0,0.0417658451882849,3.948710506959264e-23,0.2731914819652083,-0.0226121749411904
23+
0.5,0.038938158507699175,-1.5308243840478701e-22,0.3557444890017091,-0.03336699893672287
24+
1.0,0.036117770291757965,-3.560898065690111e-22,0.4410912179803868,-0.0442048470204237
25+
1.5,0.03355165087186637,-5.435970674210673e-22,0.5248695628452424,-0.05342654027574999
26+
2.0,0.0314867705794295,-6.896662889589436e-22,0.6027174175402769,-0.0593328997861588
27+
2.5,0.029737782322488943,-8.01300470612271e-22,0.6754871235581754,-0.06287604536210906
28+
3.0,0.028000254685969946,-9.031057734401621e-22,0.7466883077319687,-0.06610779561686102
29+
3.5,0.026342531516603155,-9.955490078848253e-22,0.8159447920161751,-0.06897851983807372
30+
4.0,0.024832956661119197,-1.07909698438847e-21,0.882880398365313,-0.0714385873134062
31+
4.5,0.023539873966248726,-1.1542165133933057e-21,0.9471189487339009,-0.07343836733051758
32+
5.0,0.022531627278722356,-1.221374405341541e-21,1.0082842650764576,-0.07492822917706685
33+
5.5,0.021876560445270733,-1.2810374706753849e-21,1.0660001693475016,-0.07585854214071311
34+
6.0,0.0216430173126245,-1.3336725198370469e-21,1.1198904835015508,-0.0761796755091154
35+
6.5,0.021855502747260325,-1.3836048414175573e-21,1.1730032825989054,-0.07614317006852858
36+
7.0,0.022476813390075807,-1.4334901652977566e-21,1.2273051287313683,-0.07604692845243605
37+
7.5,0.023482730749432957,-1.4812909638545697e-21,1.280797574400714,-0.0759108627193397
38+
8.0,0.02484903633369378,-1.52496970946492e-21,1.3314821721087169,-0.07575488492774146
39+
8.5,0.026551511651220286,-1.5624888745057316e-21,1.3773604743571508,-0.07559890713614321
40+
9.0,0.028565938210374484,-1.5918109313539293e-21,1.4164340336477907,-0.07546284140304686
41+
9.5,0.030868097519518387,-1.610898352386437e-21,1.4467044024824103,-0.07536659978695433
42+
10.0,0.033433771087014,-1.6177136099801785e-21,1.4661731333627843,-0.0753300943463675
43+
10.5,0.03772956880131731,-1.6057175342808367e-21,1.4791075252059553,-0.07796780684956318
44+
11.0,0.04483478356085069,-1.573737170673408e-21,1.4901408957026034,-0.0844740956822261
45+
11.5,0.054144221388925814,-1.527784314393788e-21,1.4978238255149576,-0.09273868782897009
46+
12.0,0.0650526883088543,-1.473870760677872e-21,1.5007068953052467,-0.100651310274409
47+
12.5,0.0813064038148973,-1.376249216669895e-21,1.4478125078785742,-0.10828545090079453
48+
13.0,0.10393510413553603,-1.227647034548664e-21,1.327791188740308,-0.11661304574760116
49+
13.5,0.12825887039541226,-1.0767879771019317e-21,1.1986357026030765,-0.12487149403527704
50+
14.0,0.1495977837191678,-9.723958071174512e-22,1.1183388141795072,-0.1322981949842703
51+
14.5,0.16758478702300417,-9.126318501956502e-22,1.0836834275674483,-0.13916224193214982
52+
15.0,0.18464791495839383,-8.633432558691364e-22,1.0549329936239267,-0.14581097523802025
53+
15.5,0.20029988625288483,-8.247825228239323e-22,1.0353010972003385,-0.15159916465463338
54+
16.0,0.2140534196340252,-7.972021497460613e-22,1.028001323148079,-0.155881579934741
55+
16.5,0.22575911507873533,-7.765045354525572e-22,1.0279465928930964,-0.1588574292964903
56+
17.0,0.23609366837079485,-7.591163461883778e-22,1.0279074596231041,-0.1612711173409803
57+
17.5,0.24580894194804037,-7.460764817814329e-22,1.0278839558321435,-0.1632952083953905
58+
18.0,0.2556567982483086,-7.38423842059632e-22,1.0278761140142585,-0.1651022667869003
59+
18.5,0.265699815399311,-7.344986178163224e-22,1.0281104344749106,-0.16669752709328292
60+
19.0,0.27558646593010794,-7.316573885898107e-22,1.0287304726554904,-0.16807297439296806
61+
19.5,0.28544745388056003,-7.294636373254447e-22,1.0296118437539339,-0.1693812987641203
62+
20.0,0.2954134832905278,-7.274808469685726e-22,1.030630162968177,-0.1707751902849041
63+
20.5,0.3055500999908466,-7.253401091686849e-22,1.0321158975458387,-0.17232913459444757
64+
21.0,0.3157783912824044,-7.232601462733436e-22,1.034270073518937,-0.17395281724452416
65+
21.5,0.32601237341014067,-7.216858872750047e-22,1.036774144262008,-0.17555172818226641
66+
22.0,0.3361660626189948,-7.210622611661238e-22,1.039309563149587,-0.1770313573548068
67+
22.5,0.3462258406278082,-7.210927738558214e-22,1.0418506907541978,-0.17838813341813575
68+
23.0,0.35623515262436534,-7.213063626837044e-22,1.044574269637424,-0.17967706251871235
69+
23.5,0.36619361005701967,-7.21886103787958e-22,1.0474653261573934,-0.18089150083937203
70+
24.0,0.3761008243741252,-7.230150733067677e-22,1.0505088866722323,-0.18202480456295017
71+
24.5,0.38595640702403533,-7.248763473783189e-22,1.0536899775400672,-0.18307032987228236
Lines changed: 77 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,80 @@
1-
Model:
2-
VSM: Vortex Step Method
3-
LLT: Lifting Line Theory
4-
PanelDistribution:
5-
LINEAR: Linear distribution
6-
COSINE: Cosine distribution
7-
COSINE_VAN_GARREL: van Garrel cosine distribution
8-
SPLIT_PROVIDED: Split provided sections
9-
UNCHANGED: Keep original sections
10-
InitialGammaDistribution:
11-
ELLIPTIC: Elliptic distribution
12-
ZEROS: Constant distribution
1+
# =============================================================================
2+
# VSM Settings Configuration File
3+
# =============================================================================
4+
#
5+
# This YAML file configures the Vortex Step Method (VSM) aerodynamic solver
6+
# for wing analysis. All simulation parameters are centralized here.
7+
#
8+
# FILE STRUCTURE:
9+
# ├── condition: Flight conditions (wind speed, angles, rates)
10+
# ├── wings: Wing geometry and discretization settings
11+
# └── solver_settings: Numerical solver parameters and convergence criteria
12+
#
13+
# AERODYNAMIC MODELS:
14+
# VSM: Vortex Step Method - Full 3D potential flow with wake modeling
15+
# LLT: Lifting Line Theory - Classical 1D approach for high aspect ratios
16+
#
17+
# PANEL DISTRIBUTIONS:
18+
# LINEAR: Uniform panel spacing along wingspan
19+
# COSINE: Cosine clustering (more panels at tips)
20+
# COSINE_VAN_GARREL: Van Garrel's modified cosine distribution
21+
# SPLIT_PROVIDED: Use predefined section splits from geometry
22+
# UNCHANGED: Preserve original geometry discretization
23+
#
24+
# INITIAL CIRCULATION DISTRIBUTIONS:
25+
# ELLIPTIC: Elliptical distribution (optimal for efficiency)
26+
# ZEROS: Start with zero circulation (cold start)
27+
#
28+
# SOLVER TYPES:
29+
# LOOP: Iterative fixed-point solver
30+
# NEWTON: Newton-Raphson nonlinear solver
31+
#
32+
# USAGE NOTES:
33+
# - n_panels should be divisible by n_groups for proper load balancing
34+
# - Higher n_panels improves accuracy but increases computation time
35+
# - Lower relaxation_factor if convergence issues occur
1336

37+
# Define the flight state for the aerodynamic analysis
38+
condition:
39+
wind_speed: 10.0 # [m/s] Free stream velocity magnitude
40+
alpha: 5.0 # [°] Angle of attack (pitch angle relative to flow)
41+
beta: 0.0 # [°] Sideslip angle (yaw angle relative to flow)
42+
yaw_rate: 0.0 # [°/s] Yaw rate (for dynamic analysis, 0 for static)
43+
44+
# Define wing geometry files and discretization parameters
1445
wings:
15-
- name: main_wing
16-
n_panels: 40
17-
n_groups: 40
18-
spanwise_panel_distribution: LINEAR
19-
spanwise_direction: [0.0, 1.0, 0.0]
20-
remove_nan: true
46+
- name: V3_Kite # Wing identifier for output labeling
47+
geometry_file: data/pyramid_model/wing_geometry.yaml
48+
n_panels: 2 # Total number of panels along wingspan
49+
n_groups: 1 # Number of panel groups (must divide n_panels)
50+
spanwise_panel_distribution: LINEAR # Panel spacing algorithm
51+
spanwise_direction: [0.0, 1.0, 0.0] # Unit vector defining wingspan direction
52+
remove_nan: true # Remove NaN values from polar data
53+
54+
# Numerical method settings and convergence criteria
2155
solver_settings:
22-
n_panels: 40
23-
n_groups: 40
24-
aerodynamic_model_type: VSM
25-
density: 1.225 # air density [kg/m³]
26-
max_iterations: 1500
27-
rtol: 1e-5 # relative error [-]
28-
tol_reference_error: 0.001
29-
relaxation_factor: 0.03 # relaxation factor for convergence
30-
artificial_damping: false # whether to apply artificial damping
31-
k2: 0.1 # artificial damping parameter
32-
k4: 0.0 # artificial damping parameter
33-
type_initial_gamma_distribution: ELLIPTIC
34-
core_radius_fraction: 1e-20
35-
mu: 1.81e-5 # dynamic viscosity [N·s/m²]
36-
calc_only_f_and_gamma: false # whether to only output f and gamma
56+
# --- Core Aerodynamic Model ---
57+
aerodynamic_model_type: VSM # VSM=3D vortex method, LLT=lifting line theory
58+
solver_type: LOOP # LOOP=fixed-point iteration, NEWTON=Newton-Raphson
59+
60+
# --- Physical Properties ---
61+
density: 1.225 # [kg/m³] Air density (ISA sea level)
62+
mu: 1.81e-5 # [N·s/m²] Dynamic viscosity (ISA sea level)
63+
64+
# --- Convergence Control ---
65+
max_iterations: 5000 # Maximum solver iterations before timeout
66+
rtol: 1e-6 # Relative tolerance for convergence
67+
tol_reference_error: 0.001 # Reference error tolerance
68+
relaxation_factor: 0.01 # [0.001-0.1] Under-relaxation for stability
69+
70+
# --- Numerical Stability ---
71+
artificial_damping: false # Enable artificial damping for unstable cases
72+
k2: 0.1 # 2nd-order damping coefficient
73+
k4: 0.0 # 4th-order damping coefficient
74+
core_radius_fraction: 1e-20 # Vortex core radius (fraction of chord)
75+
76+
# --- Initial Conditions ---
77+
type_initial_gamma_distribution: ELLIPTIC # Starting circulation distribution
78+
79+
# --- Output Control ---
80+
calc_only_f_and_gamma: false # true=compute only forces & circulation
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ wing_sections:
1111
# ---------------------------------------------------------------
1212
headers: [airfoil_id, LE_x, LE_y, LE_z, TE_x, TE_y, TE_z]
1313
data:
14-
- [1, 0.0, 8.16/2, 3.15+4.9, 2.0, 8.16/2, 3.15+4.9] # Right tip chord (P2)
15-
- [1, 0.0, -8.16/2, 3.15+4.9, 2.0, -8.16/2, 3.15+4.9] # Left tip chord (P3)
16-
- [1, 0.0, 0.0, 4.9, 2.0, 0.0, 4.9] # Bridle attachment (P4/P5 merged, approx.)
14+
- [1, 0.0, 4.08, 4.9, 2.0, 4.08, 4.9] # Right tip chord (P2)
15+
- [1, 0.0, -4.08, 4.9, 2.0, -4.08, 4.9] # Left tip chord (P3)
16+
- [1, 0.0, 0.0, 8.05, 2.0, 0.0, 8.05] # Bridle attachment (P4/P5 merged, approx.)
1717

1818
wing_airfoils:
1919
# ---------------------------------------------------------------
@@ -23,7 +23,7 @@ wing_airfoils:
2323
reynolds: 1e6
2424
headers: [airfoil_id, type, info_dict]
2525
data:
26-
- [1, polars, {csv_file_path: "cl_cd_polar.csv"}]
26+
- [1, polars, {csv_file_path: "polars/V3_kite_midspan_airfoil_polar.csv"}]
2727

2828
bridle_nodes:
2929
# ---------------------------------------------------------------
@@ -35,11 +35,11 @@ bridle_nodes:
3535
# ---------------------------------------------------------------
3636
headers: [id, x, y, z, type]
3737
data:
38-
- [1, 0.0, 0.0, 0.0, knot] # Bridle origin
39-
- [2, 0.0, 8.16/2, 3.15+4.9, knot] # Right tip
40-
- [3, 0.0, -8.16/2, 3.15+4.9, knot] # Left tip
41-
- [4, 0.0, 8.16/2, 4.9, knot] # Bridle top right
42-
- [5, 0.0, -8.16/2, 4.9, knot] # Bridle top left
38+
- [1, 0.0, 0.0, 0.0, knot] # Bridle origin
39+
- [2, 0.0, 4.08, 8.05, knot] # Right tip
40+
- [3, 0.0, -4.08, 8.05, knot] # Left tip
41+
- [4, 0.0, 4.08, 4.9, knot] # Bridle top right
42+
- [5, 0.0, -4.08, 4.9, knot] # Bridle top left
4343

4444
bridle_lines:
4545
# ---------------------------------------------------------------

0 commit comments

Comments
 (0)