Skip to content

Commit f4acbd2

Browse files
committed
Merge branch 'rc1.3.2' into dev
This included updating true values of tests that were affected by bug fixes in rc1.3.2 but which were not included in that branch (e.g. tests with lumped mass moorings using the VolturnUS semi)
2 parents 6b227e6 + 7835e39 commit f4acbd2

22 files changed

+116
-108
lines changed

examples/VolturnUS-S_example.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ cases:
2727

2828
turbine:
2929

30-
mRNA : 991000 # [kg] RNA mass
30+
mRNA : 1001505.907 # [kg] RNA mass: m_blades = 3*68076.969 = 204230.907 kg (from ED.sum), m_yawbearing = 100000 kg, m_hub = 190000 kg, m_nacelle = 507275 kg
3131
IxRNA : 0 # [kg-m2] RNA moment of inertia about local x axis (assumed to be identical to rotor axis for now, as approx) [kg-m^2]
3232
IrRNA : 0 # [kg-m2] RNA moment of inertia about local y or z axes [kg-m^2]
33-
xCG_RNA : 0 # [m] x location of RNA center of mass [m] (Actual is ~= -0.27 m)
33+
xCG_RNA : -7.27 # [m] x location of RNA center of mass [m]: xg_blades = -13.0 m, xg_hub = -11.0 m, xg_nac = -4.99 m, xg_yaw = 0.0 m
3434
hHub : 150.0 # [m] hub height above water line [m]
3535
#rRNA : [0,0, 148.742] # [m] Can use the position of the RNA reference point (which the RNA yaws about) with respect to the FOWT reference point. If also providing hHub, the z coord be overwritten.
3636
Fthrust : 1500.0E3 # [N] temporary thrust force to use

raft/omdao_raft.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ def compute(self, inputs, outputs, discrete_inputs, discrete_outputs):
600600
ring_spacing = inputs[m_name+'ring_spacing']
601601
n_stiff = 0 if ring_spacing == 0.0 else int(np.floor(s_height / ring_spacing))
602602
s_ring = (np.arange(1, n_stiff + 0.1) - 0.5) * (ring_spacing / s_height)
603-
if s_ring:
603+
if np.any(s_ring):
604604
if not m_shape == 'rect':
605605
d_ring = np.interp(s_ring, s_grid, design['platform']['members'][i]['d'])
606606
else:
@@ -623,7 +623,7 @@ def compute(self, inputs, outputs, discrete_inputs, discrete_outputs):
623623
t_cap = t_cap[:-1]
624624
di_cap = di_cap[:-1]
625625
# Combine with ring stiffeners
626-
if s_ring:
626+
if np.any(s_ring):
627627
s_cap = np.r_[s_ring, s_cap]
628628
t_cap = np.r_[inputs[m_name+'ring_t']*np.ones(n_stiff), t_cap]
629629
di_cap = np.r_[d_ring-2*inputs[m_name+'ring_h'], di_cap]

