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

Public Member Functions

 TestWakeCluster (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 positions move 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::BodyWake * Wake () const
 The wakes cast and received; null before FinalSetup.
 
int NumBodies () const override
 
environment::wake::WakeCastState Body (const double *X, int body) const override
 
double BodyRadius (int) const override
 
environment::wake::SourceLoad BodyLoad (const double *X, int body, const double bodyVel[3], const double waterVel[3]) const override
 

Constructor & Destructor Documentation

◆ TestWakeCluster()

testmodels::TestWakeCluster::TestWakeCluster ( 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::TestWakeCluster::FinalSetup ( double  T,
const double *  X,
ISimObjectCreator *  Creator 
)
override

Gets the Environment and registers the wakes.

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::TestWakeCluster::PreOdeFcn ( double  T,
const double *  X,
IStateUpdater *  updater 
)
override

Rebuilds the wakes when due and takes the wakes at the centres.

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

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