FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
CableElBasics Class Referenceabstract

Class containing a fundamental cable element object. More...

#include <CableElBasics.h>

+ Inheritance diagram for CableElBasics:
+ Collaboration diagram for CableElBasics:

Public Member Functions

 CableElBasics ()
 The constructor.
 
 ~CableElBasics ()
 The destructor.
 
virtual void AddEndForces (const double adPosA[3], const double adVelA[3], const double adPosB[3], const double adVelB[3], const double adFluidVel[3], const double rhoWater, double adForceA[3], double adForceB[3])
 Calculates the end forces on the cable element.
 
virtual void SetConstants ()
 Calculates parameters and sets physical constants.
 
virtual void CalcMassAndWeight ()
 Calculates the mass and weight of the element in water.
 
virtual bool CheckAndInitialize ()
 Does the initialization and checking to make sure that the element is ready for simulation.
 
double GetDampingCoeff () const
 Returns the structural damping coefficient (negative value: -2*dampRatio*area*sqrt(E*rho)).
 
virtual void UpdateLength (double newLength)
 Upates the length of the cable element, and its dependant properties.
 
double GetLength ()
 
void SetSurfaceElevation (double etaA, double etaB)
 
virtual double SurfaceHalfSize () const
 The half-size the surface gate needs: the element's radius; larger with floats (NetCableElement).
 
void SetWaveAcceleration (const double acceleration[3])
 
double InertiaShare () const
 The inertia force factor of one end node: half of (1 + Ca) rho V f (environment::cylinder_hydro::InertiaForceFactor).
 
void WaveExcitationPositionJacobian (const double posA[3], const double posB[3], const double acceleration[3], double dF_dpB[9]) const
 
void DragVelocityJacobian (const double posA[3], const double posB[3], const double velA[3], const double velB[3], const double vFluid[3], double rhoWater, double dFA_dvA[9], double dFA_dvB[9], double dFB_dvA[9], double dFB_dvB[9]) const
 
void DragPositionJacobian (const double posA[3], const double posB[3], const double velA[3], const double velB[3], const double vFluid[3], double rhoWater, double dFA_dpA[9], double dFA_dpB[9], double dFB_dpA[9], double dFB_dpB[9]) const
 
double BlendedFluidDensity (const double posA[3], const double posB[3]) const
 

Public Attributes

unsigned long m_iD
 The ID of the element.
 
std::string m_cableName
 The name of the parent cable.
 
double m_dL0
 The relaxed length of the element.
 
double m_dD
 The diameter of the element.
 
double m_dE
 The Young modulus of the element.
 
double m_rho
 The density of the element material.
 
double m_addedWeightInWater
 The weight in water added to the element.
 
double m_tangentialFrictionCoeff
 The tangential drag coefficient of the cable element.
 
double m_normalDragCoeff
 The normal drag coefficient of the cable element.
 
double m_rhoWater
 The density of the surrounding fluid: the water density blended with the air density by the submerged fraction (CalcFoundation).
 
double m_rhoWaterFull = 1025.0
 The water density the owner passed, unblended [kg/m³]; also that of the stiffness factor (CableElDynStiff, MARE-0357).
 
double m_rhoAir = 1.2
 The air density, kg/m³; the owner sets the environment's (cable_air::EnvironmentAirDensity, owner ruling R65).
 
double m_minLength
 The minimum length of the element.
 
double m_maxTension
 The maximum tension in the element.
 
double m_dampingRatio
 The relative damping ratio of the cable.
 
double m_eA
 The linear stiffness of the element.
 
double m_dA
 The cross sectional area of the cable.
 
double m_weightInWater [2]
 The weight in water distributed to each node.
 
double m_massInWater [2]
 The mass in water distributed to each node.
 
double m_weightInWaterPerMeter [2]
 The weight in water distributed to each node, per meter cable.
 
double m_massInWaterPerMeter [2]
 The mass in water distributed to each node, per meter cable.
 

Protected Member Functions

virtual bool AppendagesNearTheSurface ()
 True when a float on the element is near the surface, so its weight must be recomputed every call; none here.
 
double WetFractionAt (const double posA[3], const double posB[3], double submergence[2], double &axisVertical) const
 
void AddWaveExcitationCable (double adForceA[3], double adForceB[3]) const
 Adds the rope's Froude-Krylov and added-mass wave excitation (owner rulings R67, R104). CalcFoundation must be run first.
 
void CalcFoundation (const double adPosA[3], const double adVelA[3], const double adPosB[3], const double adVelB[3], const double adFluidVel[3], const double rhoWater)
 
virtual void AddStructuralForces (double adForceA[3], double adForceB[3])=0
 
void AddGravityBuoyancy (double adForceA[3], double adForceB[3], const double adPosA[3], const double adPosB[3])
 Adds the forces from gravity and buoyancy to the nodes. CalcFoundation must be run first.
 
