Skip to content

Commit cd01113

Browse files
committed
FF: update example file
1 parent fbcbfab commit cd01113

File tree

2 files changed

+18
-11
lines changed

2 files changed

+18
-11
lines changed

openfast_toolbox/fastfarm/FASTFarmCaseCreation.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ def copyTurbineFilesForEachCase(self, writeFiles=True):
620620
Vhub_ = self.allCond.sel(cond=cond)['vhub'].values
621621

622622
# Update parameters to be changed in the SeaState files
623-
if self.hasSS
623+
if self.hasSS:
624624
self.SeaStateFile['WaveHs'] = self.bins.sel(wspd=Vhub_, method='nearest').WaveHs.values
625625
self.SeaStateFile['WaveTp'] = self.bins.sel(wspd=Vhub_, method='nearest').WaveTp.values
626626
self.SeaStateFile['WvHiCOffD'] = 2.0*np.pi/self.SeaStateFile['WaveTp']
@@ -780,14 +780,14 @@ def copyTurbineFilesForEachCase(self, writeFiles=True):
780780
else:
781781
self.turbineFile['CompSeaState'] = 0
782782

783-
if self.hasMD:
784-
if self.multi_MD:
785-
self.turbineFile['CompMooring'] = 3 # {0=None; 1=MAP++; 2=FEAMooring; 3=MoorDyn; 4=OrcaFlex}
786-
self.turbineFile['MooringFile'] = f'"{self.MDfilename}{t+1}_mod.dat'
787-
else:
788-
# Should be in .fstf and not in .fst (updated later when ff file is written).
789-
pass
790-
else:
783+
if self.hasMD:
784+
if self.multi_MD:
785+
self.turbineFile['CompMooring'] = 3 # {0=None; 1=MAP++; 2=FEAMooring; 3=MoorDyn; 4=OrcaFlex}
786+
self.turbineFile['MooringFile'] = f'"{self.MDfilename}{t+1}_mod.dat'
787+
else:
788+
# Should be in .fstf and not in .fst (updated later when ff file is written).
789+
pass
790+
else:
791791
self.turbineFile['CompMooring'] = 0
792792
self.turbineFile['MooringFile'] = f'"unused"'
793793

@@ -867,7 +867,7 @@ def _were_all_turbine_files_copied(self):
867867
if self.hasHD and not self.multi_HD:
868868
_ = checkIfExists(os.path.join(currPath, self.HDfilename))
869869
if not _: return False
870-
elif self.hasHD and self.multi_HD::
870+
elif self.hasHD and self.multi_HD:
871871
for t in range(self.nTurbines):
872872
_ = checkIfExists(os.path.join(currPath,f'{self.HDfilename}{t+1}_mod.dat'))
873873
if not _: return False

openfast_toolbox/fastfarm/examples/Ex3_FFarmCompleteSetup.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ def main():
2828
Cmeander = 1.9 # Meandering constant (-)
2929

3030
# ----------- Wind farm
31+
# The wts dictionary holds information of each wind turbine. The allowed entries
32+
# are: x, y, z, D, zhub, cmax, fmax, Cmeander, and phi_deg. The phi_deg is the
33+
# only entry that is optional and is related to floating platform heading angle,
34+
# given in degrees. The angle phi_deg is not illustrated on the example below.
3135
D = 240
3236
zhub = 150
3337
wts = {
@@ -92,7 +96,9 @@ def main():
9296
templateFiles = {
9397
"EDfilename" : 'ElastoDyn.T',
9498
'SEDfilename' : None, #'SimplifiedElastoDyn.T',
95-
'HDfilename' : 'HydroDyn.dat',
99+
'HDfilename' : None, # 'HydroDyn.dat', # ending with .T for per-turbine HD, .dat for holisitc
100+
'MDfilename' : None, # 'MoorDyn.T', # ending with .T for per-turbine MD, .dat for holistic
101+
'SSfilename' : None, # 'SeaState.dat',
96102
'SrvDfilename' : 'ServoDyn.T',
97103
'ADfilename' : 'AeroDyn.dat',
98104
'ADskfilename' : 'AeroDisk.dat',
@@ -105,6 +111,7 @@ def main():
105111
'libdisconfilepath' : '/full/path/to/controller/libdiscon.so',
106112
'controllerInputfilename' : 'DISCON.IN',
107113
'coeffTablefilename' : 'CpCtCq.csv',
114+
'hydroDatapath' : None, # '/full/path/to/hydroData',
108115
'FFfilename' : 'Model_FFarm.fstf',
109116

110117
# TurbSim setups

0 commit comments

Comments
 (0)