Marine systems simulation
FloatingCollarCoRiBo.h
1#pragma once
2
3#include <CEnvironment.h>
4#include <RingStructure.h>
5#include <RigidElement.h>
6
7namespace Netcage {
8
16class FloatingCollarCoRiBo : public SimObject {
17public:
18
20 FloatingCollarCoRiBo(const string& simobjectname, ISimObjectCreator* const creator);
21
24
25 void OdeFcn(const double T, const double *const X, double *const XDot, const bool IsMajorTimeStep);
26
28 void InitialConditionSetup(const double T, const double *const CurrentIC, double *const UpdatedIC, ISimObjectCreator *const Creator);
29
31 virtual void FinalSetup(const double T, const double* const X, ISimObjectCreator* const pCreator);
32
34 const double* GetElementPosition(const double T, const double* const X, int iElem);
35 const double* GetElementVelocity(const double T, const double* const X, int iElem);
36
40 double elemMass;
41 double* Ca;
42 double* Cb;
43 double elemVolume;
44 double elemRadius;
45 double elemLength;
46 double elemArea;
47 double elemProjArea;
49 double Cd_n;
50 double Cd_t;
51 double rhoWater;
52 double g;
53
57 double* BridleForces;
58
61 double* NetForces;
62 } m_forceCoeffs;
63
64#ifdef FH_VISUALIZATION
65 virtual void RenderInit(Ogre::Root* const ogreRoot, ISimObjectCreator* const creator);
66 virtual void RenderUpdate(const double T, const double* const X);
67#endif
68
69protected:
70 int m_Num;
71 double m_Beta;
72
76
79 double* m_NetForces;
80
82 void GetExternalForces(const double T, const double* X, ISignalPort** forcesIn, double* forces, int numForces);
83
87
88 ISignalPort** m_BridleForcesIn;
89 ISignalPort** m_NetForcesIn;
90
91 // Structural
98 double m_InitPos[3];
100 double m_multiply;
101
102 // Hydrodynamics
103 double m_Cd_t;
104 double m_Cd_n;
105 double m_Ca[3];
106 double m_Cb[3];
107 double m_rhoWater;
108 double m_g;
109
111};
112
114public:
115 RingEnvironmentForces(CoRiBoDynamics::ConstraintSolver* solver, CEnvironment* environment, double timeConstant, vector<CoRiBoDynamics::RigidElement*> &elements, Netcage::FloatingCollarCoRiBo::forceCoefficients *coefficients);
116
117 void ComputeConstraints(const double T, const double * const X);
118protected:
119 vector<CoRiBoDynamics::RigidElement*> m_elements;
120 double m_timeConstant;
121 CEnvironment* m_environment;
122
123 double m_elemMass;
124 double* m_Ca;
125 double* m_Cb;
127 double m_elemArea;
132 double m_Cd_n;
133 double m_Cd_t;
134 double m_rhoWater;
135 double m_g;
136
140
143 double* m_NetForces;
144};
145}
Definition: CEnvironment.h:10
Definition: ConstraintSet.h:24
Definition: ConstraintSolver.h:31
Definition: JointConstraint.h:17
Definition: RingStructure.h:8
Definition: FloatingCollarCoRiBo.h:16
const double * GetElementPosition(const double T, const double *const X, int iElem)
Get Functions.
FloatingCollarCoRiBo(const string &simobjectname, ISimObjectCreator *const creator)
The constructor sets the pointer to the output object and the parser object.
double m_multiply
Switch for when single (equals 0.0) and double (equals 1.0) pipe floater is used.
Definition: FloatingCollarCoRiBo.h:100
double m_Cb[3]
Added mass coefficient array for Mass matrix and diffraction force. 1.0 is equal to mass of displaced...
Definition: FloatingCollarCoRiBo.h:106
double m_Ca[3]
Drag coefficient. Normal drag.
Definition: FloatingCollarCoRiBo.h:105
const double * GetElementVelocity(const double T, const double *const X, int iElem)
NEW.
double m_rhoWater
Potential damping (wave damping) coefficient array for diffraction force. 1.0 is equal to mass of dis...
Definition: FloatingCollarCoRiBo.h:107
int m_numNetConnectors
Bridle forces of an element connected to a bridle.
Definition: FloatingCollarCoRiBo.h:77
int * m_BridleElemIndex
Number of bridle connectors.
Definition: FloatingCollarCoRiBo.h:74
bool m_isDoubleTubeCollar
Tube mass per metre [kg/m].
Definition: FloatingCollarCoRiBo.h:96
double m_Beta
number of discrete elements in the collar
Definition: FloatingCollarCoRiBo.h:71
CoRiBoDynamics::ConstraintSolver * m_ConstraintSolver
NEW.
Definition: FloatingCollarCoRiBo.h:84
double * m_BridleForces
Index of elements connected to a bridle.
Definition: FloatingCollarCoRiBo.h:75
ISignalPort ** m_BridleForcesIn
Rinf structure.
Definition: FloatingCollarCoRiBo.h:88
double m_doubleSwitch
Initial position of the center of the floating collar in (x,y,z) coordinates.
Definition: FloatingCollarCoRiBo.h:99
double m_CollarTubeThickness
Diamter of the pipe comprising the floating collar.
Definition: FloatingCollarCoRiBo.h:94
double m_CollarTubeDiameter
Diameter of floating collar centre to centre (c-c) of the pipe.
Definition: FloatingCollarCoRiBo.h:93
~FloatingCollarCoRiBo()
The destructor cleans up.
int m_numBridles
main frequency coefficient
Definition: FloatingCollarCoRiBo.h:73
double m_Cd_n
Drag coefficient. Tangential drag.
Definition: FloatingCollarCoRiBo.h:104
double m_InitPos[3]
Distance (centre-centre) between the to concetric pipes comprinsing a standard floating collar.
Definition: FloatingCollarCoRiBo.h:98
double m_CollarTubeDistance
True if floating collar consists of two tubes.
Definition: FloatingCollarCoRiBo.h:97
ISignalPort ** m_NetForcesIn
Signal port containing forces from bridle connectors.
Definition: FloatingCollarCoRiBo.h:89
void GetExternalForces(const double T, const double *X, ISignalPort **forcesIn, double *forces, int numForces)
Net forces of an element connected to the net.
double * m_NetForces
Index of elements connected to the net.
Definition: FloatingCollarCoRiBo.h:79
double m_Cd_t
Multiplier for floating collar comprised of two concentric pipes (tubes). Equals 1....
Definition: FloatingCollarCoRiBo.h:103
double m_CollarTubeUnitMass
Wall thickness of the material comprising the floating collar tube.
Definition: FloatingCollarCoRiBo.h:95
double m_g
Density of water. It kind of depends.
Definition: FloatingCollarCoRiBo.h:108
void InitialConditionSetup(const double T, const double *const CurrentIC, double *const UpdatedIC, ISimObjectCreator *const Creator)
Initializes the collar elements in a ring.
int * m_NetElemIndex
Number of net connectors.
Definition: FloatingCollarCoRiBo.h:78
virtual void FinalSetup(const double T, const double *const X, ISimObjectCreator *const pCreator)
Final setup.
CoRiBoDynamics::JointConstraint * m_ConstraintSet
Constraint solver.
Definition: FloatingCollarCoRiBo.h:85
double m_CollarRingDiameter
Signal port containing forces from net connections.
Definition: FloatingCollarCoRiBo.h:92
CEnvironment * m_Environment
Acceleration of gravity. Not usually something you want to meddle with.
Definition: FloatingCollarCoRiBo.h:110
Definition: FloatingCollarCoRiBo.h:113
int m_numBridles
Acceleration of gravity. Not usually something you want to meddle with.
Definition: FloatingCollarCoRiBo.h:137
double m_Cd_t
Normal drag coefficient for an element in the ring structure.
Definition: FloatingCollarCoRiBo.h:133
double m_elemVolume
Potential wave damping coefficient array for Mass matrix and diffraction force. 1....
Definition: FloatingCollarCoRiBo.h:126
double m_elemLength
Diameter for an element in the ring structure.
Definition: FloatingCollarCoRiBo.h:131
double * m_BridleForces
Pointer to array holding element index of bridle connection points.
Definition: FloatingCollarCoRiBo.h:139
void ComputeConstraints(const double T, const double *const X)
double * m_Ca
Mass for an element in the ring structure.
Definition: FloatingCollarCoRiBo.h:124
double * m_Cb
Added mass coefficient array for Mass matrix and diffraction force. 1.0 is equal to mass of displaced...
Definition: FloatingCollarCoRiBo.h:125
int * m_BridleElemIndex
Number of bridles connected to floating collar.
Definition: FloatingCollarCoRiBo.h:138
double m_elemProjArea
Area of each element (ommitting circular end patches)
Definition: FloatingCollarCoRiBo.h:128
int m_numNetConnectors
Pointer to array holding forces from bridles on the elements.
Definition: FloatingCollarCoRiBo.h:141
double m_g
Water density.
Definition: FloatingCollarCoRiBo.h:135
double m_elemCrossSectArea
Projected area of element (2*elementRadius*elementLength)
Definition: FloatingCollarCoRiBo.h:129
double m_elemRadius
Cross sectional area of each element in the ring structure (pi*radius^2)
Definition: FloatingCollarCoRiBo.h:130
double * m_NetForces
Pointer to array holding element index of net connection points.
Definition: FloatingCollarCoRiBo.h:143
double m_rhoWater
Tangential drag coeffocient.
Definition: FloatingCollarCoRiBo.h:134
double m_Cd_n
Length of each element in the floating collar.
Definition: FloatingCollarCoRiBo.h:132
double m_elemArea
Volume for an element in the ring structure.
Definition: FloatingCollarCoRiBo.h:127
int * m_NetElemIndex
Number of net connections to floating collar.
Definition: FloatingCollarCoRiBo.h:142
Class modelling a Net cage.
Definition: CBottomRing.h:35
NEW.
Definition: FloatingCollarCoRiBo.h:38
double elemLength
Diameter of each element in the floating collar.
Definition: FloatingCollarCoRiBo.h:45
double elemProjArea
Area of each element (ommitting circular end patches)
Definition: FloatingCollarCoRiBo.h:47
double elemVolume
Potential wave damping coefficient array for Mass matrix and diffraction force. 1....
Definition: FloatingCollarCoRiBo.h:43
double * NetForces
Pointer to array holding element index of net connection points.
Definition: FloatingCollarCoRiBo.h:61
int * BridleElemIndex
Number of bridles connected to floating collar.
Definition: FloatingCollarCoRiBo.h:56
double rhoWater
Tangential drag coeffocient.
Definition: FloatingCollarCoRiBo.h:51
double elemMass
Parameters and variables.
Definition: FloatingCollarCoRiBo.h:40
double Cd_t
Normal drag coefficient for each element in the floating collar.
Definition: FloatingCollarCoRiBo.h:50
int numNetConnectors
Array holdign bridle forces for elements with a bridle connection.
Definition: FloatingCollarCoRiBo.h:59
int * NetElemIndex
Number of net connections to floating collar.
Definition: FloatingCollarCoRiBo.h:60
double elemArea
Length of each element in the floating collar.
Definition: FloatingCollarCoRiBo.h:46
double g
Water density.
Definition: FloatingCollarCoRiBo.h:52
double * Cb
Added mass coefficient array for Mass matrix and diffraction force. 1.0 is equal to mass of displaced...
Definition: FloatingCollarCoRiBo.h:42
double elemCrossSectArea
Projected area of element (2*elementRadius*elementLength)
Definition: FloatingCollarCoRiBo.h:48
double elemRadius
Volume of each element in the floating collar.
Definition: FloatingCollarCoRiBo.h:44
double Cd_n
Cross sectional area of each element in the floating collar (pi*radius^2)
Definition: FloatingCollarCoRiBo.h:49
double * BridleForces
Pointer to array holding element index of bridle connection points.
Definition: FloatingCollarCoRiBo.h:57
double * Ca
Mass of each element in the floating collar.
Definition: FloatingCollarCoRiBo.h:41
int numBridles
Acceleration of gravity. Not usually something you want to meddle with.
Definition: FloatingCollarCoRiBo.h:55