Skip to content

Commit

Permalink
Merge pull request #138 from WISDEM/aerocenter_AD15
Browse files Browse the repository at this point in the history
Aerocenter ad15
  • Loading branch information
gbarter authored Jul 21, 2021
2 parents 4bab139 + 8576f2a commit 475f220
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions weis/aeroelasticse/openmdao_openfast.py
Original file line number Diff line number Diff line change
Expand Up @@ -830,9 +830,10 @@ def update_FAST_model(self, fst_vt, inputs, discrete_inputs):
r[-1] = inputs['Rtip']-inputs['Rhub']
fst_vt['AeroDynBlade']['NumBlNds'] = self.n_span
fst_vt['AeroDynBlade']['BlSpn'] = r
fst_vt['AeroDynBlade']['BlCrvAC'] = inputs['ref_axis_blade'][:,0]
fst_vt['AeroDynBlade']['BlSwpAC'] = inputs['ref_axis_blade'][:,1]
fst_vt['AeroDynBlade']['BlCrvAng'] = np.degrees(np.arcsin(np.gradient(inputs['ref_axis_blade'][:,0])/np.gradient(r)))
BlCrvAC, BlSwpAC = self.get_ac_axis(inputs)
fst_vt['AeroDynBlade']['BlCrvAC'] = BlCrvAC
fst_vt['AeroDynBlade']['BlSwpAC'] = BlSwpAC
fst_vt['AeroDynBlade']['BlCrvAng'] = np.degrees(np.arcsin(np.gradient(BlCrvAC)/np.gradient(r)))
fst_vt['AeroDynBlade']['BlTwist'] = inputs['theta']
fst_vt['AeroDynBlade']['BlChord'] = inputs['chord']
fst_vt['AeroDynBlade']['BlAFID'] = np.asarray(range(1,self.n_span+1))
Expand Down Expand Up @@ -1933,6 +1934,18 @@ def get_floating_measures(self,sum_stats,inputs, discrete_inputs, outputs, discr

return outputs, discrete_outputs

def get_ac_axis(self, inputs):

# Get the absolute offset between pitch axis (rotation center) and aerodynamic center
ch_offset = inputs['chord'] * (inputs['ac'] - inputs['le_location'])
# Rotate it by the twist using the AD15 coordinate system
x , y = util.rotate(0., 0., 0., ch_offset, -np.deg2rad(inputs['theta']))
# Apply offset to determine the AC axis
BlCrvAC = inputs['ref_axis_blade'][:,0] + x
BlSwpAC = inputs['ref_axis_blade'][:,1] + y

return BlCrvAC, BlSwpAC


def write_FAST(self, fst_vt, discrete_outputs):
writer = InputWriter_OpenFAST()
Expand Down

0 comments on commit 475f220

Please sign in to comment.