|
FhSim
3.1.0
Marine systems simulation
|
#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. | |
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).
| environment::wake::detail::PropellerJetCaster::PropellerJetCaster | ( | const std::string & | name, |
| const WakeSettings & | settings, | ||
| double | rho | ||
| ) |
Creates the caster.
| [in] | name | The SimObject name; the jet is registered as <name>/jet, the log prefix. |
| [in] | settings | The body's wake settings, from ReadWakeSettings(). |
| [in] | rho | Water density [kg/m³]. |
| std::invalid_argument | if rho is not positive. |
| void environment::wake::detail::PropellerJetCaster::Register | ( | EnvironmentProvider & | environment | ) |
Registers the (still empty) jet in the environment. Call from FinalSetup.
| [in] | environment | The environment; it must outlive the caster. |
| 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.
| [in] | T | Simulation time at the start of the major step [s]. |
| [in] | X | The global state vector. |
| [in] | object | The self-propelled body. |
| [in] | logger | Receives the rebuild, freeze, re-arm and skip lines. |
| std::logic_error | before Register(). |