void AddHydroForcesCable (double adForceA[3], double adForceB[3])
 Calculates the hydrodynamic forces on the cable and the spheres and disks attached to it. CalcFoundation must be run first.
 

Protected Attributes

double m_surfaceElevation [2] = {0.0, 0.0}
 η above the ends [m] (SetSurfaceElevation).
 
double m_submergence [2] = {1e10, 1e10}
 z + η at the ends at the last CalcFoundation [m]; deep before the first.
 
double m_axisVertical = 0.0
 The vertical component of the unit axis A→B at the last CalcFoundation.
 
double m_wetFraction = 1.0
 The element's wet fraction at the last CalcFoundation (CylinderWetFraction).
 
double m_waveAcceleration [3] = {0.0, 0.0, 0.0}
 The water particle acceleration at the element (SetWaveAcceleration) [m/s²].
 
double ma_adDirection [3]
 Memory allocation to increase the computational efficiency.
 
double ma_dDampingCoeff
 A intermediate damping calculation to increase the computational efficiency.
 
double ma_adVel [3]
 The average hydrodynamic velocity of the element.
 
double ma_dVelAmp
 The scalar average hydrodynamic velocity of the element.
 
double ma_adVt [3]
 The average tangential hydrodynamic velocity of the element.
 
double ma_dVtAmp
 The scalar average tangential hydrodynamic velocity of the element.
 
double ma_adVn [3]
 The average normal hydrodynamic velocity of the element.
 
double ma_dVnAmp
 The scalar average normal hydrodynamic velocity of the element.
 
double ma_adVn_A [3]
 The hydrodynamic normal velocity of the end A: its own velocity against the water, the part normal to the element, saturated.
 
double ma_adVn_B [3]
 The hydrodynamic normal velocity of the end B.
 
double ma_dVnAmp_A
 The scalar hydrodynamic normal velocity of the end A (saturated with the vector).
 
double ma_dVnAmp_B
 The scalar hydrodynamic normal velocity of the end B.
 
double ma_adVt_A [3]
 The hydrodynamic axial velocity of the end A: its own velocity against the water, the part along the element, saturated.
 
double ma_adVt_B [3]
 The hydrodynamic axial velocity of the end B.
 
double ma_dVtAmp_A
 The speed of the hydrodynamic axial velocity of the end A (unsigned, saturated with the vector).
 
double ma_dVtAmp_B
 The speed of the hydrodynamic axial velocity of the end B.
 
double ma_dLength
 The actual distance between the ends.
 
double ma_dCompressionSpeed
 The speed at which the distance between the two ends decreases.
 

Detailed Description

Author
Karl-Johan Reite

Member Function Documentation

◆ AddStructuralForces()

virtual void CableElBasics::AddStructuralForces ( double  adForceA[3],
double  adForceB[3] 
)
protectedpure virtual

Adds the forces from tension and internal damping to the nodes (CableElDynStiff: the axial law, CableAxialLaw.h). CalcFoundation must be run first.

Implemented in CableElDynStiff.

◆ AppendagesNearTheSurface()

virtual bool CableElBasics::AppendagesNearTheSurface ( )
inlineprotectedvirtual

Reimplemented in NetCableElement.

◆ BlendedFluidDensity()

double CableElBasics::BlendedFluidDensity ( const double  posA[3],
const double  posB[3] 
) const

The fluid density of the element with its ends at posA and posB: the water density the owner passed last (m_rhoWaterFull) blended with the air density by the wet fraction against the surface elevations last set, as CalcFoundation blends it (owner rulings R65, R66). For an analytical Jacobian at a state other than the last CalcFoundation's (MARE-0319).

Parameters
posAEnd A [m], NED.
posBEnd B [m], NED.
Returns
f rhoWater + (1 - f) rhoAir [kg/m³].

◆ CalcFoundation()

void CableElBasics::CalcFoundation ( const double  adPosA[3],
const double  adVelA[3],
const double  adPosB[3],
const double  adVelB[3],
const double  adFluidVel[3],
const double  rhoWater 
)
protected

Calculates the member variables used for increased computational efficiency, and must be run before any further calculations.

◆ CalcMassAndWeight()

virtual void CableElBasics::CalcMassAndWeight ( )
virtual

Reimplemented in NetCableElement.

◆ CheckAndInitialize()

virtual bool CableElBasics::CheckAndInitialize ( )
virtual

Reimplemented in CableElDynStiff, and NetCableElement.

◆ DragPositionJacobian()

void CableElBasics::DragPositionJacobian ( const double  posA[3],
const double  posB[3],
const double  velA[3],
const double  velB[3],
const double  vFluid[3],
double  rhoWater,
double  dFA_dpA[9],
double  dFA_dpB[9],
double  dFB_dpA[9],
double  dFB_dpB[9] 
) const

