FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
BodyFlowInteraction Class Reference

Public Member Functions

 BodyFlowInteraction (ISimObjectCreator *creator)
 
void FinalSetup (const std::string &objectName, double waterDensity, ISimObjectCreator *creator)
 
bool CastsWake () const
 True with CastWake and an Environment, after FinalSetup.
 
const environment::wake::LumpedWakeCaster * WakeCaster () const
 The wake caster; null without CastWake or before FinalSetup.
 
void PreOdeFcn (double T, const double *X, const double position[3], const environment::wake::WakeCastingObject &body)
 
void WaterVelocity (double T, const double position[3], double velocity[3]) const
 
double Submergence (double T, const double position[3], double halfExtent) const
 
void WaveAcceleration (double T, const double position[3], double acceleration[3]) const
 
environment::EnvironmentProvider * Environment () const
 The Environment; null before FinalSetup, and after it only if it was reported missing.
 

Constructor & Destructor Documentation

◆ BodyFlowInteraction()

BodyFlowInteraction::BodyFlowInteraction ( ISimObjectCreator *  creator)
explicit

Reads the wake parameters.

Parameters
creatorThe creator of the owning SimObject.

Member Function Documentation

◆ FinalSetup()

void BodyFlowInteraction::FinalSetup ( const std::string &  objectName,
double  waterDensity,
ISimObjectCreator *  creator 
)

Finds the Environment and, with CastWake, registers the body's lumped wake in it.

Parameters
objectNameThe name of the owning SimObject.
waterDensityThe water density the body's drag is set at [kg/m³].
creatorThe creator of the owning SimObject; also the log of the wake caster.

◆ PreOdeFcn()

void BodyFlowInteraction::PreOdeFcn ( double  T,
const double *  X,
const double  position[3],
const environment::wake::WakeCastingObject &  body 
)

Rebuilds the cast wake when due and takes the other objects' wakes at the body.

Parameters
TSimulation time [s].
XThe state vector of the body.
positionThe body's centre in X [m], NED.
bodyThe owning body, which reads its state and load for the wake.

◆ Submergence()

double BodyFlowInteraction::Submergence ( double  T,
const double  position[3],
double  halfExtent 
) const

The submergence z + eta of a point against the wave surface, gated by MaxWaveElevation (R66).

Parameters
TSimulation time [s].
positionThe body's centre [m], NED.
halfExtentThe body's half extent in the vertical [m].
Returns
Submergence [m].

◆ WaterVelocity()

void BodyFlowInteraction::WaterVelocity ( double  T,
const double  position[3],
double  velocity[3] 
) const

The water velocity at a point, the body's own wake excluded.

Parameters
[in]TSimulation time [s].
[in]positionPoint [m], NED.
[out]velocityWaked current plus wave particle velocity [m/s], NED.

◆ WaveAcceleration()

void BodyFlowInteraction::WaveAcceleration ( double  T,
const double  position[3],
double  acceleration[3] 
) const

The wave particle acceleration at a point; zero without waves.

Parameters
[in]TSimulation time [s].
[in]positionPoint [m], NED.
[out]acceleration[m/s²], NED.

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