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

Public Member Functions

 CCylinder (const string &simObjectName, ISimObjectCreator *const creator)
 Reads parameters, registers states, input/output ports and shared resources. More...
 
virtual void FinalSetup (const double T, const double *const X, ISimObjectCreator *const pCreator)
 
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 *const Position (const double T, const double *const X)
 Output port. Returns current position. More...
 
const double *const Velocity (const double T, const double *const X)
 
virtual const double * PosCables (const double T, const double *const X)
 Output functions. Positions.
 
virtual const double * VelCables (const double T, const double *const X)
 

Protected Member Functions

void ForcesHydrodynamic (const double T, const double *const X)
 Froude-Kriloff and hydrostatic pressure forces summed over the wetted surface. More...
 
void ForcesPressureInt (const double T, const double *const X)
 Hydrodynamic excitation forces.
 
void RotationVector (const double T, const double *const X)
 Froude-Kriloff and static pressure forces integrated over instantanous wetted surface.
 
virtual const double * CollarConnectPos (const double T, const double *const X, int iCollarConnect)
 Calculates rotation quaternion.
 
virtual const double * CollarConnectVel (const double T, const double *const X, int iCollarConnect)
 
virtual const double * NetRoofConnectPos (const double T, const double *const X, int iNetRoofConnect)
 
virtual const double * NetRoofConnectVel (const double T, const double *const X, int iNetRoofCollarConnect)
 
Eigen::Matrix3d RotationMatrix (Eigen::Vector3d vector)
 

Protected Attributes

ISignalPort * m_ForceCables
 Output port. Returns current velocity. More...
 
int m_PositionIndex
 Input port. The external force from chains acting on the buoy.
 
int m_VelocityIndex
 The index of the position state in the state array.
 
double m_posCables [3]
 The index of the velocity state in the state array.
 
double m_velCables [3]
 Position of cable connectors (output variable)
 
double m_qVec [4]
 Velocity of cable connectors (output variable)
 
double m_innerRadius
 Rotation of buoy represented as a quaternion vector (matrix)
 
double m_outerRadius
 
double m_rhoHDPE
 
double m_mass
 
double m_radius
 Mass of the buoy.
 
double m_depth
 Radius of the buoy.
 
double m_heightTotal
 Depth of tube in the water.
 
double m_heightCone
 Height (Total included cone) of the bouy.
 
double m_offsetCables
 Bottom cone height of the buoy.
 
double m_Cd_xy
 Offset length cable mounting.
 
double m_Cd_z
 Drag coefficient circular cylinder (x,y)
 
double m_K3D
 Drag coefficient sphere (z)
 
bool m_isLinEq
 3D body reduction effect (viscous forces)
 
double m_linEqSwitch
 Boolean. true if linear dynamic (Froude-Kriloff) and linaer static pressure is to be used.
 
double m_cog
 Switch. 1 if linear dynamic (Froude-Kriloff) and linaer static pressure is to be used.
 
double * m_CollarConnectPos
 Center of gravity relative to base of cylindrical part of buoy.
 
double * m_CollarConnectVel
 
int m_nCollarConnect
 
ISignalPort ** m_CollarConnectExtForce
 
double * m_NetRoofConnectPos
 
double * m_NetRoofConnectVel
 
int m_nNetRoofConnect
 
ISignalPort ** m_NetRoofConnectExtForce
 
double m_a11
 Coefficients.
 
double m_a33
 Added mass x,y-direction.
 
double m_a44
 Added mass z-direction.
 
double m_b11
 Added mass pitch and roll (Faltinsen 1990, Sea Loads on Ships and Offshore Structures)
 
double m_b33
 Added mass x,y-direction.
 
double m_b44
 Potential damping z-direction.
 
double m_c33
 Potential damping in pitch and roll (Faltinsen 1990, Sea Loads on Ships and Offshore Structures)
 
double m_c44
 Spring stiffness z-direction.
 
double m_I4
 Spring stiffness in pitch and roll.
 
double m_rho
 Moment of inertia in pitch and roll approximation (Faltinsen 1990, Sea Loads on Ships and Offshore Structures)
 
double m_g
 Water density.
 
DeepSeaGravityWavesm_Environment
 Acceleration of gravity. More...
 
double m_F_FK [5]
 Pointer to DeepSeaGravityWaves -> CEnvironment. More...
 
double m_F_D [5]
 Froude-Kriloff pressure forces.
 
double m_F_visc [5]
 Diffraction forces.
 
double m_F_hydTot [5]
 Morison drag forces.
 
double m_F_SumPress [5]
 Total hydrodynamic forces.
 

Constructor & Destructor Documentation

◆ CCylinder()

Netcage::CCylinder::CCylinder ( 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.

Reads in "Mass2D" parameter and tests for validity. Registers communication interface; "Velocity"/"Position" output ports. Registers states; "Velocity"/"Position"

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

Member Function Documentation

◆ ForcesHydrodynamic()

void Netcage::CCylinder::ForcesHydrodynamic ( const double  T,
const double *const  X 
)
protected

Functions

◆ OdeFcn()

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

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?

◆ Position()

const double *const Netcage::CCylinder::Position ( const double  T,
const double *const  X 
)

See PortDefs.h

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

Member Data Documentation

◆ m_Environment

DeepSeaGravityWaves* Netcage::CCylinder::m_Environment
protected

Sea environment variables

◆ m_F_FK

double Netcage::CCylinder::m_F_FK[5]
protected

Forces. Hydrodynamic

◆ m_ForceCables

ISignalPort* Netcage::CCylinder::m_ForceCables
protected

See PortDefs.h

Parameters
[in]T-> Current simulation time
[in]X-> Current simulation state
Returns
-> Address of current velocity

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