FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
RBCEngine Class Reference

Class containing a Rigid Bar Cable (RBC) calculation engine. More...

#include <RBCEngine.h>

Public Member Functions

 RBCEngine (int nofBarElements, double barMass, double length, double omegaNL, double omegaN, double zetaNL, double zetaN, bool fixedFixed, double kei, double ked, double kep, double endNodeSumMax=10.0)
 The constructor.
 
 ~RBCEngine ()
 The destructor cleans up dynamically allocated memory.
 
bool GetInitialStates (const double *const posA, const double *const posB, const double *const velA, const double *const velB, double *vecB, double *vecR, double *vecBdot, double *vecRdot, double *endNodeSum)
 
bool StateUpdate (const double *const posA, const double *const velA, const double *const vecB, const double *const vecR, const double *const vecBdot, const double *const vecRdot, double *nodeForces)
 
void AdvanceEndControl (const double *const posB, const double *const velB, const double *const vecB, const double *const vecBdot, const double *const vecR, const double *const vecRdot, const double *const endNodeSum)
 
void GetEndNodeSumDot (const double *const posB, const double *const vecB, const double *const vecR, const double *const endNodeSum, double *endNodeSumDot) const
 
bool GetAccelerations (double *dotDot, double *rDotDot)
 Get functions are based on the last StateUpdate call.
 
bool GetEndForces (double *forceA, double *forceB)
 (dim: 3)
 
bool GetNodePositions (double *nodePosition)
 (dim: 3(N+1))
 
bool GetNodeVelocities (double *nodeVelocities)
 (dim: 3(N+1))
 
bool IsInitialised () const
 True once GetInitialStates has run. Before that StateUpdate computes nothing.
 

Detailed Description

Author
Nina A H Madsen

Constructor & Destructor Documentation

◆ RBCEngine()

RBCEngine::RBCEngine ( int  nofBarElements,
double  barMass,
double  length,
double  omegaNL,
double  omegaN,
double  zetaNL,
double  zetaN,
bool  fixedFixed,
double  kei,
double  ked,
double  kep,
double  endNodeSumMax = 10.0 
)
Parameters
nofBarElementsThe number of bar elements in the cable
barMassThe mass of one bar of the cable.
lengthLength of a bar
omegaNLThe natural frequency, length constrain
omegaNThe natural frequency, node constrain
zetaNLRelative damping ratio, length constrain
zetaNRelative damping ratio, node constrain
fixedFixedIs the model fixated in both cable ends
keiParameter for FixedFixed
kedParameter for FixedFixed
kepParameter for FixedFixed
endNodeSumMaxAnti-windup limit of each component of the state EndNodeSum [m s] (agent default 10, the old fixed reset limit 10.01)

Member Function Documentation

◆ AdvanceEndControl()

void RBCEngine::AdvanceEndControl ( const double *const  posB,
const double *const  velB,
const double *const  vecB,
const double *const  vecBdot,
const double *const  vecR,
const double *const  vecRdot,
const double *const  endNodeSum 
)

The end control force (PID law, eq 6.141) at the accepted state, held until the next call. StateUpdate only reads the held control, so it is the same however often it runs (rule R3, ADR 0017). The I term is Kei times the state EndNodeSum, the integral of the end constraint error C (units m s), each component clamped to +- endNodeSumMax. Does nothing unless fixed-fixed.

Parameters
posB(dim: 3)
velB(dim: 3)
vecB(dim: 3N)
vecBdot(dim: 3N)
vecR(dim: 3N)
vecRdot(dim: 3N)
endNodeSum(dim: 3) the state EndNodeSum, the integral of C

◆ GetAccelerations()

bool RBCEngine::GetAccelerations ( double *  dotDot,
double *  rDotDot 
)

(dim: 3N

◆ GetEndNodeSumDot()

void RBCEngine::GetEndNodeSumDot ( const double *const  posB,
const double *const  vecB,
const double *const  vecR,
const double *const  endNodeSum,
double *  endNodeSumDot 
) const

The derivative of the state EndNodeSum: the end constraint error C = posB - (r_n + b_n / 2) at the given state, zero unless fixed-fixed. A component that has reached the anti-windup limit and whose error pushes it further out has derivative zero (conditional integration), so the state stays in +- endNodeSumMax. A function of its arguments only.

Parameters
posB(dim: 3)
vecB(dim: 3N)
vecR(dim: 3N)
endNodeSum(dim: 3) the state EndNodeSum
endNodeSumDot(dim: 3)

◆ GetInitialStates()

bool RBCEngine::GetInitialStates ( const double *const  posA,
const double *const  posB,
const double *const  velA,
const double *const  velB,
double *  vecB,
double *  vecR,
double *  vecBdot,
double *  vecRdot,
double *  endNodeSum 
)
Parameters
posAPosition A (dim:3)
posBPosition B (dim:3)
velAVelocity A (dim:3)
velBVelocity B (dim:3)
vecBState vector B (dim:3N) where N is the number of bar elements in the cable
vecRState vector R (dim:3N)
vecBdotState vector B time derived(dim:3N)
vecRdotState vector R time derived (dim:3N)
endNodeSumState vector EndNodeSum (dim:3)

◆ StateUpdate()

bool RBCEngine::StateUpdate ( const double *const  posA,
const double *const  velA,
const double *const  vecB,
const double *const  vecR,
const double *const  vecBdot,
const double *const  vecRdot,
double *  nodeForces 
)

StateUpdate is to be called when the next time step is happening

Parameters
posA(dim: 3)
velA(dim: 3)
vecB(dim: 3N)
vecR(dim: 3N)
vecBdot(dim: 3N)
vecRdot(dim: 3N)
nodeForces(dim: 6N))

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