FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
NetStructureWithConstraints Class Reference
+ Inheritance diagram for NetStructureWithConstraints:
+ Collaboration diagram for NetStructureWithConstraints:

Classes

struct  states
 

Public Member Functions

 NetStructureWithConstraints (std::string simObjectName, ISimObjectCreator *creator)
 The constructor sets the pointer to the output object and the parser object.
 
virtual ~NetStructureWithConstraints ()
 The destructor deletes dynamically allocated memory.
 
virtual void OdeFcn (const double dT, const double *const adX, double *const adXDot) const
 
virtual void InitialConditionSetup (const double dT, const double *const adCurrentIC, double *const adUpdatedIC, ISimObjectCreator *const creator)
 
virtual void FinalSetup (const double dT, const double *const adX, ISimObjectCreator *const creator)
 
void PreOdeFcn (double T, const double *X) override
 Rebuilds the cast wake when due (with CastWake) and takes the wakes at the panel centroids and cable midpoints for the step (NetFlowInteraction::PreOdeFcn, environment::wake::BodyWake::Update).
 
void SetAddedDragPerMPS (double AddedDragPerMPS)
 

Protected Member Functions

NetNodeLayout Layout () const override
 
void AddExternalForces (double T, const double *X, double *nodeForce) const override
 No external node forces.
 
void TakeNodeForces (double T, const double *X, const double *nodeForce, double *XDot) const override
 The free nodes' derivatives (zero for the driven nodes' frozen states), the driven nodes' forces on their rigid elements, the solver step.
 
virtual void AddInputPorts (ISimObjectCreator *creator)
 
virtual void CreateDataStructures ()
 
VSPairStrInt CreateExternalNodeMap (std::string tag, int *piUsed, const NetStructureSpec &NetSpec, ISimObjectCreator *creator)
 
void ValidateConstraintInput (ISimObjectCreator *creator) const
 
const double * NodePositionState (const double *X, int node) const
 
const double * NodeVelocityState (const double *X, int node) const
 The velocity of a calculation node, 3 states in X (as NodePositionState()).
 
bool NodeHasOwnStates (int node) const
 True unless a rigid element drives the node.
 
const states & DrivingElement (int node) const
 The state indices of the rigid element that drives the node.
 

Protected Attributes

ISignalPort ** m_InTopConstraintsPos = nullptr
 Interface member variables.
 
ISignalPort ** m_InTopConstraintsVel = nullptr
 
int * m_iStatePos
 
int * m_iStateVel
 
int m_numNodesInputForce
 Node counts.
 
int m_numNodesOutputPosAndVel
 
int m_numNodesCalc
 
int(* m_hasPosAndVelStates )[2] = nullptr
 Per calculation node: [0] the index of the rigid element that drives it, [1] 1 if it has its own states, 0 if driven. Read through NodeHasOwnStates() and DrivingElement() only.
 
int m_NumNodesInputPosAndVel
 
int m_NumNodesOutputForce
 
VSPairStrInt m_VsNodesInputPosAndVel
 
VSPairStrInt m_VsNodesOutputForce
 
std::unique_ptr< NetCore > m_core
 The net core: the panels, cable elements, their loads and the wakes (NetCore.h); no seabed contact.
 
VSPairStrInt m_VsNodesOutputPosAndVel
 Nodes reachable directly through input or output ports.
 
VSPairStrInt m_VsNodesInputForce
 
bool m_useTagForExternalNodes
 
bool m_CageWakeEffectsActive
 
std::unique_ptr< CoRiBoDynamics::ConstraintSolver > m_constraintSolver
 Owns the rigid elements, the constraint sets (m_jointConstr among them) and, with NumCpuCore > 1, its thread pool (MARE-0328).
 
std::vector< states > m_stateVector
 
CoRiBoDynamics::JointConstraint * m_jointConstr
 Owned by m_constraintSolver, which deletes its constraint sets.
 
double m_topPosition1 [3]
 
double m_topVelocity1 [3]
 
double m_topOrientation1 [4]
 
double m_topangularVel1 [3]
 
double m_topPosition2 [3]
 
double m_topVelocity2 [3]
 
double m_topOrientation2 [4]
 
double m_topangularVel2 [3]
 
double m_YoungsModulus
 
double m_solverFrequencyCoefficient
 Frequency coefficient of the constraint solver [1/s].
 
int m_numConstraintsElements
 
double m_depthOfConstraintsCable
 

Member Function Documentation

◆ AddExternalForces()

void NetStructureWithConstraints::AddExternalForces ( double  T,
const double *  X,
double *  nodeForce 
) const
overrideprotectedvirtual

Implements NetNodeStates.

◆ Layout()

NetNodeLayout NetStructureWithConstraints::Layout ( ) const
overrideprotectedvirtual

The node-state seam (NetNodeStates.h): the constraint-solver adapter of the net core. A free node reads its own Pos_ and Vel_ states, a driven node its rigid element's.

Implements NetNodeStates.

◆ NodePositionState()

const double * NetStructureWithConstraints::NodePositionState ( const double *  X,
int  node 
) const
inlineprotected

The position of a calculation node, 3 states in X.

A node driven by a rigid element takes its position and velocity from that element's position and velocity states; its own Pos_/Vel_ states are frozen at their initial values and never read here. Layout() (so the net core) and the rendering read every node this way.

◆ SetAddedDragPerMPS()

void NetStructureWithConstraints::SetAddedDragPerMPS ( double  AddedDragPerMPS)

Sets the added drag per unit speed, spread over the panels in OdeFcn as in Net/NetStructure (owner ruling Q3b, 2026-10-14). There is no input option for it (MARE-0384). The cast wake's lumped momentum deficit omits this drag (MARE-0164).

◆ TakeNodeForces()

void NetStructureWithConstraints::TakeNodeForces ( double  T,
const double *  X,
const double *  nodeForce,
double *  XDot 
) const
overrideprotectedvirtual

Implements NetNodeStates.


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