Marine systems simulation
Netcage::CNetCageWakeEffect Class Reference
+ Inheritance diagram for Netcage::CNetCageWakeEffect:
+ Collaboration diagram for Netcage::CNetCageWakeEffect:

Public Member Functions

 CNetCageWakeEffect (const string &simObjectName, ISimObjectCreator *const creator)
 Reads parameters, registers states, input/output ports and shared resources. More...
 
virtual void FinalSetup (const double dT, const double *const adX, ISimObjectCreator *const pCreator)
 
virtual void OdeFcn (const double T, const double *const X, double *const XDot, const bool IsMajorTimeStep)
 Computes object derivatives as a function of time, states and input ports. More...
 
const double * outSumHydDynForce (const double T, const double *const X)
 Output port. Returns the sum of hydrodynamic forces acting on net structure. More...
 
const double * outNodeSumForce (const double T, const double *const X)
 Output port. Returns the sum of forces acting on net structure. More...
 
const double * outNodeSumDragForceAbs (const double T, const double *const X)
 Output port. Returns the absolute value of the summed drag forces acting on net structure. More...
 
const double * outNodeSumDragForceDirection (const double T, const double *const X)
 Output port. Returns the direction of the summed drag forces acting on net structure. More...
 
const double * outNodeSumLiftForce (const double T, const double *const X)
 Output port. Returns the sum of lift forces acting on net structure. More...
 
const double * outBottomPosition (const double T, const double *const X)
 Output port. Returns the position of the bottom node in the net structure. More...
 
const double * outSteadyStateEst_Tau (const double T, const double *const X)
 
const double * outSteadyStateEst_K (const double T, const double *const X)
 
const double * LowerMembranePosition (const double dT, const double *const adX)
 
const double * outMiddleCurrentVelocity (const double dT, const double *const adX)
 
const double * outNetPosition (const double T, const double *const X, int iNode)
 
virtual const double * InternalNodeForce (const double T, const double *const X, int iExtNode)
 Output port. Returns the internally computed forces acting on the node identified by the index iExtNode. More...
 
virtual const double * NodeForce (const double T, const double *const X, int iNode)
 Output port. Returns the forces acting on the node identified by the index iExtNode. More...
 
void GetNodePositionIndices (std::vector< int > &NodePositions)
 Returns indices for memory locations of the positions of all nodes in structure. More...
 
void GetNodeVelocityIndices (std::vector< int > &NodeVelocities)
 Returns indices for memory locations of the velocities of all nodes in structure. More...
 
vector< CNetElement3NWakeEffect * > getNetElements ()
 Returns list of all net elements in structure. More...
 
void getNetElementConnections (vector< int * > &ElementConnections)
 Returns list of all node connections of all net elements. More...
 
void setTraversedElements (vector< bool > TraversedElements)
 Returns list that describes which net elements in structure have been traversed by ROV. More...
 
void calculations (const double T, const double *const X)
 Performs a series of computations within the cable object. More...
 
- Public Member Functions inherited from CNetStructureWakeEffect
 CNetStructureWakeEffect (std::string sSimObjectName, ISimObjectCreator *pCreator)
 The constructor sets the pointer to the output object and the parser object.
 
virtual ~CNetStructureWakeEffect ()
 The destructor deletes dynamically allocated memory.
 
virtual void OdeFcn (const double dT, const double *const adX, double *const adXDot, const bool bIsMajorTimeStep)
 
virtual void InitialConditionSetup (const double dT, const double *const adCurrentIC, double *const adUpdatedIC, ISimObjectCreator *const pCreator)
 
virtual void FinalSetup (const double dT, const double *const adX, ISimObjectCreator *const pCreator)
 
const double * outExternalNodeForce (const double dT, const double *const adX, int iExtNode)
 
virtual const double * NodePos (const double dT, const double *const adX, int iExtNode)
 
virtual const double * NodeVel (const double dT, const double *const adX, int iExtNode)
 
virtual const double * BottomContact (const double dT, const double *const adX)
 
void SetAddedDragPerMPS (double AddedDragPerMPS)
 
const double * GetNetTotalForceForCheck (const double dT, const double *const adX)
 

Protected Member Functions

void DecomposeDragForcesInCurrentDirection (double *const DragForcesProjected, const double T, const double *const X)
 
bool SteadyStateEstimator (const double T, const double *const X)
 
