Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Examples #61

Merged
merged 12 commits into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ new*
*COMPILED*
*.out
*.h5
*.mat
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
SNL_5MW_D_Carbon_LCDT,,,,# Shear webs ->,1,# of stacks ->,7,Stack ID ->,1,2,3,4,5,6,7,Segment ID ->,1,2,3,4,5,6,7,8,9,10,11,12,DP Types,1,2,3,4,5,6,7,8,9,10,11,12,1,2,3,4,5,6,7,8,9,10,11,12,,
,,,,,,# of segments ->,12,Material ID ->,1,2,4,1,1,2,4,,,,,,,,,,,,,,,,,,,,,,,,,,,first entry in the CSV list is the exterior blade surface stack,,,,,,,,,,,,SW1,
Sta.#,Blade span (m),Airfoil Shape File,TE Type,Twist (deg),Chord,xoffset,aero center,Section Label,LE,Panel_Face,Panel_Core,Spar,TE,SW_Face,SW_Core,-blank-,HP_TE,HP_Aft_Panel,HP_Aft_Spar,HP_Fore_Spar,HP_Fore_Panel,HP_LE,LP_LE,LP_Fore_Panel,LP_Aft_Spar,LP_Fore_Spar,LP_Aft_Panel,LP_TE,,,,,,,,,,,,,,HP_TE,HP_Aft_Panel,HP_Aft_Spar,HP_Fore_Spar,HP_Fore_Panel,HP_LE,LP_LE,LP_Fore_Panel,LP_Aft_Spar,LP_Fore_Spar,LP_Aft_Panel,LP_TE,stacks,dps
1,0,TUD_42,sharp,0,6,0.3,0.2,,12,1,8,12,12,1,8,-1,-0.95,-0.5,-0.3,-0.1,-0.095,0,0.095,0.1,0.3,0.5,0.95,1,,,,,,,,,,,,,,"2,5,2","2,3,2","2,4,2","2,4,2","2,3,2","2,1,2","2,1,2","2,3,2","2,4,2","2,4,2","2,3,2","2,5,2","6,7,6","9,3,3,9"
2,6.607,TUD_42,sharp,0,6,0.3,0.2,,12,1,9,13,12,1,9,-1,-0.95,-0.5,-0.3,-0.1,-0.095,0,0.095,0.1,0.3,0.5,0.95,1,,,,,,,,,,,,,,"2,5,2","2,3,2","2,4,2","2,4,2","2,3,2","2,1,2","2,1,2","2,3,2","2,4,2","2,4,2","2,3,2","2,5,2","6,7,6","9,3,3,9"
3,13.215,TUD_42,sharp,0,6,0.3,0.2,,12,1,9,13,12,1,9,-1,-0.95,-0.5,-0.3,-0.1,-0.095,0,0.095,0.1,0.3,0.5,0.95,1,,,,,,,,,,,,,,"2,5,2","2,3,2","2,4,2","2,4,2","2,3,2","2,1,2","2,1,2","2,3,2","2,4,2","2,4,2","2,3,2","2,5,2","6,7,6","9,3,3,9"
4,19.822,TUD_42,sharp,0,5.498,0.3,0.2,,11,1,8,12,11,1,8,-1,-0.95,-0.5,-0.3,-0.1,-0.095,0,0.095,0.1,0.3,0.5,0.95,1,,,,,,,,,,,,,,"2,5,2","2,3,2","2,4,2","2,4,2","2,3,2","2,1,2","2,1,2","2,3,2","2,4,2","2,4,2","2,3,2","2,5,2","6,7,6","9,3,3,9"
5,26.43,TUD_42,sharp,0,4.431,0.3,0.2,,9,1,7,10,9,1,7,-1,-0.95,-0.5,-0.3,-0.1,-0.095,0,0.095,0.1,0.3,0.5,0.95,1,,,,,,,,,,,,,,"2,5,2","2,3,2","2,4,2","2,4,2","2,3,2","2,1,2","2,1,2","2,3,2","2,4,2","2,4,2","2,3,2","2,5,2","6,7,6","9,3,3,9"
6,33.037,TUD_42,sharp,0,3.806,0.3,0.2,,8,1,6,8,8,1,6,-1,-0.95,-0.5,-0.3,-0.1,-0.095,0,0.095,0.1,0.3,0.5,0.95,1,,,,,,,,,,,,,,"2,5,2","2,3,2","2,4,2","2,4,2","2,3,2","2,1,2","2,1,2","2,3,2","2,4,2","2,4,2","2,3,2","2,5,2","6,7,6","9,3,3,9"
7,39.645,TUD_42,sharp,0,3.435,0.3,0.2,,7,1,5,8,7,1,5,-1,-0.95,-0.5,-0.3,-0.1,-0.095,0,0.095,0.1,0.3,0.5,0.95,1,,,,,,,,,,,,,,"2,5,2","2,3,2","2,4,2","2,4,2","2,3,2","2,1,2","2,1,2","2,3,2","2,4,2","2,4,2","2,3,2","2,5,2","6,7,6","9,3,3,9"
8,46.252,TUD_42,sharp,0,3.205,0.3,0.2,,6,1,5,7,6,1,5,-1,-0.95,-0.5,-0.3,-0.1,-0.095,0,0.095,0.1,0.3,0.5,0.95,1,,,,,,,,,,,,,,"2,5,2","2,3,2","2,4,2","2,4,2","2,3,2","2,1,2","2,1,2","2,3,2","2,4,2","2,4,2","2,3,2","2,5,2","6,7,6","9,3,3,9"
9,52.859,TUD_42,sharp,0,3.068,0.3,0.2,,6,1,5,7,6,1,5,-1,-0.95,-0.5,-0.3,-0.1,-0.095,0,0.095,0.1,0.3,0.5,0.95,1,,,,,,,,,,,,,,"2,5,2","2,3,2","2,4,2","2,4,2","2,3,2","2,1,2","2,1,2","2,3,2","2,4,2","2,4,2","2,3,2","2,5,2","6,7,6","9,3,3,9"
10,59.467,TUD_42,sharp,0,3.003,0.3,0.2,,6,1,4,7,6,1,4,-1,-0.95,-0.5,-0.3,-0.1,-0.095,0,0.095,0.1,0.3,0.5,0.95,1,,,,,,,,,,,,,,"2,5,2","2,3,2","2,4,2","2,4,2","2,3,2","2,1,2","2,1,2","2,3,2","2,4,2","2,4,2","2,3,2","2,5,2","6,7,6","9,3,3,9"
11,66.074,TUD_42,sharp,0,3,0.3,0.2,,6,1,4,7,6,1,4,-1,-0.95,-0.5,-0.3,-0.1,-0.095,0,0.095,0.1,0.3,0.5,0.95,1,,,,,,,,,,,,,,"2,5,2","2,3,2","2,4,2","2,4,2","2,3,2","2,1,2","2,1,2","2,3,2","2,4,2","2,4,2","2,3,2","2,5,2","6,7,6","9,3,3,9"
12,72.682,TUD_42,sharp,0,3.056,0.3,0.2,,6,1,4,7,6,1,4,-1,-0.95,-0.5,-0.3,-0.1,-0.095,0,0.095,0.1,0.3,0.5,0.95,1,,,,,,,,,,,,,,"2,5,2","2,3,2","2,4,2","2,4,2","2,3,2","2,1,2","2,1,2","2,3,2","2,4,2","2,4,2","2,3,2","2,5,2","6,7,6","9,3,3,9"
13,79.289,TUD_42,sharp,0,3.176,0.3,0.2,,6,1,5,7,6,1,5,-1,-0.95,-0.5,-0.3,-0.1,-0.095,0,0.095,0.1,0.3,0.5,0.95,1,,,,,,,,,,,,,,"2,5,2","2,3,2","2,4,2","2,4,2","2,3,2","2,1,2","2,1,2","2,3,2","2,4,2","2,4,2","2,3,2","2,5,2","6,7,6","9,3,3,9"
14,85.896,TUD_42,sharp,0,3.377,0.3,0.2,,7,1,5,8,7,1,5,-1,-0.95,-0.5,-0.3,-0.1,-0.095,0,0.095,0.1,0.3,0.5,0.95,1,,,,,,,,,,,,,,"2,5,2","2,3,2","2,4,2","2,4,2","2,3,2","2,1,2","2,1,2","2,3,2","2,4,2","2,4,2","2,3,2","2,5,2","6,7,6","9,3,3,9"
15,92.504,TUD_42,sharp,0,3.688,0.3,0.2,,7,1,5,8,7,1,5,-1,-0.95,-0.5,-0.3,-0.1,-0.095,0,0.095,0.1,0.3,0.5,0.95,1,,,,,,,,,,,,,,"2,5,2","2,3,2","2,4,2","2,4,2","2,3,2","2,1,2","2,1,2","2,3,2","2,4,2","2,4,2","2,3,2","2,5,2","6,7,6","9,3,3,9"
16,99.111,TUD_42,sharp,0,4.18,0.3,0.2,,8,1,6,9,8,1,6,-1,-0.95,-0.5,-0.3,-0.1,-0.095,0,0.095,0.1,0.3,0.5,0.95,1,,,,,,,,,,,,,,"2,5,2","2,3,2","2,4,2","2,4,2","2,3,2","2,1,2","2,1,2","2,3,2","2,4,2","2,4,2","2,3,2","2,5,2","6,7,6","9,3,3,9"
17,105.719,TUD_42,sharp,0,4.924,0.3,0.2,,10,1,7,11,10,1,7,-1,-0.95,-0.5,-0.3,-0.1,-0.095,0,0.095,0.1,0.3,0.5,0.95,1,,,,,,,,,,,,,,"2,5,2","2,3,2","2,4,2","2,4,2","2,3,2","2,1,2","2,1,2","2,3,2","2,4,2","2,4,2","2,3,2","2,5,2","6,7,6","9,3,3,9"
18,112.326,TUD_42,sharp,0,6,0.3,0.2,,12,1,9,13,12,1,9,-1,-0.95,-0.5,-0.3,-0.1,-0.095,0,0.095,0.1,0.3,0.5,0.95,1,,,,,,,,,,,,,,"2,5,2","2,3,2","2,4,2","2,4,2","2,3,2","2,1,2","2,1,2","2,3,2","2,4,2","2,4,2","2,3,2","2,5,2","6,7,6","9,3,3,9"
19,118.934,TUD_42,sharp,0,6,0.3,0.2,,12,1,9,13,12,1,9,-1,-0.95,-0.5,-0.3,-0.1,-0.095,0,0.095,0.1,0.3,0.5,0.95,1,,,,,,,,,,,,,,"2,5,2","2,3,2","2,4,2","2,4,2","2,3,2","2,1,2","2,1,2","2,3,2","2,4,2","2,4,2","2,3,2","2,5,2","6,7,6","9,3,3,9"
20,125.541,TUD_42,sharp,0,6,0.3,0.2,,12,1,9,13,12,1,9,-1,-0.95,-0.5,-0.3,-0.1,-0.095,0,0.095,0.1,0.3,0.5,0.95,1,,,,,,,,,,,,,,"2,5,2","2,3,2","2,4,2","2,4,2","2,3,2","2,1,2","2,1,2","2,3,2","2,4,2","2,4,2","2,3,2","2,5,2","6,7,6","9,3,3,9"
21,132.148,TUD_42,sharp,0,6,0.3,0.2,,12,1,9,13,12,1,9,-1,-0.95,-0.5,-0.3,-0.1,-0.095,0,0.095,0.1,0.3,0.5,0.95,1,,,,,,,,,,,,,,"2,5,2","2,3,2","2,4,2","2,4,2","2,3,2","2,1,2","2,1,2","2,3,2","2,4,2","2,4,2","2,3,2","2,5,2","6,7,6","9,3,3,9"
1,0,NACA_0021,sharp,0,6,0.3,0.2,,12,1,8,12,12,1,8,-1,-0.95,-0.5,-0.3,-0.1,-0.095,0,0.095,0.1,0.3,0.5,0.95,1,,,,,,,,,,,,,,"2,5,2","2,3,2","2,4,2","2,4,2","2,3,2","2,1,2","2,1,2","2,3,2","2,4,2","2,4,2","2,3,2","2,5,2","6,7,6","9,3,3,9"
2,6.607,NACA_0021,sharp,0,6,0.3,0.2,,12,1,9,13,12,1,9,-1,-0.95,-0.5,-0.3,-0.1,-0.095,0,0.095,0.1,0.3,0.5,0.95,1,,,,,,,,,,,,,,"2,5,2","2,3,2","2,4,2","2,4,2","2,3,2","2,1,2","2,1,2","2,3,2","2,4,2","2,4,2","2,3,2","2,5,2","6,7,6","9,3,3,9"
3,13.215,NACA_0021,sharp,0,6,0.3,0.2,,12,1,9,13,12,1,9,-1,-0.95,-0.5,-0.3,-0.1,-0.095,0,0.095,0.1,0.3,0.5,0.95,1,,,,,,,,,,,,,,"2,5,2","2,3,2","2,4,2","2,4,2","2,3,2","2,1,2","2,1,2","2,3,2","2,4,2","2,4,2","2,3,2","2,5,2","6,7,6","9,3,3,9"
4,19.822,NACA_0021,sharp,0,5.498,0.3,0.2,,11,1,8,12,11,1,8,-1,-0.95,-0.5,-0.3,-0.1,-0.095,0,0.095,0.1,0.3,0.5,0.95,1,,,,,,,,,,,,,,"2,5,2","2,3,2","2,4,2","2,4,2","2,3,2","2,1,2","2,1,2","2,3,2","2,4,2","2,4,2","2,3,2","2,5,2","6,7,6","9,3,3,9"
5,26.43,NACA_0021,sharp,0,4.431,0.3,0.2,,9,1,7,10,9,1,7,-1,-0.95,-0.5,-0.3,-0.1,-0.095,0,0.095,0.1,0.3,0.5,0.95,1,,,,,,,,,,,,,,"2,5,2","2,3,2","2,4,2","2,4,2","2,3,2","2,1,2","2,1,2","2,3,2","2,4,2","2,4,2","2,3,2","2,5,2","6,7,6","9,3,3,9"
6,33.037,NACA_0021,sharp,0,3.806,0.3,0.2,,8,1,6,8,8,1,6,-1,-0.95,-0.5,-0.3,-0.1,-0.095,0,0.095,0.1,0.3,0.5,0.95,1,,,,,,,,,,,,,,"2,5,2","2,3,2","2,4,2","2,4,2","2,3,2","2,1,2","2,1,2","2,3,2","2,4,2","2,4,2","2,3,2","2,5,2","6,7,6","9,3,3,9"
7,39.645,NACA_0021,sharp,0,3.435,0.3,0.2,,7,1,5,8,7,1,5,-1,-0.95,-0.5,-0.3,-0.1,-0.095,0,0.095,0.1,0.3,0.5,0.95,1,,,,,,,,,,,,,,"2,5,2","2,3,2","2,4,2","2,4,2","2,3,2","2,1,2","2,1,2","2,3,2","2,4,2","2,4,2","2,3,2","2,5,2","6,7,6","9,3,3,9"
8,46.252,NACA_0021,sharp,0,3.205,0.3,0.2,,6,1,5,7,6,1,5,-1,-0.95,-0.5,-0.3,-0.1,-0.095,0,0.095,0.1,0.3,0.5,0.95,1,,,,,,,,,,,,,,"2,5,2","2,3,2","2,4,2","2,4,2","2,3,2","2,1,2","2,1,2","2,3,2","2,4,2","2,4,2","2,3,2","2,5,2","6,7,6","9,3,3,9"
9,52.859,NACA_0021,sharp,0,3.068,0.3,0.2,,6,1,5,7,6,1,5,-1,-0.95,-0.5,-0.3,-0.1,-0.095,0,0.095,0.1,0.3,0.5,0.95,1,,,,,,,,,,,,,,"2,5,2","2,3,2","2,4,2","2,4,2","2,3,2","2,1,2","2,1,2","2,3,2","2,4,2","2,4,2","2,3,2","2,5,2","6,7,6","9,3,3,9"
10,59.467,NACA_0021,sharp,0,3.003,0.3,0.2,,6,1,4,7,6,1,4,-1,-0.95,-0.5,-0.3,-0.1,-0.095,0,0.095,0.1,0.3,0.5,0.95,1,,,,,,,,,,,,,,"2,5,2","2,3,2","2,4,2","2,4,2","2,3,2","2,1,2","2,1,2","2,3,2","2,4,2","2,4,2","2,3,2","2,5,2","6,7,6","9,3,3,9"
11,66.074,NACA_0021,sharp,0,3,0.3,0.2,,6,1,4,7,6,1,4,-1,-0.95,-0.5,-0.3,-0.1,-0.095,0,0.095,0.1,0.3,0.5,0.95,1,,,,,,,,,,,,,,"2,5,2","2,3,2","2,4,2","2,4,2","2,3,2","2,1,2","2,1,2","2,3,2","2,4,2","2,4,2","2,3,2","2,5,2","6,7,6","9,3,3,9"
12,72.682,NACA_0021,sharp,0,3.056,0.3,0.2,,6,1,4,7,6,1,4,-1,-0.95,-0.5,-0.3,-0.1,-0.095,0,0.095,0.1,0.3,0.5,0.95,1,,,,,,,,,,,,,,"2,5,2","2,3,2","2,4,2","2,4,2","2,3,2","2,1,2","2,1,2","2,3,2","2,4,2","2,4,2","2,3,2","2,5,2","6,7,6","9,3,3,9"
13,79.289,NACA_0021,sharp,0,3.176,0.3,0.2,,6,1,5,7,6,1,5,-1,-0.95,-0.5,-0.3,-0.1,-0.095,0,0.095,0.1,0.3,0.5,0.95,1,,,,,,,,,,,,,,"2,5,2","2,3,2","2,4,2","2,4,2","2,3,2","2,1,2","2,1,2","2,3,2","2,4,2","2,4,2","2,3,2","2,5,2","6,7,6","9,3,3,9"
14,85.896,NACA_0021,sharp,0,3.377,0.3,0.2,,7,1,5,8,7,1,5,-1,-0.95,-0.5,-0.3,-0.1,-0.095,0,0.095,0.1,0.3,0.5,0.95,1,,,,,,,,,,,,,,"2,5,2","2,3,2","2,4,2","2,4,2","2,3,2","2,1,2","2,1,2","2,3,2","2,4,2","2,4,2","2,3,2","2,5,2","6,7,6","9,3,3,9"
15,92.504,NACA_0021,sharp,0,3.688,0.3,0.2,,7,1,5,8,7,1,5,-1,-0.95,-0.5,-0.3,-0.1,-0.095,0,0.095,0.1,0.3,0.5,0.95,1,,,,,,,,,,,,,,"2,5,2","2,3,2","2,4,2","2,4,2","2,3,2","2,1,2","2,1,2","2,3,2","2,4,2","2,4,2","2,3,2","2,5,2","6,7,6","9,3,3,9"
16,99.111,NACA_0021,sharp,0,4.18,0.3,0.2,,8,1,6,9,8,1,6,-1,-0.95,-0.5,-0.3,-0.1,-0.095,0,0.095,0.1,0.3,0.5,0.95,1,,,,,,,,,,,,,,"2,5,2","2,3,2","2,4,2","2,4,2","2,3,2","2,1,2","2,1,2","2,3,2","2,4,2","2,4,2","2,3,2","2,5,2","6,7,6","9,3,3,9"
17,105.719,NACA_0021,sharp,0,4.924,0.3,0.2,,10,1,7,11,10,1,7,-1,-0.95,-0.5,-0.3,-0.1,-0.095,0,0.095,0.1,0.3,0.5,0.95,1,,,,,,,,,,,,,,"2,5,2","2,3,2","2,4,2","2,4,2","2,3,2","2,1,2","2,1,2","2,3,2","2,4,2","2,4,2","2,3,2","2,5,2","6,7,6","9,3,3,9"
18,112.326,NACA_0021,sharp,0,6,0.3,0.2,,12,1,9,13,12,1,9,-1,-0.95,-0.5,-0.3,-0.1,-0.095,0,0.095,0.1,0.3,0.5,0.95,1,,,,,,,,,,,,,,"2,5,2","2,3,2","2,4,2","2,4,2","2,3,2","2,1,2","2,1,2","2,3,2","2,4,2","2,4,2","2,3,2","2,5,2","6,7,6","9,3,3,9"
19,118.934,NACA_0021,sharp,0,6,0.3,0.2,,12,1,9,13,12,1,9,-1,-0.95,-0.5,-0.3,-0.1,-0.095,0,0.095,0.1,0.3,0.5,0.95,1,,,,,,,,,,,,,,"2,5,2","2,3,2","2,4,2","2,4,2","2,3,2","2,1,2","2,1,2","2,3,2","2,4,2","2,4,2","2,3,2","2,5,2","6,7,6","9,3,3,9"
20,125.541,NACA_0021,sharp,0,6,0.3,0.2,,12,1,9,13,12,1,9,-1,-0.95,-0.5,-0.3,-0.1,-0.095,0,0.095,0.1,0.3,0.5,0.95,1,,,,,,,,,,,,,,"2,5,2","2,3,2","2,4,2","2,4,2","2,3,2","2,1,2","2,1,2","2,3,2","2,4,2","2,4,2","2,3,2","2,5,2","6,7,6","9,3,3,9"
21,132.148,NACA_0021,sharp,0,6,0.3,0.2,,12,1,9,13,12,1,9,-1,-0.95,-0.5,-0.3,-0.1,-0.095,0,0.095,0.1,0.3,0.5,0.95,1,,,,,,,,,,,,,,"2,5,2","2,3,2","2,4,2","2,4,2","2,3,2","2,1,2","2,1,2","2,3,2","2,4,2","2,4,2","2,3,2","2,5,2","6,7,6","9,3,3,9"
Binary file removed docs/.DS_Store
Binary file not shown.
Binary file removed docs/src/.DS_Store
Binary file not shown.
Binary file modified docs/src/figs/.DS_Store
Binary file not shown.
43 changes: 29 additions & 14 deletions docs/src/literate/C_customizablePreprocessing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -405,18 +405,25 @@ if !AD15On
#########################################
### Set up aero forces
#########################################
chord_spl = FLOWMath.akima(numadIn_bld.span./maximum(numadIn_bld.span), numadIn_bld.chord,LinRange(0,1,Nslices))

