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

Public Member Functions

 NetCore (const std::string &name, NetStructureSpec &spec, const NetCoreOptions &options, ISimObjectCreator *creator)
 
 NetCore (const NetCore &)=delete
 
NetCore & operator= (const NetCore &)=delete
 
void FinalSetup (const NetNodeStates &nodes, const double *X, ISimObjectCreator *creator)
 
void PreOdeFcn (double T, const double *X)
 
void Evaluate (double T, const double *X, double *XDot) const
 
void AcceptedStep (double T)
 Filters the seabed contact of the last evaluation once per accepted step (MARE-0355).
 
void SetAddedDragPerMPS (double addedDragPerMPS)
 Sets the added drag per unit speed, spread over the panels [N s/m].
 
NetNodeView View (const double *X, int stateBase=0) const
 The nodes of X; stateBase as NetNodeView. Valid after FinalSetup.
 
int NumNodes () const
 The calculation nodes.
 
int NumOriginalNodes () const
 The nodes of the net file, before refinement.
 
int NumPanels () const
 
int NumCables () const
 
const int * PanelNodes (int panel) const
 The three nodes of panel.
 
const NetElement3N & Panel (int panel) const
 
NetElement3N & Panel (int panel)
 
const NetCableElement & Cable (int cable) const
 
NetCableElement & Cable (int cable)
 
float Inertia (int node) const
 The node mass from the panels and cable elements [kg].
 
const double * NodeForce (int node) const
 The force on node of the last evaluation, 3 values [N].
 
const SAdaptationSpec_t & Adaptations () const
 MassFactor, MaxVelocity, AddedDragPerMPS.
 
bool FoldingPointRefinementUsed () const
 
const net_panel_setup::PanelHydrodynamics & PanelHydrodynamics () const
 
environment::EnvironmentProvider * Environment () const
 
bool InBottomContact () const
 Whether the seabed gave an original node a force at the last evaluation (false without bottom contact).
 
const double * BottomContact () const
 The filtered seabed force and its moment about the NED origin, 6 values (MARE-0064, MARE-0355).
 
void PrepareFlow (double T, const double *X, int stateBase) const
 For a Jacobian: the node wave velocities at X, whose positions are offset by stateBase (R62).
 
void FlowAt (double T, int point, const double pos[3], double vel[3]) const
 The water velocity at a panel centroid (point = panel) or a cable midpoint (point = number of panels + cable) at pos.
 
void CableHydrodynamicForce (double T, const double *X, double force[3]) const
 The sum of the cables' hydrodynamic forces on the nodes [N] (MARE-0141); for the wake caster's log.
 
const environment::wake::BodyWake * Wake () const
 The net's BodyWake; null without an environment or before FinalSetup.
 

Constructor & Destructor Documentation

◆ NetCore()

NetCore::NetCore ( const std::string &  name,
NetStructureSpec &  spec,
const NetCoreOptions &  options,
ISimObjectCreator *  creator 
)

Reads the core's parameters and builds the panels and cable elements of spec.

Parameters: HydroModel and the law's, Rho, Nu, SolidityModel, Solidity, knotDiameterRatio, NetDampingRatio (with twine structure), NumThreads, BottomContactTimeConstant (with bottom contact), and through NetFlowInteraction the wake parameters. Setup errors are reported through creator, as before.

Parameters
nameThe SimObject's name.
specThe loaded net file.
optionsWhat this net chooses (NetCoreOptions).
creatorThe creator of the owning SimObject.

Member Function Documentation

◆ Evaluate()

void NetCore::Evaluate ( double  T,
const double *  X,
double *  XDot 
) const

The net's right-hand side: zeroes the node forces, adds the panel and cable loads (serial or in chunks), then NetNodeStates::AddExternalForces, then the seabed contact when on, then NetNodeStates::TakeNodeForces.

◆ FinalSetup()

void NetCore::FinalSetup ( const NetNodeStates &  nodes,
const double *  X,
ISimObjectCreator *  creator 
)

Keeps the owner's nodes and finds the environment (and with bottom contact the seabed); sets the air density of the cable elements, the thread buffers, the solidity warnings at the initial state and the wakes (NetFlowInteraction::FinalSetup).

Parameters
nodesThe owner of the nodes; it must outlive the core.
XThe initial global state vector.
creatorThe creator of the owning SimObject.

◆ PreOdeFcn()

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

The cable elements' mean tension once per time (owner ruling R64), the clamp log (MARE-0140) and the wakes (NetFlowInteraction::PreOdeFcn).


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