Skip to content
This repository was archived by the owner on Nov 27, 2023. It is now read-only.

Commit a9315c0

Browse files
authored
Merge pull request #65 from ebranlard/f/ff-fixes
Small fastfarm example fixes
2 parents 0c4ea8f + 7e911ac commit a9315c0

File tree

3 files changed

+19
-15
lines changed

3 files changed

+19
-15
lines changed

pyFAST/fastfarm/TurbSimCaseCreation.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ def __init__(self, D, HubHt, Vhub, TI, PLexp, x, y, z=None, zbot=1.0, cmax=5.0,
7777
self.domainSize(zbot=zbot, manual_mode=manual_mode)
7878
# Determine origin
7979
# self.originLoc()
80+
self.ymin = None
81+
self.ymax = None
8082

8183
def Turb(self, D, HubHt, cmax=5.0, fmax=5.0):
8284
"""
@@ -227,8 +229,10 @@ def plotSetup(self, fig=None, ax=None):
227229
# low-res box
228230
# ax.plot([xmin,xmax,xmax,xmin,xmin],
229231
# [ymin,ymin,ymax,ymax,ymin],'--k',lw=2,label='Low')
230-
ax.axhline(self.ymin, ls='--', c='k', lw=2, label='Low')
231-
ax.axhline(self.ymax, ls='--', c='k', lw=2)
232+
if self.ymin is not None:
233+
ax.axhline(self.ymin, ls='--', c='k', lw=2, label='Low')
234+
if self.ymax is not None:
235+
ax.axhline(self.ymax, ls='--', c='k', lw=2)
232236

233237
ax.legend(bbox_to_anchor=(1.05,1.015),frameon=False)
234238
ax.set_xlabel("x-location [m]")

pyFAST/fastfarm/examples/Ex1_TurbSimInputSetup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
# --- Use TurbSim Case Creation class to write a new TurbSim file
3636
Case = TSCaseCreation(D, HubHt, Vhub, TI, PLExp, x=xlocs, y=ylocs, zbot=zbot, cmax=cmax, fmax=fmax, Cmeander=Cmeander)
3737
# Rewrite TurbSim Input File
38-
Case.writeTSFile(OldTSFile, NewTSFile, tmax=5)
38+
Case.writeTSFile(OldTSFile, NewTSFile, tmax=5, turb=1)
3939
print('NOTE: run TurbSim to generate this new BTS file.')
4040

4141
# --- Visualize low extent and turbine positions

pyFAST/fastfarm/examples/Ex3_FFarmCompleteSetup.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,18 @@ def main():
3131
D = 240
3232
zhub = 150
3333
wts = {
34-
0 :{'x':0.0, 'y':0, 'z':0.0, 'D':D, 'zhub':zhub, 'cmax':cmax, 'fmax':fmax, 'Cmeander':Cmeander}},
35-
1 :{'x':1852.0, 'y':0, 'z':0.0, 'D':D, 'zhub':zhub, 'cmax':cmax, 'fmax':fmax, 'Cmeander':Cmeander}},
36-
2 :{'x':3704.0, 'y':0, 'z':0.0, 'D':D, 'zhub':zhub, 'cmax':cmax, 'fmax':fmax, 'Cmeander':Cmeander}},
37-
3 :{'x':5556.0, 'y':0, 'z':0.0, 'D':D, 'zhub':zhub, 'cmax':cmax, 'fmax':fmax, 'Cmeander':Cmeander}},
38-
4 :{'x':7408.0, 'y':0, 'z':0.0, 'D':D, 'zhub':zhub, 'cmax':cmax, 'fmax':fmax, 'Cmeander':Cmeander}},
39-
5 :{'x':1852.0, 'y':1852.0, 'z':0.0, 'D':D, 'zhub':zhub, 'cmax':cmax, 'fmax':fmax, 'Cmeander':Cmeander}},
40-
6 :{'x':3704.0, 'y':1852.0, 'z':0.0, 'D':D, 'zhub':zhub, 'cmax':cmax, 'fmax':fmax, 'Cmeander':Cmeander}},
41-
7 :{'x':5556.0, 'y':1852.0, 'z':0.0, 'D':D, 'zhub':zhub, 'cmax':cmax, 'fmax':fmax, 'Cmeander':Cmeander}},
42-
8 :{'x':7408.0, 'y':1852.0, 'z':0.0, 'D':D, 'zhub':zhub, 'cmax':cmax, 'fmax':fmax, 'Cmeander':Cmeander}},
43-
9 :{'x':3704.0, 'y':3704.0, 'z':0.0, 'D':D, 'zhub':zhub, 'cmax':cmax, 'fmax':fmax, 'Cmeander':Cmeander}},
44-
10:{'x':5556.0, 'y':3704.0, 'z':0.0, 'D':D, 'zhub':zhub, 'cmax':cmax, 'fmax':fmax, 'Cmeander':Cmeander}},
45-
11:{'x':7408.0, 'y':3704.0, 'z':0.0, 'D':D, 'zhub':zhub, 'cmax':cmax, 'fmax':fmax, 'Cmeander':Cmeander}},
34+
0 :{'x':0.0, 'y':0, 'z':0.0, 'D':D, 'zhub':zhub, 'cmax':cmax, 'fmax':fmax, 'Cmeander':Cmeander},
35+
1 :{'x':1852.0, 'y':0, 'z':0.0, 'D':D, 'zhub':zhub, 'cmax':cmax, 'fmax':fmax, 'Cmeander':Cmeander},
36+
2 :{'x':3704.0, 'y':0, 'z':0.0, 'D':D, 'zhub':zhub, 'cmax':cmax, 'fmax':fmax, 'Cmeander':Cmeander},
37+
3 :{'x':5556.0, 'y':0, 'z':0.0, 'D':D, 'zhub':zhub, 'cmax':cmax, 'fmax':fmax, 'Cmeander':Cmeander},
38+
4 :{'x':7408.0, 'y':0, 'z':0.0, 'D':D, 'zhub':zhub, 'cmax':cmax, 'fmax':fmax, 'Cmeander':Cmeander},
39+
5 :{'x':1852.0, 'y':1852.0, 'z':0.0, 'D':D, 'zhub':zhub, 'cmax':cmax, 'fmax':fmax, 'Cmeander':Cmeander},
40+
6 :{'x':3704.0, 'y':1852.0, 'z':0.0, 'D':D, 'zhub':zhub, 'cmax':cmax, 'fmax':fmax, 'Cmeander':Cmeander},
41+
7 :{'x':5556.0, 'y':1852.0, 'z':0.0, 'D':D, 'zhub':zhub, 'cmax':cmax, 'fmax':fmax, 'Cmeander':Cmeander},
42+
8 :{'x':7408.0, 'y':1852.0, 'z':0.0, 'D':D, 'zhub':zhub, 'cmax':cmax, 'fmax':fmax, 'Cmeander':Cmeander},
43+
9 :{'x':3704.0, 'y':3704.0, 'z':0.0, 'D':D, 'zhub':zhub, 'cmax':cmax, 'fmax':fmax, 'Cmeander':Cmeander},
44+
10:{'x':5556.0, 'y':3704.0, 'z':0.0, 'D':D, 'zhub':zhub, 'cmax':cmax, 'fmax':fmax, 'Cmeander':Cmeander},
45+
11:{'x':7408.0, 'y':3704.0, 'z':0.0, 'D':D, 'zhub':zhub, 'cmax':cmax, 'fmax':fmax, 'Cmeander':Cmeander},
4646
}
4747
refTurb_rot = 0
4848

0 commit comments

Comments
 (0)