FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
RbCable::CableRM Class Reference

#include <Cable.h>

+ Inheritance diagram for RbCable::CableRM:
+ Collaboration diagram for RbCable::CableRM:

Classes

struct  element
 
struct  Retraction
 The retraction of the two ends as the model uses it at one instant (ClampRetraction). More...
 

Public Member Functions

 CableRM (const std::string &simObjectName, ISimObjectCreator *const creator)
 Reads parameters, registers states, input/output ports and shared resources.
 
void OdeFcn (const double T, const double *const X, double *const XDot) const
 Computes object derivatives as a function of time, states and input ports.
 
void InitialConditionSetup (const double T, const double *const currentIC, double *const updatedIC, ISimObjectCreator *const creator)
 
void FinalSetup (const double T, const double *const X, ISimObjectCreator *const creator)
 
void PreOdeFcn (const double T, const double *const X) override
 Takes the other objects' wakes at the centres of all elements for the step (MARE-0223).
 
const double * forceA (const double T, const double *const X)
 Output port. Returns current force in endpoint A of cable.
 
const double * forceB (const double T, const double *const X)
 Output port. Returns current force in endpoint B of cable.
 
void calculations (const double T, const double *const X)
 Performs a series of computations within the cable object.
 
void BuildChain (wet_cylinder_water::ChainJoints &chain, const double *X, int firstElement, int numElements) const
 Builds chain from elements firstElement ... firstElement + numElements - 1 at the state X.
 
void QueryJointWater (const double T, const double *const X)
 
void calculationsCommon (const double T, const double *const X) const
 

Protected Types

typedef Eigen::Matrix< double, 3, 3 > mat3
 
typedef Eigen::Matrix< double, 3, 1 > vec3
 

Protected Member Functions

void DistributeCatenary (Eigen::Matrix< double, 3, 1 > P1, Eigen::Matrix< double, 3, 1 > P2, double L, double lengthA, double lengthB, const double *currentIC, double *states, int i1, int i2)
 
void DistributeOnArcMidpoints (const vec3 &P1, const Eigen::Matrix< double, 2, 1 > &CatenaryU, double HorizontalDistance, double VerticalDifference, double L, const double *currentIC, double *states, int i1, int i2)
 
void SetElementUnlessUserSet (int i, const vec3 &centre, double angle, const Eigen::Matrix< double, 2, 1 > &CatenaryU, const double *currentIC, double *states)
 
void ReportError (const std::string &message) const
 
Retraction ClampRetraction (double lengthA, double lengthB, double speedA, double speedB) const
 

Protected Attributes

PrintDuringExec * m_print
 Null if the creator has no printer (fhsim::kSimMgrKeyPrinter), as in a unit test.
 
environment::SeafloorForcesInterface * m_seafloor = nullptr
 The shared SeafloorForces, from FinalSetup: the soil load of each element, a rigid cylinder.
 
environment::wake::ElementFlowInteraction m_flow
 The flow at the element centres, the other objects' wakes taken per step (MARE-0223); the Environment, from FinalSetup.
 
int m_numElements
 
double m_totalLength
 
double m_radius
 
double m_weight
 
double m_alphaN
 
double m_betaN
 
double m_epsilonN
 
JointLaw m_joint
 The bending and twist moments of the joints between the elements (MARE-0395).
 
double m_length
 
double m_mass
 
double m_Ixy
 
double m_Iz
 
bool m_kelp
 
double m_wKelp
 
bool m_gaussPointDrag = true
 Gauss-point drag with the water at the joints (MARE-0396).
 
wet_cylinder_water::ChainJoints m_chainJoints
 The joints of the free elements and the water at them; buffers kept from call to call.
 
wet_cylinder_water::ChainJoints m_takeJoints
 The joints of all elements, where the wakes are taken (PreOdeFcn); buffers kept from call to call.
 
element * m_el
 
ISignalPort * m_posA
 
ISignalPort * m_posB
 
ISignalPort * m_velA
 
