include mooring yaw stiffness
@@ -388,6 +388,9 @@ class FloatingForces(generator_interface.BaseGenerator):
# Mooring lines
cga = struct_tstep.cga()
+ ielem, inode_in_elem = data.structure.node_master_elem[self.mooring_node]
+ cab = algebra.crv2rotation(struct_tstep.psi[ielem, inode_in_elem])
+ cbg = np.dot(cab.T, cga.T)
for imoor in range(self.n_mooring_lines):
fairlead_pos_G = np.dot(cga, self.fairlead_pos_A[imoor, :])
fl_to_anchor_G = self.anchor_pos[imoor, :] - fairlead_pos_G
@@ -415,20 +418,21 @@ class FloatingForces(generator_interface.BaseGenerator):
force_cl[0:3] = force_fl
force_cl[3:6] = np.cross(fairlead_pos_G, force_fl)
- ielem, inode_in_elem = data.structure.node_master_elem[self.mooring_node]
- cab = algebra.crv2rotation(struct_tstep.psi[ielem, inode_in_elem])
- cbg = np.dot(cab.T, cga.T)
-
struct_tstep.applied_forces[self.mooring_node, 0:3] += np.dot(cbg, force_cl[0:3])
struct_tstep.applied_forces[self.mooring_node, 3:6] += np.dot(cbg, force_cl[3:6])
+ # Yaw moment generated by the mooring system
+ yaw = algebra.quat2euler(struct_tstpe.quat)[0]
+ struct_tstep.applied_forces[self.mooring_node, 3:6] += np.dot(cbg,
+ self.settings['mooring_yaw_spring_stif']*yaw)
+
# Hydrodynamic model
q = np.zeros((6,), dtype=int)
q[0:3] = (np.dot(cga, struct_tstep.pos[self.cob_node, :]) -
np.dot(data.structure.ini_info.cga, data.structure.ini_info.pos[self.cob_node, :]) +
struct_tstep.for_pos[0:3] -
data.structure.ini_info.for_pos[0:3])
- q[3:6] = algebra.quat2euler(struct_tstpe.quat) # roll, pitch, yaw
+ q[3:6] = algebra.quat2euler(struct_tstpe.quat)
hd_forces_g = self.buoy_F0 + np.dot(self.buoy_rest_mat, q)
ielem, inode_in_elem = data.structure.node_master_elem[self.cob_node]
