FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
net_wake::NetWakeCaster Class Reference

#include <NetWakeCaster.h>

Public Member Functions

 NetWakeCaster (std::string name, const WakeSettings &settings, double rho)
 
void Register (environment::EnvironmentProvider &environment)
 
void Update (double T, const double *X, const WakePanelSource &structure, ISimObjectLogger &logger)
 
std::shared_ptr< marenv::wake::WakeField > LumpedField () const
 The registered lumped field; null before Register().
 
std::shared_ptr< marenv::wake::WakeField > PrivateField () const
 The unregistered private per-panel field; null before Register().
 
marenv::wake::WakeQuery PanelQuery () const
 The query of the structure's own panels: skip the lumped field, compose the private field in (C5).
 
const marenv::wake::LumpedSourceInput & LastLumpedInput () const
 The lumped-source input of the last rebuild: panel force, U_ref, ρ, rear-face centre and W·H.
 
const marenv::wake::LumpedSourceResult & LastLumpedSource () const
 The lumped source of the last rebuild, after relaxation; casts is false once a failed current lookup has emptied the lumped field (MARE-0339).
 
int NumRebuilds () const
 Rebuilds done so far.
 
bool Frozen () const
 True while Freeze holds the wakes fixed.
 
double LastChange () const
 The change between the last two rebuilds of the current Freeze round, the larger of max|ΔR| of the private field at the panel centroids and |ΔM|/M of the lumped source (R121); negative when undefined.
 
double LastRebuildSeconds () const
 Wall-clock duration of the last rebuild, s.
 
const double * SourceVelocity () const
 The filtered source velocity u_s, m/s, NED.
 
const marenv::wake::WakeFrame & LastFrame () const
 The frame of the last rebuild; all zero before the first.
 
const marenv::wake::GridSpec & LastGrid () const
 The private grid of the last Grid rebuild; all zero before the first.
 
double LastGridCutoff () const
 The cutoff of the last Grid rebuild's private grid; 0 before the first.
 

Detailed Description

Builds, schedules and publishes the private and the lumped wake of one casting structure (plan §B4, §B6; phase F design §1): environment::wake::WakeCaster over the structure's panels.

Kept for its tests and for code outside this library; the nets use NetFlowInteraction (MARE-0347). Removed in fhsim_marine_elements 5.0.

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

Constructor & Destructor Documentation

◆ NetWakeCaster()

net_wake::NetWakeCaster::NetWakeCaster ( std::string  name,
const WakeSettings &  settings,
double  rho 
)

Creates the caster.

Parameters
[in]nameName the lumped field is registered under, the SimObject name.
[in]settingsThe wake settings, from ReadWakeSettings().
[in]rhoFluid density of the structure's load law, kg/m³ (Rho).
Exceptions
std::invalid_argumentif rho is not positive.

Member Function Documentation

◆ Register()

void net_wake::NetWakeCaster::Register ( environment::EnvironmentProvider &  environment)
inline

Registers the (still empty) lumped field in the environment and creates the private field. Call from FinalSetup.

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

◆ Update()

void net_wake::NetWakeCaster::Update ( double  T,
const double *  X,
const WakePanelSource &  structure,
ISimObjectLogger &  logger 
)

Skips a step with a non-finite node (ENV-0074), filters the node velocities, checks the current lookups at the source and the panel centroids (a failure holds the wakes, MARE-0339), checks the Freeze re-arm against u_s and the ambient current at the source, and rebuilds the wakes when due (environment::wake::WakeCaster::Update). Call from PreOdeFcn.

Parameters
[in]TSimulation time, s, at the start of the major step.
[in]XThe global state vector.
[in]structureThe casting structure.
[in]loggerReceives the rebuild, freeze, re-arm, skip, widening, resolution, non-finite and failed-lookup lines.

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