ISignalPort * m_velB
 
ISignalPort * m_retractedLengthA
 
ISignalPort * m_retractedLengthB
 
ISignalPort * m_retractedSpeedA
 
ISignalPort * m_retractedSpeedB
 
int m_retractedNodesA
 
int m_retractedNodesB
 
int m_numFreeNodes
 
vec3 m_ka
 
vec3 m_kb
 
ICommonComputation * m_calcDynamics
 
Eigen::Matrix< double, Eigen::Dynamic, 1 > m_lambda
 
Eigen::Matrix< double, Eigen::Dynamic, 1 > m_F_MDotV
 
Eigen::Matrix< double, Eigen::Dynamic, 1 > m_B
 
double m_forceA [3]
 
double m_forceB [3]
 

Detailed Description

Author
Jørgen Haavind Jensen

Simobject name for use in input file: Cable.

Retains the same structural properties as the simObject CFlexibleBottomRing, but has a simpler interface where Young's and shear moduluses are provided rather than using the \(\alpha\), \(\beta\) and \(\epsilon\) values used in CFlexibleBottomRing.

Parameters
ParameterDefaultComment
cableLength-total length of the cable [m]
numElements-number of rigid elements in the cable [#]
diameter-diameter of the cable. [m]
cableWeight-weight of the cable [kg/m]
E-modulus-Young's modulus for cable material [Pa] (used as given in the compliance formulas of the class description)
G-modulus\(\frac{E-modulus}{2.6}\)shear modulus for cable material [Pa]
EI\(E\,7\pi D^4/5184\)bending stiffness of the cable [N m^2]
damping1structural damping of the axial constraints in the cable [-]
axialBaumgarteRate-Baumgarte rate of the axial constraints [1/s]; 100 to 1/dt, dt the solver's explicit step (class description)
ExternalWakeUpdateStep

How the other objects' wakes reach the element centres; listed in fhsim_environment's doc/user/wake-parameters.md

Input ports
TagSizeComment
PositionA3position of end-connection point A
PositionB3position of end-connection point B
VelocityA3velocity of end-connection point A
VelocityB3velocity of end-connection point B
RetractedLengthA1length of cable retracted on side A
RetractedLengthB1length of cable retracted on side B
RetractedSpeedA1retraction rate of cable retracted on side A
RetractedSpeedB1retraction rate of cable retracted on side B
Output ports
TagSizeComment
ForceA3Reaction force on side A
ForceB3Reaction force on side B
States
TagSizeComment
pos<i>3Position (x,y,z) of element with index <i>
vel<i>3Velocity of element with index <i>
theta<i>4Quaternion of element with index <i>
omega<i>3

Angular derivatives of element (?) <i>

Note
Each element carries the added mass Ca rho V f normal to its axis in its translational inertia (Ca = 1, DNV-RP-C205 (2021) Table A-1; V its volume, f its wet fraction; MARE-0314, owner ruling 2026-10-13, as fhsim_base Cable and TrawlCable), so its translational inertia is m I + Ca rho V f (I - N N^T), N its axis; nothing is added along the axis, to its moment of inertia, and the change of f in time is not included. Each element's load is that of water for its wet fraction f against the wave surface (a cylinder between its ends, gated by MaxWaveElevation) and that of air for 1 - f, and in waves it takes the Morison inertia force (1 + Ca) rho f V a_n normal to its axis (owner ruling R104, CableRMWaterLoad.h); the turning added mass gives a Coriolis force on the velocity relative to the water (MARE-0323). It was all water or all air by its centre's side of the surface. The other objects' wakes are taken once per integrator step, in PreOdeFcn, at the centres of all elements and held for the step; the current and the waves stay live (MARE-0223).

The seabed: each element is a rigid cylinder (D = 2 r, the element length, its axis) at rest in the soil's frame, and the soil load of the environment's shared SeafloorForces (force and moment) is added to its load, below the seabed too: the water load always applies (MARE-0392). The soil parameters are the environment's; the cable has none.

Revision history:
Q3 2011 JHJ: Initial version.

Constructor & Destructor Documentation

◆ CableRM()

RbCable::CableRM::CableRM ( const std::string &  simObjectName,
ISimObjectCreator *const  creator 
)

The constructor performs all initial setup for a cable 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 reads parameters, registers states, output and intput ports.

Member Function Documentation

◆ BuildChain()

void RbCable::CableRM::BuildChain ( wet_cylinder_water::ChainJoints &  chain,
const double *  X,
int  firstElement,
int  numElements 
) const

Finds the joints of the free elements and queries the water at them once (MARE-0396), for the Gauss-point drag.

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

◆ calculations()

void RbCable::CableRM::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

◆ ClampRetraction()

Retraction RbCable::CableRM::ClampRetraction ( double  lengthA,
double  lengthB,
double  speedA,
double  speedB 
) const
protected

The retracted lengths and speeds of the two ports under the limits of the model, one place for set-up, OdeFcn, calculations and the rendering (owner ruling D20, MARE-0413).

A negative length is 0 (with speed 0). Each end keeps two elements free, and the two ends together too: when the ends would retract more, the end that retracted more gives whole elements back until two are free. A cable of fewer than two elements does not retract.

Parameters
lengthARetracted length at end A [m].
lengthBRetracted length at end B [m].
speedARetraction speed at end A [m/s].
speedBRetraction speed at end B [m/s].
Returns
The limited lengths and speeds and the whole elements retracted at each end.

◆ DistributeCatenary()

void RbCable::CableRM::DistributeCatenary ( Eigen::Matrix< double, 3, 1 >  P1,
Eigen::Matrix< double, 3, 1 >  P2,
double  L,
double  lengthA,
double  lengthB,
const double *  currentIC,
double *  states,
int  i1,
int  i2 
)
protected

Lay the free elements i1 .. i2 - 1 of a slack cable on the catenary from P1 to P2, joints closed (MARE-0398): the joints lie on the curve, each element along its chord, and the arc length is chosen so that the last joint ends on P2. Falls back to DistributeOnArcMidpoints when that arc length is not found (a nearly taut cable). User-set states stand (MARE-0394).

Parameters
LThe free length [m].
lengthAThe distance from the centre of element i1 to P1 [m].
lengthBThe distance from the centre of element i2 - 1 to P2 [m].

◆ DistributeOnArcMidpoints()

void RbCable::CableRM::DistributeOnArcMidpoints ( const vec3 &  P1,
const Eigen::Matrix< double, 2, 1 > &  CatenaryU,
double  HorizontalDistance,
double  VerticalDifference,
double  L,
const double *  currentIC,
double *  states,
int  i1,
int  i2 
)
protected

The old placement: each element at the arc midpoint of its stretch of the catenary of arc length L, along the tangent there. Its joints are open by the arc-minus-chord differences.

◆ forceA()

const double * RbCable::CableRM::forceA ( 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 force in endpoint A of cable

◆ forceB()

const double * RbCable::CableRM::forceB ( 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 force in endpoint B of cable

◆ OdeFcn()

void RbCable::CableRM::OdeFcn ( const double  T,
const double *const  X,
double *const  XDot 
) const

Returns state derivatives.

Parameters
[in]T-> Current simulation time
[in]X-> Current simulation state
[out]XDot-> State derivatives

◆ ReportError()

void RbCable::CableRM::ReportError ( const std::string &  message) const
protected

Report a run time error through the print resource, or throw without it (MARE-0375).

Parameters
messageThe reason for the error.

◆ SetElementUnlessUserSet()

void RbCable::CableRM::SetElementUnlessUserSet ( int  i,
const vec3 &  centre,
double  angle,
const Eigen::Matrix< double, 2, 1 > &  CatenaryU,
const double *  currentIC,
double *  states 
)
protected

Set the centre, the orientation (a turn by angle about the horizontal normal to CatenaryU) and zero velocities of element i, except the states the user has set.


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