Marine systems simulation
|
#include <CCable.h>
Classes | |
struct | element |
Public Member Functions | |
CCableRM (const string &simObjectName, ISimObjectCreator *const creator) | |
Reads parameters, registers states, input/output ports and shared resources. More... | |
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... | |
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) |
const double * | forceA (const double T, const double *const X) |
Output port. Returns current force in endpoint A of cable. More... | |
const double * | forceB (const double T, const double *const X) |
Output port. Returns current force in endpoint B of cable. More... | |
void | calculations (const double T, const double *const X) |
Performs a series of computations within the cable object. More... | |
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 *states, int i1, int i2, ISimObjectCreator *creator) |
Protected Attributes | |
CPrintDuringExec * | m_print |
CEnvironment * | m_environment |
int | m_numElements |
double | m_totalLength |
double | m_radius |
double | m_weight |
double | m_alphaN |
double | m_betaN |
double | m_epsilonN |
double | m_alphaM |
double | m_betaM |
double | m_epsilonM |
double | m_alphaT |
double | m_betaT |
double | m_epsilonT |
double | m_bending_epsilon [3] |
double | m_length |
double | m_mass |
double | m_Ixy |
double | m_Iz |
bool | m_kelp |
double | m_wKelp |
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 |
double | m_forceA [3] |
double | m_forceB [3] |
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.
Parameter | Default | Comment |
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[GPa] |
G-modulus | \(\frac{E-modulus}{2.6}\) | shear modulus for cable material[GPa] |
damping | 1 | structural damping in the cable [-] |
updateFreq | - | parameter which preserves simulation stability [-] |
stabilityFactor | - | parameter which preserves simulation stability [-] |
Tag | Size | Comment |
PositionA | 3 | position of end-connection point A |
PositionB | 3 | position of end-connection point B |
VelocityA | 3 | velocity of end-connection point A |
VelocityB | 3 | velocity of end-connection point B |
RetractedLengthA | 1 | length of cable retracted on side A |
RetractedLengthB | 1 | length of cable retracted on side B |
RetractedSpeedA | 1 | retraction rate of cable retracted on side A |
RetractedSpeedB | 1 | retraction rate of cable retracted on side B |
Tag | Size | Comment |
ForceA | 3 | Reaction force on side A |
ForceB | 3 | Reaction force on side B |
Tag | Size | Comment |
pos<i> | 3 | Position (x,y,z) of element with index <i> |
vel<i> | 3 | Velocity of element with index <i> |
theta<i> | 4 | Quaternion of element with index <i> |
omega<i> | 3 | Angular derivatives of element (?) <i> |
\par Revision history: Q3 2011 JHJ: Initial version.
RbCable::CCableRM::CCableRM | ( | const 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.
[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. |
void RbCable::CCableRM::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.
[in] | T | -> Current simulation time |
[in] | X | -> Current simulation state |
const double * RbCable::CCableRM::forceA | ( | const double | T, |
const double *const | X | ||
) |
See PortDefs.h
[in] | T | -> Current simulation time |
[in] | X | -> Current simulation state |
const double * RbCable::CCableRM::forceB | ( | const double | T, |
const double *const | X | ||
) |
See PortDefs.h
[in] | T | -> Current simulation time |
[in] | X | -> Current simulation state |
void RbCable::CCableRM::OdeFcn | ( | const double | T, |
const double *const | X, | ||
double *const | XDot, | ||
const bool | IsMajorTimeStep | ||
) |
Returns state derivatives.
[in] | T | -> Current simulation time |
[in] | X | -> Current simulation state |
[out] | XDot | -> State derivatives |
[in] | IsMajorTimeStep | -> Is this a major time step? |