The 3x3 position blocks of the drag: the turning of the element's axis changes the axial and normal parts of each end's velocity. For an analytical Jacobian; the same omissions as DragVelocityJacobian. A displacement of end B is the opposite of one of end A.

Parameters
posAEnd A [m], NED.
posBEnd B [m], NED.
velAVelocity of end A [m/s].
velBVelocity of end B [m/s].
vFluidThe water velocity at the element [m/s].
rhoWaterThe fluid density of the element [kg/m³], the air/water blend (MARE-0319).
dFA_dpAOut: dF_A[j]/dpA[k] at [3 * j + k] [N/m]. The other three outputs follow the same naming.

◆ DragVelocityJacobian()

void CableElBasics::DragVelocityJacobian ( const double  posA[3],
const double  posB[3],
const double  velA[3],
const double  velB[3],
const double  vFluid[3],
double  rhoWater,
double  dFA_dvA[9],
double  dFA_dvB[9],
double  dFB_dvA[9],
double  dFB_dvB[9] 
) const

The 3x3 velocity blocks of the drag (AddHydroForcesCable): each end node's axial and normal drag on its own velocity, so the blocks between the two ends are zero. For an analytical Jacobian. The position blocks are DragPositionJacobian's; the clip at kSaturationSpeed, the slope of the air/water blend and the spatial gradient of vFluid are left out.

Parameters
posAEnd A [m], NED.
posBEnd B [m], NED.
velAVelocity of end A [m/s].
velBVelocity of end B [m/s].
vFluidThe water velocity at the element [m/s].
rhoWaterThe fluid density of the element [kg/m³], the air/water blend (MARE-0319).
dFA_dvAOut: dF_A[j]/dvA[k] at [3 * j + k] [N s/m]. The other three outputs follow the same naming.

◆ InertiaShare()

double CableElBasics::InertiaShare ( ) const

The added-mass coefficient of the rope normal to its axis is environment::cylinder_hydro::kCylinderAddedMassCoefficient, Ca = 1 (the exact potential-flow value, Newman, Marine Hydrodynamics, 1977; DNV-RP-C205 (2021), Appendix A, Table A-1 gives the same). The element's inertia (rho_c + rho) A L (CalcMassAndWeight) carries the same Ca, in every direction.

◆ SetConstants()

virtual void CableElBasics::SetConstants ( )
virtual

Reimplemented in NetCableElement.

◆ SetSurfaceElevation()

void CableElBasics::SetSurfaceElevation ( double  etaA,
double  etaB 
)
inline

Sets the surface elevation η above the two ends for the next force evaluations (owner ruling R66).

The owner evaluates η at the ends, or passes 0 where the element is deeper, or higher, than the maximum wave elevation plus SurfaceHalfSize() (then the fraction is the same).

Parameters
etaAη above end A [m], positive up.
etaBη above end B [m].

◆ SetWaveAcceleration()

void CableElBasics::SetWaveAcceleration ( const double  acceleration[3])
inline

Sets the water particle acceleration at the element for the next force evaluations (owner rulings R67, R104); 0 by default, so an owner without waves adds nothing.

Parameters
accelerationThe acceleration [m/s²], NED.

◆ SurfaceHalfSize()

virtual double CableElBasics::SurfaceHalfSize ( ) const
inlinevirtual

Reimplemented in NetCableElement.

◆ WaveExcitationPositionJacobian()

void CableElBasics::WaveExcitationPositionJacobian ( const double  posA[3],
const double  posB[3],
const double  acceleration[3],
double  dF_dpB[9] 
) const

The derivative of the rope's wave excitation (AddWaveExcitationCable) in the position of end B through the turning of the element's axis (owner ruling R108), for an analytical Jacobian. The force is the same on both ends, and its derivative in end A is the negative. The wet fraction is the last CalcFoundation's, and the gradient of the wave field and of the wet fraction are left out, as the drag's current gradient is.

Parameters
posAEnd A [m], NED.
posBEnd B [m], NED.
accelerationThe water particle acceleration at the element [m/s²], NED.
dF_dpBOut: dF[j]/dpB[k] at [3 * j + k] [N/m].

◆ WetFractionAt()

double CableElBasics::WetFractionAt ( const double  posA[3],
const double  posB[3],
double  submergence[2],
double &  axisVertical 
) const
protected

The wet fraction of the element with its ends at posA and posB against the surface elevations last set (owner ruling R66, environment::body_submergence::CylinderWetFraction).

Parameters
posAEnd A [m], NED.
posBEnd B [m], NED.
submergenceOut: z + η at the two ends [m].
axisVerticalOut: the vertical component of the unit axis A→B.

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