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

Read damping from beamdyn input files #349

Merged
merged 13 commits into from
Jun 14, 2024
2 changes: 1 addition & 1 deletion Examples/Test_Cases/BAR_10/BAR_10.fst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ True Echo - Echo input data to <RootName>.ech (flag)
99999.0 DT_UJac - Time between calls to get Jacobians (s)
1000000.0 UJacSclFact - Scaling factor used in Jacobians (-)
---------------------- FEATURE SWITCHES AND FLAGS ------------------------------
1 CompElast - Compute structural dynamics (switch) {1=ElastoDyn; 2=ElastoDyn + BeamDyn for blades}
2 CompElast - Compute structural dynamics (switch) {1=ElastoDyn; 2=ElastoDyn + BeamDyn for blades}
1 CompInflow - Compute inflow wind velocities (switch) {0=still air; 1=InflowWind; 2=external from OpenFOAM}
2 CompAero - Compute aerodynamic loads (switch) {0=None; 1=AeroDyn v14; 2=AeroDyn v15}
1 CompServo - Compute control and electrical-drive dynamics (switch) {0=None; 1=ServoDyn}
Expand Down
20 changes: 16 additions & 4 deletions rosco/toolbox/turbine.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,18 @@ def load_from_fast(

# file
ed_file = os.path.join(fast.FAST_directory, fast.fst_vt['Fst']['EDFile'])

fast.read_ElastoDyn(ed_file)
ed_blade_file = os.path.join(os.path.dirname(ed_file), fast.fst_vt['ElastoDyn']['BldFile1'])
fast.read_ElastoDynBlade(ed_blade_file)

if fast.fst_vt['Fst']['CompElast'] ==1:
fast.read_ElastoDynBlade(ed_blade_file)
elif fast.fst_vt['Fst']['CompElast'] ==2:
bd_file = os.path.join(fast.FAST_directory, fast.fst_vt['Fst']['BDBldFile(1)'])
fast.read_BeamDyn(bd_file)
bd_blade_file = os.path.join(os.path.dirname(bd_file), fast.fst_vt['BeamDyn']['BldFile'])
fast.read_BeamDynBlade(bd_blade_file)
else:
Warning('No ElastoDyn or BeamDyn files were provided')

fast.read_AeroDyn15()

Expand Down Expand Up @@ -588,8 +596,12 @@ def load_blade_info(self):
self.span = r
self.chord = chord
self.twist = theta
self.bld_flapwise_damp = self.fast.fst_vt['ElastoDynBlade']['BldFlDmp1']/100


if self.fast.fst_vt['Fst']['CompElast'] ==1:
self.bld_flapwise_damp = self.fast.fst_vt['ElastoDynBlade']['BldFlDmp1']/100
elif self.fast.fst_vt['Fst']['CompElast'] ==2:
self.bld_flapwise_damp = self.fast.fst_vt['BeamDynBlade']['mu5']

class RotorPerformance():
'''
Class RotorPerformance used to find details from rotor performance
Expand Down
Loading