Skip to content

Commit

Permalink
Bug fix of the rotor moments from CCBlade
Browse files Browse the repository at this point in the history
- 'Q' output from CCBlade was in the 'pitch' spot and 'My' output from CCBlade was in the 'roll' spot - these should be flipped

- Also updating the default vapor pressure when calculating cavitation
- Also setting the currentMod = 1 when there is no mooring dictionary in the design dictionary (few cases)
  • Loading branch information
shousner committed Dec 12, 2024
1 parent e52ef2e commit b9467ed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions raft/raft_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def __init__(self, design, nTurbines=1):
self.mooring_currentMod = getFromDict(design['mooring'], 'currentMod', default=0, dtype=int)
else:
self.mooring_currentMod = 0

# Initialize array-level mooring system if it exists
if self.ms:
self.ms.initialize()
Expand Down Expand Up @@ -847,7 +847,7 @@ def step_func_equil(X, args, Y, oths, Ytarget, err, tol_, iter, maxIter):

for i, fowt in enumerate(self.fowtList):
print(f"Found mean offets of FOWT {i+1} with surge = {fowt.Xi0[0]: .2f} m, sway = {fowt.Xi0[1]: .2f}, and heave = {fowt.Xi0[2]: .2f} m")
print(f" roll = {fowt.Xi0[3]*180/np.pi: .2f} deg, pitch = {fowt.Xi0[4]*180/np.pi: .2f}, and yaw = {fowt.Xi0[5]*180/np.pi: .2f} deg")
print(f" roll = {fowt.Xi0[3]*180/np.pi: .2f} deg, pitch = {fowt.Xi0[4]*180/np.pi: .2f} deg, and yaw = {fowt.Xi0[5]*180/np.pi: .2f} deg")


#dsolvePlot(info) # plot solver convergence trajectories
Expand Down
4 changes: 2 additions & 2 deletions raft/raft_rotor.py
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ def calcHydroConstants(self, dgamma=0, rho=1025, g=9.81):
return A_hydro, I_hydro


def calcCavitation(self, case, azimuth=0, clearance_margin=1.0, Patm=101325, Pvap=2500, error_on_cavitation=False):
def calcCavitation(self, case, azimuth=0, clearance_margin=1.0, Patm=101325, Pvap=2300, error_on_cavitation=False):
''' Method to calculate the cavitation number of the rotor
(wind speed (m/s), rotor speed (RPM), pitch angle (deg), azimuth (deg))
Expand Down Expand Up @@ -838,7 +838,7 @@ def calcAero(self, case, current=False, display=0):
# Set up vectors in axis frame. Assuming CCBlade forces (but not
# moments) are relative to the rotor axis
forces_axis = np.array([loads["T"][0], loads["Y"][0], loads["Z" ][0]])
moments_axis = np.array([loads["My"][0], loads["Q"][0], loads["Mz"][0]])
moments_axis = np.array([loads["Q"][0], loads["My"][0], loads["Mz"][0]])

# Rotate forces and moments to be relative to global orientation (but still wrt hub)
self.f0[:3] = np.matmul(self.R_q, forces_axis)
Expand Down

0 comments on commit b9467ed

Please sign in to comment.