T1 = round(Int,(5.8/H)*Nslices)
T2 = round(Int,(11.1/H)*Nslices)
T3 = round(Int,(29.0/H)*Nslices)
T4 = round(Int,(34.7/H)*Nslices)
airfoils = fill("$(path)/airfoils/NACA_0021.dat",Nslices)
airfoils[T1:T4] .= "$(path)/airfoils/Sandia_001850.dat"
### translate from blade span to blade height between the numad definition and the vertical slice positions
### First get the angles from the overall geometry npoints and go to the numad npoints
delta_xs = shapeX[2:end] - shapeX[1:end-1]
delta_zs = shapeY[2:end] - shapeY[1:end-1]
delta3D = atan.(delta_xs./delta_zs)
delta3D_spl = FLOWMath.akima(shapeY[1:end-1]./maximum(shapeY[1:end-1]), delta3D,LinRange(0,1,length(numadIn_bld.span)-1))

chord = fill(1.22,Nslices) #TODO: link chord to numad and height as opposed to span
chord[T1:T4] .= 1.07
chord[T2:T3] .= 0.9191
bld_height_numad = cumsum(diff(numadIn_bld.span).*(1.0.-abs.(sin.(delta3D_spl)))) # now convert the numad span to a height

chord = FLOWMath.akima(bld_height_numad./maximum(bld_height_numad), numadIn_bld.chord,LinRange(0,1,Nslices)) # now we can use it to access the numad data
airfoils = fill("nothing",Nslices)

