Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-platt committed Jan 14, 2025
2 parents fa0d603 + ed7d9dd commit f559029
Show file tree
Hide file tree
Showing 6 changed files with 485 additions and 252 deletions.
508 changes: 332 additions & 176 deletions openfast_toolbox/fastfarm/AMRWindSimulation.py

Large diffs are not rendered by default.

208 changes: 142 additions & 66 deletions openfast_toolbox/fastfarm/FASTFarmCaseCreation.py

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions openfast_toolbox/fastfarm/examples/Ex1_TurbSimInputSetup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
MyDir=os.path.dirname(__file__)

# --- Define parameters necessary for this script
OldTSFile = os.path.join(MyDir, 'SampleFiles/TestCase.inp' ) # Template file used for TurbSim, need to exist
NewTSFile = os.path.join(MyDir, 'SampleFiles/_TestCase_mod.inp') # New file that will be written
OldTSFile = os.path.join(MyDir, 'SampleFiles', 'TestCase.inp' ) # Template file used for TurbSim, need to exist
NewTSFile = os.path.join(MyDir, 'SampleFiles', '_TestCase_mod.inp') # New file that will be written
D = 77.0 # Turbine diameter (m)
HubHt = 78.045 # Hub Height (m)
Vhub = 6 # mean wind speed at hub height (m/s)
Expand Down
6 changes: 3 additions & 3 deletions openfast_toolbox/fastfarm/examples/Ex2_FFarmInputSetup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@

if __name__ == '__main__':
# --- FAST Farm input files
templateFSTF = os.path.join(MyDir,'SampleFiles/TestCase.fstf') # template file used for FastFarm input file, need to exist
outputFSTF = os.path.join(MyDir,'SampleFiles/_TestCase_mod.fstf')# new file that will be written
templateFSTF = os.path.join(MyDir,'SampleFiles', 'TestCase.fstf') # template file used for FastFarm input file, need to exist
outputFSTF = os.path.join(MyDir,'SampleFiles', '_TestCase_mod.fstf')# new file that will be written
# --- Parameters for TurbSim Extent
D = 77.0 # Turbine diameter (m)
hubHeight = 78.045 # Hub Height (m)
extent_X_high = 1.2 # x-extent of high res box in diamter around turbine location
extent_YZ_high = 1.2 # y-extent of high res box in diamter around turbine location
chord_max = 5 # maximum blade chord (m). Turbine specific.
Cmeander = 1.9 # Meandering constant (-)
BTSFilename = os.path.join(MyDir,'SampleFiles/TestCase.bts') # TurbSim Box to be used in FAST.Farm simulation, need to exist.
BTSFilename = os.path.join(MyDir,'SampleFiles', 'TestCase.bts') # TurbSim Box to be used in FAST.Farm simulation, need to exist.
# --- Layout
xWT = [0.0, 265.] # x positions of turbines
yWT = [0.0, 50.0] # y postitions of turbines
Expand Down
10 changes: 5 additions & 5 deletions openfast_toolbox/fastfarm/examples/Ex3_FFarmCompleteSetup.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def main():

# ----------- Turbine parameters
# Set the yaw of each turbine for wind dir. One row for each wind direction.
yaw_init = [ [0,0,0,0,0,0,0,0,0,0,0,0] ]
yaw_init = None

# ----------- Low- and high-res boxes parameters
# Should match LES if comparisons are to be made; otherwise, set desired values
Expand All @@ -87,7 +87,7 @@ def main():
# ----------- Template files
templatePath = '/full/path/where/template/files/are'

# Put 'unused' to any input that is not applicable to your case
# Put None on any input that is not applicable to your case
# Files should be in templatePath
EDfilename = 'ElastoDyn.T'
SEDfilename = 'SimplifiedElastoDyn.T'
Expand All @@ -97,7 +97,7 @@ def main():
ADskfilename = 'AeroDisk.dat'
SubDfilename = 'SubDyn.dat'
IWfilename = 'InflowWind.dat'
BDfilepath = 'unused'
BDfilepath = None
bladefilename = 'Blade.dat'
towerfilename = 'Tower.dat'
turbfilename = 'Model.T'
Expand Down Expand Up @@ -125,8 +125,8 @@ def main():
case = FFCaseCreation(path, wts, tmax, zbot, vhub, shear, TIvalue, inflow_deg,
dt_high_les, ds_high_les, extent_high,
dt_low_les, ds_low_les, extent_low,
ffbin, mod_wake, yaw_init,
nSeeds=nSeeds, LESpath=LESpath,
ffbin=ffbin, mod_wake=mod_wake, yaw_init=yaw_init,
nSeeds=nSeeds, LESpath=LESpath, refTurb_rot=refTurb_rot,
verbose=1)

case.setTemplateFilename(templatePath, EDfilename, SEDfilename, HDfilename, SrvDfilename, ADfilename,
Expand Down
1 change: 1 addition & 0 deletions openfast_toolbox/io/rosco_discon_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ def toString(self):
FMTs['{:<4.4f}']=['WE_FOPoles_v']
FMTs['{:<10.8f}']=['WE_FOPoles']
FMTs['{:<10.3f}']=['PS_BldPitchMin']
FMTs['{:<7.0f}']=['PerfTableSize']
fmtFloat='{:<014.5f}'
for fmt,keys in FMTs.items():
if param in keys:
Expand Down

0 comments on commit f559029

Please sign in to comment.