raft/raft_fowt.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1583,14 +1583,13 @@ def calcQTF_slenderBody(self, waveHeadInd, Xi0=None, verbose=False, iCase=None,
15831583
f_rslb += - rho*v_i * aux
15841584

15851585

1586-
# ----- axial/end effects ------
1586+
# ----- end effects ------
15871587
# note : v_i and a_i work out to zero for non-tapered sections or non-end sections
1588+
# TODO: Should probably skip this part if along the length of the element, i.e. if a_i and v_i are different from zero due to tapering
15881589
if circ:
15891590
v_i = np.pi/12.0 * abs((mem.ds[il]+mem.drs[il])**3 - (mem.ds[il]-mem.drs[il])**3) # volume assigned to this end surface
1590-
a_i = np.pi*mem.ds[il] * mem.drs[il] # signed end area (positive facing down) = mean diameter of strip * radius change of strip
15911591
else:
15921592
v_i = np.pi/12.0 * ((np.mean(mem.ds[il]+mem.drs[il]))**3 - (np.mean(mem.ds[il]-mem.drs[il]))**3) # so far just using sphere eqn and taking mean of side lengths as d
1593-
a_i = (mem.ds[il,0]+mem.drs[il,0])*(mem.ds[il,1]+mem.drs[il,1]) - (mem.ds[il,0]-mem.drs[il,0])*(mem.ds[il,1]-mem.drs[il,1])
15941593

15951594
f_2ndPot += mem.a_i[il]*p_2nd*mem.q # 2nd order pressure
15961595
f_2ndPot += rho*v_i*Ca_End*np.matmul(mem.qMat, acc_2ndPot) # 2nd order axial acceleration
@@ -1601,6 +1600,11 @@ def calcQTF_slenderBody(self, waveHeadInd, Xi0=None, verbose=False, iCase=None,
16011600
p_drop = -2*0.25*0.5*rho*np.dot(np.matmul(mem.p1Mat + mem.p2Mat, u[:,i1, il]-nodeV[:, i1, il]), np.conj(np.matmul(Ca_p1*mem.p1Mat + Ca_p2*mem.p2Mat, u[:,i2, il]-nodeV[:, i2, il])))
16021601
f_conv += mem.a_i[il]*p_drop*mem.q
16031602

1603+
u1_aux = np.matmul(Ca_p1*mem.p1Mat + Ca_p2*mem.p2Mat, u1_aux)
1604+
u2_aux = np.matmul(Ca_p1*mem.p1Mat + Ca_p2*mem.p2Mat, u2_aux)
1605+
f_transv = 0.25*mem.a_i[il]*rho*(np.conj(u1_aux)*nodeV_axial_rel[i2, il] + u2_aux*np.conj(nodeV_axial_rel[i1, il]))
1606+
f_conv += f_transv
1607+
16041608
F_2ndPot += translateForce3to6DOF(f_2ndPot, mem.r[il,:])
16051609
F_conv += translateForce3to6DOF(f_conv, mem.r[il,:])
16061610
F_axdv += translateForce3to6DOF(f_axdv, mem.r[il,:])

raft/raft_model.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,9 @@ def solveStatics(self, case, display=0):
570570

571571
X_initial[6*i:6*i+6] = np.array([fowt.x_ref, fowt.y_ref,0,0,0,0])
572572
fowt.setPosition(X_initial[6*i:6*i+6]) # zero platform offsets
573-
fowt.calcStatics()
573+
if case:
574+
fowt.calcTurbineConstants(case, ptfm_pitch=0) # for turbine forces >>> still need to update to use current fowt pose <<<
575+
fowt.calcStatics() # Recompute statics because turbine heading may have changed due to yaw control
574576

575577
if self.staticsMod == 0:
576578
K_hydrostatic.append(fowt.C_struc + fowt.C_hydro)
@@ -586,8 +588,7 @@ def solveStatics(self, case, display=0):
586588
if display > 1:
587589
print('Fowt ' + str(i))
588590
print(case)
589-
590-
fowt.calcTurbineConstants(case, ptfm_pitch=0) # for turbine forces >>> still need to update to use current fowt pose <<<
591+
591592
fowt.calcHydroConstants()
592593
F_env_constant[6*i:6*i+6] = np.sum(fowt.f_aero0, axis=1) + fowt.calcCurrentLoads(case)
593594

@@ -685,6 +686,7 @@ def eval_func_equil(X, args):
685686
case['wind_speed'] = caseorig['wind_speed'][i]
686687

687688
fowt.calcTurbineConstants(case, ptfm_pitch=r6[4]) # for turbine forces >>> still need to update to use current fowt pose <<<
689+
fowt.calcStatics() # Recompute statics because turbine heading may have changed due to yaw control
688690
fowt.calcHydroConstants() # prep for drag force and mean drift
689691

690692
Fnet[6*i:6*i+6] += np.sum(fowt.f_aero0, axis=1) # sum mean turbine force across turbines
@@ -847,7 +849,7 @@ def step_func_equil(X, args, Y, oths, Ytarget, err, tol_, iter, maxIter):
847849

848850
for i, fowt in enumerate(self.fowtList):
849851
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")
850-
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")
852+
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")
851853

852854

853855
#dsolvePlot(info) # plot solver convergence trajectories

raft/raft_rotor.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -391,14 +391,12 @@ def setPosition(self, r6=np.zeros(6), R=None):
391391
# Store platform heading for use with nacelle yaw
392392
self.platform_heading = r6[5]
393393

394-
# Apply nacelle yaw depending on the yaw mode
395-
self.setYaw()
396-
397394
# Update RNA point locations [m] w.r.t. PRP in global orientations
398395
self.r_RRP_rel = np.matmul(self.R_ptfm, self.r_rel) # RNA ref point
399-
self.r_CG_rel = self.r_RRP_rel + self.q*self.xCG_RNA # RNA CG location
400-
self.r_hub_rel = self.r_RRP_rel + self.q*self.overhang # rotor hub location
401-
396+
397+
# Apply nacelle yaw depending on the yaw mode
398+
self.setYaw()
399+
402400
'''
403401
self.r_RRP = ? # RNA reference point
404402
self.r_CG = ? # RNA CG location
@@ -456,6 +454,10 @@ def setYaw(self, yaw=None):
456454
# Compute shaft axis unit vector in FOWT and global frames
457455
self.q_rel = np.matmul(R_q_rel, np.array([1,0,0]) )
458456
self.q = np.matmul(self.R_ptfm, self.q_rel) # Write in the global frame
457+
458+
# Update RNA point locations [m] w.r.t. PRP in global orientations
459+
self.r_CG_rel = self.r_RRP_rel + self.q*self.xCG_RNA # RNA CG location
460+
self.r_hub_rel = self.r_RRP_rel + self.q*self.overhang # rotor hub location
459461

460462
return self.yaw
461463

@@ -636,7 +638,7 @@ def calcHydroConstants(self, dgamma=0, rho=1025, g=9.81):
636638
return A_hydro, I_hydro
637639

638640

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

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

tests/test_data/IEA15MW.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ site:
1414
shearExp : 0.12 # shear exponent
1515

1616
turbine:
17-
mRNA : 991000 # [kg] RNA mass
17+
mRNA : 1001505.907 # [kg] RNA mass: m_blades = 3*68076.969 = 204230.907 kg (from ED.sum), m_yawbearing = 100000 kg, m_hub = 190000 kg, m_nacelle = 507275 kg
1818
IxRNA : 0 # [kg-m2] RNA moment of inertia about local x axis (assumed to be identical to rotor axis for now, as approx) [kg-m^2]
1919
IrRNA : 0 # [kg-m2] RNA moment of inertia about local y or z axes [kg-m^2]
20-
xCG_RNA : 0 # [m] x location of RNA center of mass [m] (Actual is ~= -0.27 m)
20+
xCG_RNA : -7.27 # [m] x location of RNA center of mass [m]: xg_blades = -13.0 m, xg_hub = -11.0 m, xg_nac = -4.99 m, xg_yaw = 0.0 m
2121
hHub : 150.0 # [m] hub height above water line [m]
2222
Fthrust : 1500.0E3 # [N] temporary thrust force to use
2323

1 Byte
Binary file not shown.
1 Byte
Binary file not shown.
1 Byte
Binary file not shown.
1 Byte
Binary file not shown.

0 commit comments

Comments
 (0)