FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
rigidbody::CRigidBody Class Referenceabstract
+ Inheritance diagram for rigidbody::CRigidBody:

Public Member Functions

virtual vec6 GetInternalForces (const vec6 &dX, const vec3 &r, const quat &q, environment::EnvironmentProvider *environment, double time, const double *states)=0
 
virtual mat64 GetGravityForceDerivative (const quat &q)=0
 
virtual mat6 GetInertiaMatrix (const vec3 &r, double time, const double *states, environment::EnvironmentProvider *environment)=0
 
vec13 GetSecondDerivative (const vec3 &r, const quat &q, const vec3 &v, const vec3 w, const vec6 &externalForces, environment::EnvironmentProvider *environment, double time, const double *states)
 
mat13 GetSecondDerivativeJacobian (const vec3 &r, const quat &q, const vec3 &v, const vec3 &w, const vec6 &externalForces, environment::EnvironmentProvider *environment, double time, const double *states)
 
void WriteStateJacobian (const double *X, int positionIndex, int quaterIndex, int velocityIndex, int omegaIndex, const vec6 &externalForces, environment::EnvironmentProvider *environment, double time, double *J, int nStates)
 

Static Public Member Functions

static vec6 GetCoriolisForce (const vec6 &dX, const mat6 &Inertia)
 
static mat6 GetCoriolisForceDerivative (const vec6 &dX, const mat6 &Inertia)
 d(GetCoriolisForce)/d(dX) at a fixed inertia matrix, bodylocal.
 
static mat6 ReorientInertiaTranslateRotate (const mat6 &Inertia, const vec6 &orientation)
 
static mat3 MakeDyadic (const vec3 &vector)
 
static mat34 RotationDerivative (const quat &q, const vec3 &x)
 
static mat34 ConjugateRotationDerivative (const quat &q, const vec3 &x)
 
static mat3 GetRotation (const vec3 &angle)
 
static mat6 GetRotation6 (const vec3 &angle)
 

Member Function Documentation

◆ GetGravityForceDerivative()

virtual mat64 rigidbody::CRigidBody::GetGravityForceDerivative ( const quat &  q)
pure virtual

d(gravity part of GetInternalForces)/dq, over (q.w, q.x, q.y, q.z).

q: global; return: bodylocal. The other internal forces (drag, soil) have no derivative here.

Implemented in rigidbody::CRigidCompositeBody, rigidbody::CRigidCylinder, and rigidbody::CRigidPolyplate.

◆ GetSecondDerivativeJacobian()

mat13 rigidbody::CRigidBody::GetSecondDerivativeJacobian ( const vec3 &  r,
const quat &  q,
const vec3 &  v,
const vec3 &  w,
const vec6 &  externalForces,
environment::EnvironmentProvider *  environment,
double  time,
const double *  states 
)

Jacobian of GetSecondDerivative with respect to (r, q, v, w), in the order of its result.

Exact for the kinematics, the quaternion dynamics, the inertia and Coriolis terms, the rotation of externalForces and gravity, also where |q| != 1. It omits the derivatives of the other internal forces (hydrodynamic drag, soil) and of the inertia matrix (added mass through the water density at r): both are held fixed in the body frame. The result is therefore exact only out of the water.

◆ WriteStateJacobian()

void rigidbody::CRigidBody::WriteStateJacobian ( const double *  X,
int  positionIndex,
int  quaterIndex,
int  velocityIndex,
int  omegaIndex,
const vec6 &  externalForces,
environment::EnvironmentProvider *  environment,
double  time,
double *  J,
int  nStates 
)

Writes GetSecondDerivativeJacobian into the row-major Jacobian J of a SimObject whose state vector X holds r, q, v and w at the given indices (all local to X and J).


The documentation for this class was generated from the following file: