128#include <Eigen/Eigen>
130#include <fhsim/PrintDuringExec.h>
131#include <fhsim/simobject/SimObject.h>
132#include <fhsim_environment/EnvironmentProvider.h>
133#include <fhsim_environment/ElementFlowInteraction.h>
135#include "cable/GaussPointDrag.h"
136#ifdef FH_VISUALIZATION
137# include "sfh/ogre/C3DLine.h"
145 Ring(
const std::string& simObjectName, ISimObjectCreator*
const creator);
147 void OdeFcn(
const double T,
const double*
const X,
double*
const XDot)
const;
148 void InitialConditionSetup(
const double T,
const double*
const currentIC,
double*
const updatedIC, ISimObjectCreator*
const creator);
149 void FinalSetup(
const double T,
const double*
const X, ISimObjectCreator*
const creator)
override;
150 void PreOdeFcn(
const double T,
const double*
const X)
override;
158 void calculations(
const double T,
const double*
const X);
159 void calculationsCommon(
const double T,
const double*
const X)
const;
164 virtual const double* outConnectorPos(
const double T,
const double*
const X,
const int index);
165 virtual const double* outConnectorVel(
const double T,
const double*
const X,
const int index);
167#ifdef FH_VISUALIZATION
168 void RenderInit(Ogre::Root*
const ogreRoot, ISimObjectCreator*
const creator);
169 void RenderUpdate(
const double T,
const double*
const X);
173 typedef Eigen::Matrix<double, 3, 3> mat3;
174 typedef Eigen::Matrix<double, 3, 1> vec3;
177 double m_totalLength;
201 environment::wake::ElementFlowInteraction
m_flow;
217 double m_bending_epsilon[3];
239 ICommonComputation* m_calcDynamics;
240 Eigen::Matrix<double, Eigen::Dynamic, 1> m_lambda;
241 Eigen::Matrix<double, Eigen::Dynamic, 1> m_F_MDotV;
247#ifdef FH_VISUALIZATION
249 Ogre::SceneNode** m_ManualObjectNodes =
nullptr;
int m_ElementsPerConnector
number of elements between connectors
Definition Ring.h:211
wet_cylinder_water::ElementGaussPoints m_gaussPoints
The Gauss points of the elements of the loop, and the water at them; buffers kept from call to call.
Definition Ring.h:203
bool m_gaussPointDrag
Gauss-point drag with the water at the Gauss points (MARE-0396).
Definition Ring.h:202
double m_extlForce[3]
Array for holding current value of external force at a given node.
Definition Ring.h:213
Ring(const std::string &simObjectName, ISimObjectCreator *const creator)
reads parameters, registers states, output and intput ports.
double m_centrePosInit[3]
Parameter for describing the initial position of the centre of the ring (not an IC since there is no ...
Definition Ring.h:195
double ** m_aadConnectorVel
Local array for storing output velocities.
Definition Ring.h:215
void PreOdeFcn(const double T, const double *const X) override
Takes the other objects' wakes at the element centres, or with the Gauss-point drag at the Gauss poin...
void BuildGaussPoints(const double *const X)
Finds the Gauss points of the closed loop of elements from the state; the axis of an element is its q...
PrintDuringExec * m_print
The shared printer for run errors; null if the creator has none, as in a unit test.
Definition Ring.h:200
double ** m_aadConnectorPos
Local array for storing output positions.
Definition Ring.h:214
environment::wake::ElementFlowInteraction m_flow
The flow at the element centres, the other objects' wakes taken per step (MARE-0223); the Environment...
Definition Ring.h:201
ISignalPort ** m_iIForce
Array of indices to connector forces in input vector.
Definition Ring.h:212
int m_numConnectors
number of additional connectors, if any
Definition Ring.h:210
void FinalSetup(const double T, const double *const X, ISimObjectCreator *const creator) override
Takes the Environment (MARE-0315).
virtual void GetExternalForces(const double T, const double *const X, double *m_extlForce, int index)
get the external forces at element 'index'. Should be overridden by inheriting classes to get forces ...
bool m_additionalConnectors
flag for additional connectors along cable
Definition Ring.h:209
Definition GaussPointDrag.h:56
mat3 MiT
The inverse of the translational inertia with the added mass normal to the axis, global frame (MARE-0...
Definition Ring.h:226