void AddDeadFishWeightForce (const double T, const double *const X)
 
void SetExternalPos (const double dT, const double *const adX)
 
void SetExternalVel (const double dT, const double *const adX)
 
virtual void CreateDataStructures ()
 
virtual void AddInputPorts (ISimObjectCreator *pCreator)
 
virtual void CreateOutputPorts (ISimObjectCreator *pCreator)
 
virtual void CalcStateDerivatives (const double *const adX, double *const adXDot)
 For screen model. Checking calculated total net force. More...
 
virtual double AddNodeBottomForce (const double *const adX, int iNode, double dDiam, double adForceInOut[3])
 
virtual void AddNetForces (const double dT, const double *const adX)
 
virtual void AddCableForces (const double dT, const double *const adX)
 
- Protected Member Functions inherited from CNetStructureWakeEffect
virtual void CalcStateDerivatives (const double *const adX, double *const adXDot)
 For screen model. Checking calculated total net force. More...
 
virtual void AddExternalForces (const double dT, const double *const adX)
 
virtual void AddNetForces (const double dT, const double *const adX)
 
virtual void AddCableForces (const double dT, const double *const adX)
 
virtual double AddNodeBottomForce (const double *const adX, int iNode, double dDiam, double adForceInOut[3])
 
virtual void AddBottomForces (const double *const adX)
 
virtual void AddInputPorts (ISimObjectCreator *pCreator)
 
virtual void CreateNetPanels (std::vector< const CNetElementDef * > VNetElementDefs, ISimObjectCreator *pCreator)
 
virtual void CreateNetCables (std::vector< const CNetCableElementSpec * > VCableElements, ISimObjectCreator *pCreator)
 
virtual void CreateDataStructures ()
 
virtual void CreateOutputPorts (ISimObjectCreator *pCreator)
 
VSPairStrInt CreateExternalNodeMap (std::string sTag, int *piUsed, CNetStructureSpec &NetSpec, ISimObjectCreator *pCreator)
 
void PRINTALLNODEFORCES (std::string spec, double dT)
 

Protected Attributes

ISignalPort ** m_InExternalPos
 
ISignalPort ** m_InExternalVel
 
ISignalPort * m_MembraneDepth
 
double * m_NodeExternalPos
 
double * m_NodeExternalVel
 
double m_adNodeSumForce [3]
 
double m_adSumHydDynForce [3]
 
double m_dNodeSumDragForceAbs
 
double m_dNodeSumDragDirection
 
double m_dNodeSumLiftForce
 
double m_MiddleCurrentVelocity [3]
 
double * m_adNodeHydDynForce
 
double * m_NodeInternalForces
 
int(* m_hasPosAndVelStates )[2]
 
int m_NumNodesInputPosAndVel
 
int m_NumNodesOutputForce
 
VSPairStrInt m_VsNodesInputPosAndVel
 
VSPairStrInt m_VsNodesOutputForce
 
Eigen::MatrixXd m_SSPhi
 
Eigen::MatrixXd m_SSY
 
double m_SS_Tau
 
double m_SS_K
 
sfh::timers::StopWatch m_SSCalcIntervalWatch
 
int m_IsMembrane
 
int m_MembraneIsInSystem
 
double m_LowerMembraneDepth
 
std::string m_simobjectname
 
bool m_TerminateAtSteadyState
 
double m_PI
 
int m_outNetPosNum
 
int * m_outNetPosIndex
 
std::string m_CageShape
 
double * m_CageCentre
 
int m_BottomNodeIndex
 
double m_DeadFishInertia [3]
 
double m_DeadFishWeigthForce
 
bool m_HasDeadFish
 
sfh::timers::StopWatch m_RealTimeWatch
 
ICommonComputation * m_calcDynamics
 
- Protected Attributes inherited from CNetStructureWakeEffect
ISignalPort ** m_apInExternalForces
 Interface member variables.
 
int * m_aIStatePos
 
int * m_aIStateVel
 
double * m_NodeExternalForces
 
int m_iNumNodesInputForce
 Node counts.
 
int m_iNumNodesOutputPosAndVel
 
int m_iNumPanelsCalc
 
int m_iNumCablesCalc
 
int m_iNumNodesOriginal
 
int m_iNumNodesCalc
 
int m_iNumNodeOutputs
 
CNetBottomContactFilter m_BottomContactFilter
 Environment.
 
