From f52bc4b5cfefecd53d71f6c7162b88e03998f934 Mon Sep 17 00:00:00 2001 From: Abhineet Gupta Date: Fri, 14 Jun 2024 11:32:02 -0600 Subject: [PATCH] Read damping from beamdyn input files (#349) * Set types on wrap functions * Update IEA-15 inputs * Update installation instructions -- draft * Change to new AF Coords * Fix IEA15 airfoils again * Try latest setup_fortran action * Add UAStart/End location writing * Try intel-classic compiler * Add developer docs about api changes * Try macos-latest in CI * Add support for reading daming from beamdyn blade files (#328) --------- Co-authored-by: dzalkind Co-authored-by: dzalkind <65573423+dzalkind@users.noreply.github.com> --- Examples/Test_Cases/BAR_10/BAR_10.fst | 2 +- rosco/toolbox/turbine.py | 20 ++++++++++++++++---- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/Examples/Test_Cases/BAR_10/BAR_10.fst b/Examples/Test_Cases/BAR_10/BAR_10.fst index fab2bcdd..6ea59646 100644 --- a/Examples/Test_Cases/BAR_10/BAR_10.fst +++ b/Examples/Test_Cases/BAR_10/BAR_10.fst @@ -10,7 +10,7 @@ True Echo - Echo input data to .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} diff --git a/rosco/toolbox/turbine.py b/rosco/toolbox/turbine.py index 73965285..f7cbb727 100644 --- a/rosco/toolbox/turbine.py +++ b/rosco/toolbox/turbine.py @@ -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() @@ -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