FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
CenterWeight Class Reference
+ Inheritance diagram for CenterWeight:
+ Collaboration diagram for CenterWeight:

Public Member Functions

 CenterWeight (std::string simObjectName, ISimObjectCreator *creator)
 
virtual void OdeFcn (const double dT, const double *const adX, double *const adXDot) const
 Calculates the state derivatives.
 
void FinalSetup (const double dT, const double *const adX, ISimObjectCreator *const creator)
 
void PreOdeFcn (double T, const double *X, IStateUpdater *updater) override
 Rebuilds the weight's wake when due and takes the other objects' wakes at the weight.
 
virtual const double * Position (const double dT, const double *const adX)
 
virtual const double * Velocity (const double dT, const double *const adX)
 
Jacobian support for implicit integration

Partial analytical Jacobian. Bottom forces, input-port forces and the spatial gradient of the water velocity (wakes included) are excluded (treated as frozen inputs). Test with relTol ≥ 1e-2 to accommodate those omissions.

bool HasJacobians () const override
 
void OdeJacobian (double T, const double *X, double *J, int nStates) override
 
int GetJacobianSparsity (int nStates, int *rowPtr, int *colIdx) override
 
bool HasPortJacobians () const override
 
void InputPortJacobian (const std::string &portName, double T, const double *X, double *dF_dInput, int portSize, int nStates) override
 

Protected Member Functions

void waterVelocity (double T, const double *X, double velocity[3]) const
 The water velocity at the weight: the BodyWake's, without the weight's own wake.
 

Protected Attributes

ISignalPort * m_inForce1
 A pointer to the input force 1.
 
ISignalPort * m_inForce2
 A pointer to the input force 2.
 
ISignalPort * m_inForce3
 A pointer to the input force 3.
 
int m_IStatePos
 The index of the position state.
 
int m_IStateVel
 The index of the velocity state.
 
double m_mass
 
double m_density
 
double m_visualizationScale
 
double m_radius
 
double m_weight
 
double m_rhoWater
 The water density Rho [kg/m^3].
 
environment::sphere_hydro::Sphere m_sphere
 ρ, D = 2 r and C_d of the drag.
 
std::optional< environment::sphere_hydro::SphereCaster > m_caster
 The sphere on its states, for the wake.
 
environment::wake::BodyWakeSettings m_wakeSettings
 The wake parameters.
 
std::unique_ptr< environment::wake::BodyWake > m_wake
 The wake the weight casts and receives, from FinalSetup.
 
environment::EnvironmentProvider * m_environment
 
environment::SeafloorForcesInterface * m_seafloor
 

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