|
22 | 22 | import pyFAST.case_generation.case_gen as case_gen
|
23 | 23 | import pyFAST.case_generation.runner as runner
|
24 | 24 | import pyFAST.input_output.postpro as postpro
|
| 25 | +from pyFAST.input_output.fast_input_file import FASTInputFile |
25 | 26 |
|
26 | 27 | # Get current directory so this script can be called from any location
|
27 | 28 | scriptDir=os.path.dirname(__file__)
|
28 | 29 |
|
29 | 30 | # --- Parameters for this script
|
30 |
| -FAST_EXE = os.path.join(scriptDir, '../../../data/NREL5MW/openfast3.2.1_x64s.exe') # Location of a FAST exe (and dll) |
| 31 | +FAST_EXE = os.path.join(scriptDir, '../../../data/openfast.exe') # Location of a FAST exe (and dll) |
31 | 32 | ref_dir = os.path.join(scriptDir, '../../../data/NREL5MW/') # Folder where the fast input files are located (will be copied)
|
32 | 33 | main_file = 'Main_Onshore.fst' # Main file in ref_dir, used as a template
|
33 | 34 | work_dir = '_NREL5MW_Parametric/' # Output folder (will be created)
|
34 | 35 |
|
| 36 | + |
| 37 | +# --- Reading some reference files/tables to be able to modify tables |
| 38 | +# BDBld_ref = FASTInputFile('BeamDyn_Blade_ref.dat') |
| 39 | +# print(BDBld_ref.keys()) |
| 40 | +# BP_ref = BDBld_ref['BeamProperties'] |
| 41 | +# |
| 42 | +# HD_ref = FASTInputFile('HD_ref.dat') |
| 43 | +# print(HD_ref.keys()) |
| 44 | +# SmplProp_ref = HD_ref['SmplProp'] |
| 45 | + |
35 | 46 | # --- Defining the parametric study (list of dictionnaries with keys as FAST parameters)
|
36 | 47 | WS = [4 , 5 , 10 , 12 , 14 , 16]
|
37 | 48 | RPM = [2.5 , 7.5 , 11.3 , 12.1 , 12.1, 12.1]
|
|
45 | 56 | for i,(wsp,rpm,pitch) in enumerate(zip(WS,RPM,PITCH)): # NOTE: same length of WS and RPM otherwise do multiple for loops
|
46 | 57 | p=BaseDict.copy()
|
47 | 58 |
|
48 |
| - # --- Changing typical parameters (operating ocnditions) |
| 59 | + # --- Changing typical parameters (operating ocnditions) |
49 | 60 | p['EDFile|RotSpeed'] = rpm
|
50 | 61 | p['EDFile|BlPitch(1)'] = pitch
|
51 | 62 | p['EDFile|BlPitch(2)'] = pitch
|
|
60 | 71 | # p['EDFile|BldFile(1)|AdjBlMs'] =1.1
|
61 | 72 | # p['EDFile|BldFile(2)|AdjBlMs'] =1.1
|
62 | 73 | # p['EDFile|BldFile(3)|AdjBlMs'] =1.1
|
63 |
| - # Changing BeamDyn properties |
64 |
| - # BP_ref = fBD['BeamProperties'] |
65 |
| - # BP = BP_ref.copy() |
66 |
| - # BP['K']= BP['K']*i |
67 |
| - # p['BDBldFile(1)|BldFile|BeamProperties'] =BP |
| 74 | + # Changing BeamDyn properties |
| 75 | + # BP = BP_ref.copy() # Make a copy to be safe |
| 76 | + # BP['K']= BP['K']*i # Modify stiffness |
| 77 | + # p['BDBldFile(1)|BldFile|BeamProperties'] = BP # Use the updated stiffness for this case |
| 78 | + # Changing HydroDyn properties |
| 79 | + # SmplProp = SmplProp_ref.copy() # Make a copy to be safe |
| 80 | + # SmplProp[0,0] = Cd[i] # Change Cd value |
| 81 | + # p['HDFile|SmplProp'] = SmplProp # Use the updated table for this case,s |
| 82 | + |
68 | 83 | PARAMS.append(p)
|
69 | 84 |
|
70 | 85 | # --- Generating all files in a workdir
|
|
0 commit comments