FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
NetFlowInteraction Class Reference

Public Member Functions

 NetFlowInteraction (ISimObjectCreator *creator)
 
void FinalSetup (const std::string &objectName, double rho, environment::EnvironmentProvider *environment, std::unique_ptr< const net_wake::WakePanelSource > structure, ISimObjectLogger &logger)
 
void PreOdeFcn (double T, const double *X)
 
void FlowAt (double T, int point, const double pos[3], const double *nodeWaveVelocity, double vel[3]) const
 
const environment::wake::WakeCaster * WakeCaster () const
 The wake caster; null without CastWake or an environment, or before FinalSetup.
 

Constructor & Destructor Documentation

◆ NetFlowInteraction()

NetFlowInteraction::NetFlowInteraction ( ISimObjectCreator *  creator)
explicit

Reads the wake parameters (environment::wake::ReadBodyWakeSettings of a source set: net_wake::ReadWakeSettings, ExternalWakeUpdate).

Parameters
creatorThe creator of the owning SimObject.
Exceptions
std::invalid_argument,afterReportParameterError, as net_wake::ReadWakeSettings.

Member Function Documentation

◆ FinalSetup()

void NetFlowInteraction::FinalSetup ( const std::string &  objectName,
double  rho,
environment::EnvironmentProvider *  environment,
std::unique_ptr< const net_wake::WakePanelSource >  structure,
ISimObjectLogger &  logger 
)

Keeps the environment and the net's node accessor and, with an environment, registers the net's BodyWake, which registers the net's lumped wake with CastWake. Call from FinalSetup.

Parameters
objectNameThe name of the owning SimObject, the lumped field's name.
rhoFluid density of the net's load law [kg/m³].
environmentThe environment; null when the net found none (it reports that itself).
structureThe net as its wake caster sees it.
loggerThe FhSim log; it must outlive this object.

◆ FlowAt()

void NetFlowInteraction::FlowAt ( double  T,
int  point,
const double  pos[3],
const double *  nodeWaveVelocity,
double  vel[3] 
) const

The water velocity at a sample point: the waked current with the net's own query (the other objects' wakes and the private field held per step, R46, R135) plus the wave particle velocity averaged over the point's nodes (R62).

Parameters
[in]TSimulation time [s].
[in]pointA panel (0 to NumPanels − 1) or a cable element (NumPanels + cable).
[in]posThe point's position in this evaluation [m], NED.
[in]nodeWaveVelocityThe wave particle velocity at each node, 3 per node [m/s].
[out]vel[m/s], NED.

◆ PreOdeFcn()

void NetFlowInteraction::PreOdeFcn ( double  T,
const double *  X 
)

Rebuilds the net's wakes when due and takes the other objects' wakes at the panel centroids and cable midpoints of X. Call from PreOdeFcn; does nothing without a state or an environment.

Parameters
TSimulation time at the start of the step [s].
XThe global state vector.

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