for (iheight_numad,height_numad) in enumerate(bld_height_numad./maximum(bld_height_numad)) # Discretely assign the airfoils
for (iheight,height_slices) in enumerate(collect(LinRange(0,1,Nslices)))
if airfoils[iheight]=="nothing" && height_slices<=height_numad
airfoils[iheight] = "$(numadIn_bld.airfoil[iheight_numad]).dat"
end
end
end

OWENSAero.setupTurb(shapeX,shapeY,B,chord,tsr,Vinf;AModel,DSModel,
afname = airfoils, #TODO: map to the numad input
Expand All @@ -436,20 +443,28 @@ end
nothing

# Set up AeroDyn if used
# Here we create AeroDyn the files, first by specifying the names, then by creating the files, TODO: hook up the direct sectionPropsArray_str
# Here we create AeroDyn the files, first by specifying the names, then by creating the files
# Then by initializing AeroDyn and grabbing the backend functionality with a function handle
if AD15On
ad_input_file="$path/ADInputFile_SingleTurbine2.dat"
ifw_input_file="$path/IW2.dat"
blade_filename="$path/blade2.dat"
lower_strut_filename="$path/lower_arm2.dat"
upper_strut_filename="$path/upper_arm2.dat"
airfoil_filenames = "$path/airfoils/NACA_0018_AllRe.dat"
OLAF_filename = "$path/OLAF2.dat"

NumADBldNds = NumADStrutNds = 10

bldchord_spl = FLOWMath.akima(numadIn_bld.span./maximum(numadIn_bld.span), numadIn_bld.chord,LinRange(0,1,NumADBldNds))

airfoil_filenames = fill("nothing",NumADBldNds) # Discretely assign the airfoils #TODO: separate out struts
for (ispan_numad,span_numad) in enumerate(numadIn_bld.span./maximum(numadIn_bld.span))
for (ispan,span_slices) in enumerate(collect(LinRange(0,1,NumADBldNds)))
if airfoil_filenames[ispan]=="nothing" && span_slices<=span_numad
airfoil_filenames[ispan] = "$(numadIn_bld.airfoil[ispan_numad]).dat"
end
end
end

if meshtype == "ARCUS"
blade_filenames = [blade_filename for i=1:Nbld]
Expand Down Expand Up @@ -503,7 +518,7 @@ if AD15On
BlCrvAng=zeros(blade_Nnodes[iADBody])
BlTwist=zeros(blade_Nnodes[iADBody])
BlChord=blade_chords[iADBody]
BlAFID=ones(Int,blade_Nnodes[iADBody])
BlAFID=collect(1:length(airfoil_filenames))
OWENSOpenFASTWrappers.writeADbladeFile(filename;NumBlNds=blade_Nnodes[iADBody],BlSpn,BlCrvAC,BlSwpAC,BlCrvAng,BlTwist,BlChord,BlAFID)
end

Expand Down
Loading
Loading