127#include <Eigen/Eigen>
129#include <fhsim/PrintDuringExec.h>
130#include <fhsim/simobject/SimObject.h>
131#include <fhsim_environment/EnvironmentProvider.h>
132#include <fhsim_environment/ElementFlowInteraction.h>
134#include "cable/GaussPointDrag.h"
135#ifdef FH_VISUALIZATION
136# include "sfh/ogre/C3DLine.h"
144 Ring(
const std::string& simObjectName, ISimObjectCreator*
const creator);
146 void OdeFcn(
const double T,
const double*
const X,
double*
const XDot)
const;
147 void InitialConditionSetup(
const double T,
const double*
const currentIC,
double*
const updatedIC, ISimObjectCreator*
const creator);
148 void FinalSetup(
const double T,
const double*
const X, ISimObjectCreator*
const creator)
override;
149 void PreOdeFcn(
const double T,
const double*
const X)
override;
157 void calculations(
const double T,
const double*
const X);
158 void calculationsCommon(
const double T,
const double*
const X)
const;
163 virtual const double* outConnectorPos(
const double T,
const double*
const X,
const int index);
164 virtual const double* outConnectorVel(
const double T,
const double*
const X,
const int index);
166#ifdef FH_VISUALIZATION
167 void RenderInit(Ogre::Root*
const ogreRoot, ISimObjectCreator*
const creator);
168 void RenderUpdate(
const double T,
const double*
const X);
172 typedef Eigen::Matrix<double, 3, 3> mat3;
173 typedef Eigen::Matrix<double, 3, 1> vec3;
176 double m_totalLength;
200 environment::wake::ElementFlowInteraction
m_flow;
216 double m_bending_epsilon[3];
238 ICommonComputation* m_calcDynamics;
239 Eigen::Matrix<double, Eigen::Dynamic, 1> m_lambda;
240 Eigen::Matrix<double, Eigen::Dynamic, 1> m_F_MDotV;
246#ifdef FH_VISUALIZATION
248 Ogre::SceneNode** m_ManualObjectNodes =
nullptr;
int m_ElementsPerConnector
number of elements between connectors
Definition Ring.h:210
wet_cylinder_water::ChainJoints m_joints
The joints of the closed loop of elements, and the water at them; buffers kept from call to call.
Definition Ring.h:202
bool m_gaussPointDrag
Gauss-point drag with the water at the joints (MARE-0396).
Definition Ring.h:201
double m_extlForce[3]
Array for holding current value of external force at a given node.
Definition Ring.h:212
Ring(const std::string &simObjectName, ISimObjectCreator *const creator)
reads parameters, registers states, output and intput ports.
void BuildJoints(const double *const X)
Finds the joints of the closed loop of elements from the state; the axis of an element is its quatern...
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:194
double ** m_aadConnectorVel
Local array for storing output velocities.
Definition Ring.h:214
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 joints,...
PrintDuringExec * m_print
The shared printer for run errors; null if the creator has none, as in a unit test.
Definition Ring.h:199
double ** m_aadConnectorPos
Local array for storing output positions.
Definition Ring.h:213
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:200
ISignalPort ** m_iIForce
Array of indices to connector forces in input vector.
Definition Ring.h:211
int m_numConnectors
number of additional connectors, if any
Definition Ring.h:209
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:208
Definition GaussPointDrag.h:58
mat3 MiT
The inverse of the translational inertia with the added mass normal to the axis, global frame (MARE-0...
Definition Ring.h:225