double m_adBottomContact [6]
 
IBasicBottom ** m_ppBottom
 
ICurrentVel ** m_ppCurrentVel
 
CEnvironmentm_pEnvironment
 
std::vector< CNetCableElement * > m_VpCableElements
 Element properties.
 
std::vector< CNetElement3NWakeEffect * > m_VpNetElements
 
float * m_afInertia
 
int * m_aiNetConn
 
int ** m_aaiCableConn
 
SAdaptationSpec_t m_SAdaptations
 
bool m_bFoldingPointRefinementUsed
 
VSPairStrInt m_VsNodesOutputPosAndVel
 Nodes reachable directly through input or output ports.
 
VSPairStrInt m_VsNodesInputForce
 
bool m_bUseTagForExternalNodes
 
double * m_adNodeForce
 
sfh::timers::StopWatch m_OdeTimer
 
bool m_UseScreenModel
 
bool m_UseMoeFore2021
 
double m_SnImg
 
double m_RhoWater
 
double m_NetForcesTotalForOutputCheck [3]
 
bool m_ExternalElementWakeEffectsActive
 Set to true if elements should be affected by the wake from other elements.
 
bool m_InternalElementWakeEffectsActive
 Set to true if wake effects should be active within an element.
 
bool m_UseActualElementSizeInWakeEffect
 Set to true if actual size (number of u and v bars) of net element shall be used in wake effect calculation. If set to false, number of u and v bars will be set equal to m_NElementBarsInWakeEffectCalc.
 
int m_NElementBarsInWakeEffectCalc
 Number of u and v bars in calculation of wake effect if m_UseActualElementSizeInWakeEffect is set to false.
 
bool m_useReynoldsDependentDragCoefficients
 

Constructor & Destructor Documentation

◆ CNetCageWakeEffect()

Netcage::CNetCageWakeEffect::CNetCageWakeEffect ( const string &  simObjectName,
ISimObjectCreator *const  creator 
)

The constructor performs all initial setup for a floating collar simobject. Reading in parameters, setting up communication interface i.e. output ports, input ports, and states, plus additional 'one time only' resource setup.

Parameters
[in]simObjectName-> The name of the simobject
[in]creator-> Retrieve parameters. Register states, ports and shared resources

Member Function Documentation

◆ AddCableForces()

virtual void Netcage::CNetCageWakeEffect::AddCableForces ( const double  dT,
const double *const  adX 
)
protectedvirtual

Reimplemented from CNetStructureWakeEffect.

◆ AddInputPorts()

virtual void Netcage::CNetCageWakeEffect::AddInputPorts ( ISimObjectCreator *  pCreator)
protectedvirtual

Reimplemented from CNetStructureWakeEffect.

◆ AddNetForces()

virtual void Netcage::CNetCageWakeEffect::AddNetForces ( const double  dT,
const double *const  adX 
)
protectedvirtual

Reimplemented from CNetStructureWakeEffect.

◆ AddNodeBottomForce()

virtual double Netcage::CNetCageWakeEffect::AddNodeBottomForce ( const double *const  adX,
int  iNode,
double  dDiam,
double  adForceInOut[3] 
)
protectedvirtual

Reimplemented from CNetStructureWakeEffect.

◆ CalcStateDerivatives()

virtual void Netcage::CNetCageWakeEffect::CalcStateDerivatives ( const double *const  adX,
double *const  adXDot 
)
protectedvirtual

Reimplemented from CNetStructureWakeEffect.

◆ calculations()

void Netcage::CNetCageWakeEffect::calculations ( const double  T,
const double *const  X 
)

Computations that are important for the cable object dynamics, but only should be called once during each time step when simulating. Results are stored in member variables in the object.

Parameters
[in]T-> Current simulation time
[in]X-> Current simulation state

◆ CreateDataStructures()

virtual void Netcage::CNetCageWakeEffect::CreateDataStructures ( )
protectedvirtual

Reimplemented from CNetStructureWakeEffect.

◆ CreateOutputPorts()

virtual void Netcage::CNetCageWakeEffect::CreateOutputPorts ( ISimObjectCreator *  pCreator)
protectedvirtual

Reimplemented from CNetStructureWakeEffect.

◆ FinalSetup()

virtual void Netcage::CNetCageWakeEffect::FinalSetup ( const double  dT,
const double *const  adX,
ISimObjectCreator *const  pCreator 
)
virtual

