include force coeff in other forces
@@ -811,7 +811,7 @@ class FloatingForces(generator_interface.BaseGenerator):
horizontal_unit_vec = algebra.unit_vector(fl_to_anchor_G)
horizontal_unit_vec[0] = 0.
horizontal_unit_vec = algebra.unit_vector(horizontal_unit_vec)
- force_fl = hf*horizontal_unit_vec + vf*np.array([-1., 0., 0.])
+ force_fl = force_coeff*hf*horizontal_unit_vec + vf*np.array([-1., 0., 0.])
# Move the forces to the mooring node
force_cl = np.zeros((6,))
@@ -826,12 +826,12 @@ class FloatingForces(generator_interface.BaseGenerator):
# Yaw moment generated by the mooring system
yaw = np.array([self.q[data.ts, 3], 0., 0.])
- mooring_yaw = -self.floating_data['mooring']['yaw_spring_stif']*yaw
+ mooring_yaw = -force_coeff*self.floating_data['mooring']['yaw_spring_stif']*yaw
struct_tstep.runtime_generated_forces[self.mooring_node, 3:6] += np.dot(cbg,
mooring_yaw)
# Hydrostatic model
- hs_f_g = self.buoy_F0 - np.dot(self.buoy_rest_mat, self.q[data.ts, :])
+ hs_f_g = self.buoy_F0 - force_coeff*np.dot(self.buoy_rest_mat, self.q[data.ts, :])
if not force_coeff == 0.:
hd_f_qdot_g = -np.dot(self.floating_data['hydrodynamics']['additional_damping'], self.qdot[data.ts, :])
@@ -858,6 +858,11 @@ class FloatingForces(generator_interface.BaseGenerator):
else:
cout.cout_wrap(("ERROR: Unknown method_matrices_freq %s" % self.settings['method_matrices_freq']), 4)
+ else:
+ hd_f_qdot_g = np.zeros((6))
+ hd_f_qdotdot_g = np.zeros((6))
+ hd_correct_grav = np.zeros((6))
+
# Correct gravity forces if needed
if self.added_mass_in_mass_matrix:
# Correct unreal gravity forces from added mass
@@ -868,11 +873,6 @@ class FloatingForces(generator_interface.BaseGenerator):
else:
hd_correct_grav = np.zeros((6))
- else:
- hd_f_qdot_g = np.zeros((6))
- hd_f_qdotdot_g = np.zeros((6))
- hd_correct_grav = np.zeros((6))
-
ielem, inode_in_elem = data.structure.node_master_elem[self.buoyancy_node]
cab = algebra.crv2rotation(struct_tstep.psi[ielem, inode_in_elem])
cbg = np.dot(cab.T, cga.T)
@@ -906,7 +906,7 @@ class FloatingForces(generator_interface.BaseGenerator):
self.floating_data['hydrodynamics']['spar_diameter']*
self.cd)
- struct_tstep.runtime_generated_forces[inode, 0:3] += np.dot(cbg, drag_force)
+ struct_tstep.runtime_generated_forces[inode, 0:3] += np.dot(cbg, force_coeff*drag_force)
# Wave loading
ielem, inode_in_elem = data.structure.node_master_elem[self.wave_forces_node]
