Marine systems simulation
FloaterLinVerification.h
1
50#ifndef FLOATER_LIN_VERIFICATION_H
51#define FLOATER_LIN_VERIFICATION_H
52#include "SimObject.h"
53#include <CEnvironment.h>
54
55
56namespace Netcage {
57
72class FloaterLinVerification : public SimObject
73{
74public:
90 FloaterLinVerification(const string& simObjectName, ISimObjectCreator* const creator);
91 virtual void FinalSetup(const double T, const double* const X, ISimObjectCreator* const pCreator);
92
104 void OdeFcn(const double T , const double* const X, double* const XDot, const bool IsMajorTimeStep);
105
106
107#ifdef FH_VISUALIZATION
116 void RenderInit(Ogre::Root* const ogreRoot, ISimObjectCreator* const creator);
117
126 void RenderUpdate(const double T, const double* const X);
127#endif
128
138 const double* Position(const double T, const double* const X);
139
149 const double* Velocity(const double T, const double* const X);
150
151
152protected:
153 // ISignalPort* m_Force; /// Input port. The external force acting on the mass object
154 int PositionIndex;
158
159
160
161private:
162 double Mass2D;
163 double pPipe;
164 double RPipe;
165 double bw;
166 double RFloater;
167 double E;
168 double Ir;
169 double Iz;
170 double tWall;
171 double DampFact;
172 int NModes;
173 double Omg;
174 double Zeta;
175 double Ux;
176 double CD;
177 double F_Ux;
178 double g;
179 double WaveNumber;
180 double RhoWater;
181 double Bessel[100];
182 double Kn[100]; // Integral value needed for calculation of each modal added mass.
183 double AddMass33[100];
184 double AddMass22_Lim;
185 double AddMass22_Inf;
186 double AddMass22_Unity;
187 double kRadSpring;
188 double RadSpringOn;
189 double WaveCouplingOn;
190 double PosRadSpring[4];
191 double ModalSpringForce;
192 double DeltaL_RadSpring[4];
193 double b22[100];
194 double b22_surge[100];
195 double c22[100];
196 double b33[100];
197 double c33[100];
198 double EIr;
199 double EIz;
200 double PI;
201 double Axy;
202 double ForceFactor;
203 double MassFactor;
204 double EXP_OMG_T_33;
205 double EXP_OMG_T_22;
206
207 void BesselFunc(double k, double R, int n, int N);
208 void KnFunc(int n, int N);
209 void AddMass33Fcn(double p, double c, double R, double Kn, int n);
210 void AddMass22Fcn(double p, double c);
211
212#ifdef FH_VISUALIZATION
213 Ogre::SceneNode* m_RenderNode;
214 Ogre::SceneNode** m_ManualObjectNodes;
215 double m_Radius;
216 string m_Material;
217 double m_Color[3];
218#endif
219};
220#endif
221} // namespace
Definition: CEnvironment.h:10
Definition: FloaterLinVerification.h:73
int m_numElements
The index of the velocity state in the state array.
Definition: FloaterLinVerification.h:156
const double * Velocity(const double T, const double *const X)
Output port. Returns current velocity.
int VelocityIndex
The index of the position state in the state array.
Definition: FloaterLinVerification.h:155
CEnvironment * m_Environment
Number of elements in visualization.
Definition: FloaterLinVerification.h:157
const double * Position(const double T, const double *const X)
Output port. Returns current position.
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.
FloaterLinVerification(const string &simObjectName, ISimObjectCreator *const creator)
Reads parameters, registers states, input/output ports and shared resources.
Class modelling a Net cage.
Definition: CBottomRing.h:35