Reimplemented from CNetStructureWakeEffect.

◆ getNetElementConnections()

void Netcage::CNetCageWakeEffect::getNetElementConnections ( vector< int * > &  ElementConnections)
Parameters
[in]ElementConnections-> Vector for storing node connections of all elements

◆ getNetElements()

vector< CNetElement3NWakeEffect * > Netcage::CNetCageWakeEffect::getNetElements ( )
Returns
-> List of all net elements

◆ GetNodePositionIndices()

void Netcage::CNetCageWakeEffect::GetNodePositionIndices ( std::vector< int > &  NodePositions)
Parameters
[in]NodePositions-> Vector for storing all memory indices of node positions

◆ GetNodeVelocityIndices()

void Netcage::CNetCageWakeEffect::GetNodeVelocityIndices ( std::vector< int > &  NodeVelocities)
Parameters
[in]NodeVelocities-> Vector for storing all memory indices of node velocities

◆ InternalNodeForce()

virtual const double * Netcage::CNetCageWakeEffect::InternalNodeForce ( const double  T,
const double *const  X,
int  iExtNode 
)
virtual

See PortDefs.h

Parameters
[in]T-> Current simulation time
[in]X-> Current simulation state
[in]iExtNode-> Index of node
Returns
-> Address of the internal forces acting on node iExtNode

◆ NodeForce()

virtual const double * Netcage::CNetCageWakeEffect::NodeForce ( const double  T,
const double *const  X,
int  iNode 
)
virtual

See PortDefs.h

Parameters
[in]T-> Current simulation time
[in]X-> Current simulation state
[in]iNode-> Index of node
Returns
-> Address of the forces acting on node iExtNode

◆ OdeFcn()

virtual void Netcage::CNetCageWakeEffect::OdeFcn ( const double  T,
const double *const  X,
double *const  XDot,
const bool  IsMajorTimeStep 
)
virtual

Returns state derivatives. Velocity as derivative of position, (external_force+gravity)/mass as derivative of velocity

Parameters
[in]T-> Current simulation time
[in]X-> Current simulation state
[out]XDot-> State derivatives
[in]IsMajorTimeStep-> Is this a major time step?

Reimplemented from CNetStructureWakeEffect.

◆ outBottomPosition()

const double * Netcage::CNetCageWakeEffect::outBottomPosition ( const double  T,
const double *const  X 
)

See PortDefs.h

Parameters
[in]T-> Current simulation time
[in]X-> Current simulation state
Returns
-> Address of the position of the bottom node

◆ outNodeSumDragForceAbs()

const double * Netcage::CNetCageWakeEffect::outNodeSumDragForceAbs ( const double  T,
const double *const  X 
)

See PortDefs.h

Parameters
[in]T-> Current simulation time
[in]X-> Current simulation state
Returns
-> Address of absolute value of the summed drag forces

◆ outNodeSumDragForceDirection()

const double * Netcage::CNetCageWakeEffect::outNodeSumDragForceDirection ( const double  T,
const double *const  X 
)

See PortDefs.h

Parameters
[in]T-> Current simulation time
[in]X-> Current simulation state
Returns
-> Address of direction of the summed drag forces

◆ outNodeSumForce()

const double * Netcage::CNetCageWakeEffect::outNodeSumForce ( const double  T,
const double *const  X 
)

See PortDefs.h

Parameters
[in]T-> Current simulation time
[in]X-> Current simulation state
Returns
-> Address of sum of forces acting

◆ outNodeSumLiftForce()

const double * Netcage::CNetCageWakeEffect::outNodeSumLiftForce ( const double  T,
const double *const  X 
)

See PortDefs.h

Parameters
[in]T-> Current simulation time
[in]X-> Current simulation state
Returns
-> Address of summed lift forces

◆ outSumHydDynForce()

const double * Netcage::CNetCageWakeEffect::outSumHydDynForce ( const double  T,
const double *const  X 
)

See PortDefs.h

Parameters
[in]T-> Current simulation time
[in]X-> Current simulation state
Returns
-> Address of sum of hydrodynamic forces

◆ setTraversedElements()

void Netcage::CNetCageWakeEffect::setTraversedElements ( vector< bool >  TraversedElements)
Parameters
[in]TraversedElements-> Vector storing boolean values for each element signifying whether the element has been traversed

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