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

Public Member Functions

 TestWakeBody (std::string SimObjectName, ISimObjectCreator *Creator)
 
void FinalSetup (double T, const double *X, ISimObjectCreator *Creator) override
 
void PreOdeFcn (double T, const double *X, IStateUpdater *updater) override
 
void OdeFcn (double T, const double *X, double *XDot) const override
 The position moves at TowVelocity.
 
const double * Position (double T, const double *X)
 Output port Position [m], NED.
 
const double * WaterVelocity (double T, const double *X)
 Output port WaterVelocity [m/s], NED.
 
const double * Force (double T, const double *X)
 Output port Force [N], NED.
 
const environment::wake::LumpedWakeCaster * WakeCaster () const
 The wake caster; null without CastWake or before FinalSetup.
 
environment::wake::WakeCastState Reference (const double *X) const override
 
void CurrentLoad (const double *X, const double freeStream[3], const double flowDir[3], double force[3], double &frontalArea, double rearCentre[3]) const override
 

Constructor & Destructor Documentation

◆ TestWakeBody()

testmodels::TestWakeBody::TestWakeBody ( std::string  SimObjectName,
ISimObjectCreator *  Creator 
)

Reads and checks the parameters and adds the Position state.

Parameters
[in]SimObjectNameUnique name; the wake field is registered under it.
[in]CreatorSupplies the parameters.
Exceptions
std::runtime_erroron an invalid parameter, after reporting it.
std::invalid_argumenton an invalid wake parameter, after reporting it.

Member Function Documentation

◆ FinalSetup()

void testmodels::TestWakeBody::FinalSetup ( double  T,
const double *  X,
ISimObjectCreator *  Creator 
)
override

Gets the Environment and, with CastWake, registers the lumped wake.

Parameters
[in]TSimulation time [s]; not used.
[in]XSimulation state; not used.
[in]CreatorSupplies the shared Environment resource and the log.
Exceptions
std::runtime_errorif the shared Environment resource is missing.

◆ PreOdeFcn()

void testmodels::TestWakeBody::PreOdeFcn ( double  T,
const double *  X,
IStateUpdater *  updater 
)
override

Rebuilds the wake when due.

Parameters
[in]TSimulation time [s].
[in]XSimulation state.
[in]updaterState updater; not used.

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