Marine systems simulation
CStaticBuoy.h
1#ifndef C_STATIC_BUOY_H
2#define C_STATIC_BUOY_H
3#include <SimObject.h>
4#include "sfh/constants.h"
5#include <sfh/text.h>
6#include <stdio.h>
7#include <math.h>
8#include <iostream>
9#include <vector>
10#include "Eigen/Eigen"
11using namespace std;
12using std::vector;
13typedef Eigen::Matrix<double,3,1> vec3;
14
15namespace Netcage {
16
17class CStaticBuoy : public SimObject
18{
19public:
20 CStaticBuoy(const string& simObjectName, ISimObjectCreator* const creator);
21 virtual void FinalSetup(const double T, const double* const X, ISimObjectCreator* const pCreator);
22 virtual ~CStaticBuoy();
23 void OdeFcn(const double T , const double* const X, double* const XDot, const bool IsMajorTimeStep);
24
25#ifdef FH_VISUALIZATION
26 void RenderInit(Ogre::Root* const ogreRoot, ISimObjectCreator* const creator);
27 void RenderUpdate(const double T, const double* const X);
28#endif
29
30 const virtual double* Pos(const double T, const double* const X);
31 const virtual double* Vel(const double T, const double* const X);
32
33protected:
34
35 ISignalPort* m_ForceIn;
36 ISignalPort* m_Current;
37
40
41 double m_pos[3];
42 double m_vel[3];
43
44 double m_mass;
45 double m_radius;
46 double m_dragArea;
47 double m_Cd;
48
50 double m_axy;
51 double m_az;
52 double m_bxy;
53 double m_bz;
54 double m_rho;
55 double m_g;
56
57private:
58
59#ifdef FH_VISUALIZATION
60 Ogre::SceneNode* m_renderNode;
61 string m_material;
62 double m_colour1[3];
63 double m_colour2[3];
64#endif
65};
66#endif
67} // namespace
Definition: CStaticBuoy.h:18
double m_Cd
Projected area for drag calculation.
Definition: CStaticBuoy.h:47
double m_vel[3]
Position of cable connectors (output variable)
Definition: CStaticBuoy.h:42
double m_axy
Drag coefficient circular cylinder (x,y)
Definition: CStaticBuoy.h:50
ISignalPort * m_Current
Input port. The external force from chains acting on the buoy.
Definition: CStaticBuoy.h:36
double m_dragArea
Radius of the buoy.
Definition: CStaticBuoy.h:46
double m_bz
Simplified potential damping x,y direction.
Definition: CStaticBuoy.h:53
int m_posIndex
Input port. Water current experienced by the buoy.
Definition: CStaticBuoy.h:38
double m_rho
Simplified potential damping z direction.
Definition: CStaticBuoy.h:54
double m_radius
Mass of the buoy.
Definition: CStaticBuoy.h:45
double m_pos[3]
The index of the velocity state in the state array.
Definition: CStaticBuoy.h:41
double m_g
Water density.
Definition: CStaticBuoy.h:55
double m_mass
Velocity of cable connectors (output variable)
Definition: CStaticBuoy.h:44
double m_bxy
Simplified added mass z direction.
Definition: CStaticBuoy.h:52
double m_az
Simplified added mass x,y direction.
Definition: CStaticBuoy.h:51
int m_velIndex
The index of the position state in the state array.
Definition: CStaticBuoy.h:39
Class modelling a Net cage.
Definition: CBottomRing.h:35