FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
environment::wake::detail::PropellerJetCaster Class Reference

#include <PropellerJetCaster.h>

Public Member Functions

 PropellerJetCaster (const std::string &name, const WakeSettings &settings, double rho)
 
void Register (EnvironmentProvider &environment)
 
void Update (double T, const double *X, const PropelledObject &object, ISimObjectLogger &logger)
 
const std::string & Id () const
 The registry id, <name>/jet.
 
std::shared_ptr< const marenv::wake::JetField > Field () const
 The registered jet, for marenv::wake::WakeQuery::excludeJet; null before Register().
 
const marenv::wake::JetSourceInput & LastInput () const
 The jet input of the last rebuild, ρ included, T_eff after relaxation; all zero before the first.
 
const double * SourceVelocity () const
 The filtered source velocity u_s [m/s], NED.
 
const WakeSchedule & Schedule () const
 The schedule: rebuild count, Freeze state and the last |ΔT_eff|/T_eff.
 

Detailed Description

Builds, schedules and publishes the propeller jet of one PropelledObject.

Not thread-safe: Update() is called from PreOdeFcn, which FhSim runs serially. The jet it publishes is read concurrently through the environment (marenv threading contract).

Constructor & Destructor Documentation

◆ PropellerJetCaster()

environment::wake::detail::PropellerJetCaster::PropellerJetCaster ( const std::string &  name,
const WakeSettings &  settings,
double  rho 
)

Creates the caster.

Parameters
[in]nameThe SimObject name; the jet is registered as <name>/jet, the log prefix.
[in]settingsThe body's wake settings, from ReadWakeSettings().
[in]rhoWater density [kg/m³].
Exceptions
std::invalid_argumentif rho is not positive.

Member Function Documentation

◆ Register()

void environment::wake::detail::PropellerJetCaster::Register ( EnvironmentProvider &  environment)

Registers the (still empty) jet in the environment. Call from FinalSetup.

Parameters
[in]environmentThe environment; it must outlive the caster.

◆ Update()

void environment::wake::detail::PropellerJetCaster::Update ( double  T,
const double *  X,
const PropelledObject &  object,
ISimObjectLogger &  logger 
)

Filters the source velocity and republishes the jet when due. Call from PreOdeFcn, after the hull's caster.

Parameters
[in]TSimulation time at the start of the major step [s].
[in]XThe global state vector.
[in]objectThe self-propelled body.
[in]loggerReceives the rebuild, freeze, re-arm and skip lines.
Exceptions
std::logic_errorbefore Register().

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