Marine systems simulation
CInternalCable Class Reference
+ Inheritance diagram for CInternalCable:
+ Collaboration diagram for CInternalCable:

Public Member Functions

 CInternalCable (ISimObjectCreator *pCreator, const SCableSpec &CableSpec)
 The constructor sets the pointer to the output object and the parser object.
 
 ~CInternalCable ()
 The destructor deletes dynamically allocated memory.
 
virtual void FinalSetup (const double dT, const double *const adX, ISimObjectCreator *const pCreator)
 
virtual void OdeFcn (const double *const adPosA, const double *const adVelA, const double *const adPosB, const double *const adVelB, const double *const adX, double *const adXDot, double dT)
 Calculates the state derivatives and the end forces. More...
 
virtual bool InitializeStates (const double *const adPosA, const double *const adVelA, const double *const adPosB, const double *const adVelB, double *const adX)
 Method for setting initial conditions when the input is known, which may be implemented in the individual simObjects.
 
void UpdateCable (double dNewLength, double dT)
 Updates the cable for the next step.
 
void AddEndForcesAndInertia (double *const adEndForceA, double *const adEndForceB, double *const pdEndInertiaA, double *const pdEndInertiaB, const double *const adPosA, const double *const adVelA, const double *const adPosB, const double *const adVelB, const double *const adX, double dT)
 Adds the end forces and inertia to the supplied data structures.
 
double GetLength ()
 Calculates the length of the cable.
 

Public Attributes

unsigned long m_iNumElements
 The number of elements to divide the cable into.
 
unsigned long m_iNumNodes
 The number of nodes of the cable.
 

Protected Member Functions

void ResetAllNodeForces ()
 
void AddAllElementForces (const double *const adPosA, const double *const adVelA, const double *const adPosB, const double *const adVelB, const double *const adX, double dT)
 
void CalcDerivatives (const double *const adX, double *const adXDot)
 
virtual void AddElementForce (int iCableElement, const double adPosA[3], const double adVelA[3], const double adPosB[3], const double adVelB[3], double adForceA[3], double adForceB[3], double dT)
 
void UpdateInertia ()
 Updates the inertia of the cable according to the changing length.
 

Protected Attributes

unsigned long * m_aIStatePos
 An array of indices to the node position states.
 
unsigned long * m_aIStateVel
 An array of indices to the node velocity states.
 
SCableSpec m_CableSpec
 The cable specification.
 
double m_dEA
 The stiffness of the cable.
 
sfh::timers::StopWatch m_StopWatch
 
CCableElDynStiff ** m_apCableElements
 An array holding the cable elements.
 
double * m_adInertiaA
 The inertia of the A nodes.
 
double * m_adInertiaB
 The inertia of the B nodes.
 
double ** m_aadForceA
 The force on the A nodes.
 
double ** m_aadForceB
 The force on the B nodes.
 
ICurrentVel ** m_ppCurrentVel
 
double m_adElVelWater [3]
 
double m_adElMeanPos [3]
 
double m_adElMeanVel [3]
 

Member Function Documentation

◆ AddElementForce()

virtual void CInternalCable::AddElementForce ( int  iCableElement,
const double  adPosA[3],
const double  adVelA[3],
const double  adPosB[3],
const double  adVelB[3],
double  adForceA[3],
double  adForceB[3],
double  dT 
)
protectedvirtual

Reimplemented in CInternalCableWithAttractor.

◆ OdeFcn()

virtual void CInternalCable::OdeFcn ( const double *const  adPosA,
const double *const  adVelA,
const double *const  adPosB,
const double *const  adVelB,
const double *const  adX,
double *const  adXDot,
double  dT 
)
virtual

Reimplemented in CInternalCableWithAttractor.


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