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