Virtual Testbed
Ship dynamics simulator for extreme conditions
|
System of ordinary differential equations of translational and angular ship motion. More...
#include <ship_motion_solver.hh>
Public Types | |
using | value_type = T |
using | vec2 = blitz::TinyVector< T, 2 > |
using | vec3 = blitz::TinyVector< T, 3 > |
using | ship_type = Ship< T > |
using | panel_type = Ship_hull_panel< T, 3 > |
using | panel_array = std::vector< panel_type > |
using | state_vector_type = typename ship_type::state_vector_type |
using | variables_type = typename ship_type::variables_type |
using | basis_type = typename ship_type::basis_type |
using | rotation_matrix_type = typename ship_type::rotation_matrix_type |
using | quaternion_type = typename ship_type::quaternion_type |
using | waterline_type = vtb::geometry::Polyline< T, 3 > |
Public Member Functions | |
Ship_motion_equation (const rotation_matrix_type &inertia_matrix) | |
void | solve (T t, const state_vector_type &v, state_vector_type &dv) |
variables_type | operator() (T t, const variables_type &vars) |
state_vector_type | operator() (T t, const state_vector_type &vars) |
const rotation_matrix_type & | inertia_matrix () const |
void | inertia_matrix (const rotation_matrix_type &rhs) |
void | gravity_force (const vec3 &rhs) |
void | total_force (const vec3 &rhs) |
void | total_torque (const vec3 &rhs) |
void | damping (const vec3 &rhs) |
const vec3 & | damping () const |
T | displacement () const |
const vec3 & | total_force () const |
const vec3 & | total_torque () const |
const vec3 & | centre_of_gravity () const |
const vec3 & | centre_of_buoyancy () const |
const vec3 & | centre_of_floatation () const |
const vec3 & | centre_of_wind () const |
void | calc_forces_and_torques (const ship_type &ship, const panel_array &wetted_panels, const panel_array &dry_panels, const waterline_type &waterline) |
void | clear () |
System of ordinary differential equations of translational and angular ship motion.
\[ \frac{d}{dt}\left[ \begin{array}{c} \vec{x}(t)\\ q(t)\\ \vec{P}(t)\\ \vec{L}(t) \end{array} \right] = \left[ \begin{array}{c} \vec{v}(t)\\ \frac{1}{2}\vec\omega(t)q(t)\\ \vec{F}(t)\\ \vec\tau(t) \end{array} \right]. \]
Here \(\vec{x}\) is ship position, \(q\) is ship orientation in quaternion form, \(\vec{P}\) is linear momentum, \(\vec{L}\) is angular momentum, \(\vec{F}\) is a vector of external forces, \(\vec\tau\) is a vector of external force moments, \(\vec\omega\) is angular velocity. Formulae for auxiliary physical quantities:\[ \vec{P}(t) = m\vec{v}(t) \qquad \vec{L}(t) = I(t)\vec\omega(t) \qquad I(t) = R(q(t)) \, I_{\text{body}} \, R(q(t))^{T} \]
Definition at line 59 of file ship_motion_solver.hh.