Marine systems simulation
CBottomRing.h
1#pragma once
2
27#include <stdio.h>
28#include <string>
29
30#include <ISimObjectCreator.h>
31#include <C6DBody.h> // TODO: change to body/C6DBody.h
32#include "sfh/math.h"
33
34
35namespace Netcage {
36
37class CBottomRing : public C6DBody
38{
39public:
40
42 CBottomRing(const string& simobjectname, ISimObjectCreator* const creator);
43
46
48 virtual void OdeFcn(const double T, const double *const X, double *const XDot, const bool bIsMajorTimeStep);
49
51 const double* outCentrePos(const double T, const double* const X);
52
54 const double* outConnectorPos(const double T, const double* const X, const int index);
55
57 const double* outConnectorVel(const double T, const double* const X, const int index);
58
59#ifdef FH_VISUALIZATION
60
62 virtual void RenderInit(Ogre::Root* const ogreRoot, ISimObjectCreator* const creator);
63
65 virtual void RenderUpdate(const double T, const double* const X);
66
67#endif
68
69protected:
70
72 void CalcConnectorPosGlobal(const double T, const double* const X, const int index);
73
74 // Member variables
76 ISignalPort** m_aIINetForce;
77// unsigned short* m_aIOutConnectorPos; ///< Array of indices to connector positions in output vector
78// unsigned short* m_aIOutConnectorVel; ///< Array of indices to connector velocities in output vector
81
83// double ** m_aadNetConnectPosGlobal; ///< Global connector coordinates, array of array of double (size m_iNumConnectors x 3)
86
87 double m_CentrePos[3];
88
89 // Physical properties
90
91 double m_Diameter;
92 double m_dI;
93 double m_dR;
94 double m_dWt;
95 double m_dRr;
96 double m_dh;
97 double m_dRho;
98 double m_dMass;
100 double m_dDamping;
101
102
103#ifdef FH_VISUALIZATION
104
105 double m_Scale;
106 const Ogre::Root* m_OgreRoot;
107 Ogre::SceneNode* m_renderNode;
108// CTextRenderer * m_TextRenderer;
109// sfh::filters::StopWatch m_StopWatchRenderUpdate;
110// std::string m_DisplayText;
111// CFhCamera* m_pCamera; ///< Pointer to the camera
112#endif
113
114
115};
116
117} // namespace
Definition: C6DBody.h:128
Definition: CBottomRing.h:38
const double * outConnectorVel(const double T, const double *const X, const int index)
Writes connector velocities to the output ports.
double ** m_OutConnectorPosGlobal
Holds pointers to all net connection pos arrays.
Definition: CBottomRing.h:79
double m_adInertiaMoment[3]
Inertia matrix diagonal.
Definition: CBottomRing.h:99
double m_dWt
Wall thickness.
Definition: CBottomRing.h:94
double m_dMass
Mass.
Definition: CBottomRing.h:98
double ** m_aadNetConnectPos
Local connector coordinates, array of array of double (size m_iNumConnectors x 3)
Definition: CBottomRing.h:82
int m_iNumConnectors
Number of external connectors.
Definition: CBottomRing.h:75
double m_dDamping
Simple linear damping.
Definition: CBottomRing.h:100
double m_dRho
Density.
Definition: CBottomRing.h:97
double ** m_aadNetMomentLocal
Net force in local coordinats, array of array of double (size m_iNumConnectors x 3)
Definition: CBottomRing.h:85
double ** m_OutConnectorVel
Holds pointers to all net connection vel arrays.
Definition: CBottomRing.h:80
virtual void OdeFcn(const double T, const double *const X, double *const XDot, const bool bIsMajorTimeStep)
Calculates the state derivatives.
void CalcConnectorPosGlobal(const double T, const double *const X, const int index)
Calculates the global positions of the connectors.
const double * outConnectorPos(const double T, const double *const X, const int index)
Writes connector positions to the output ports.
double m_dR
Radius from equi. center to centerline.
Definition: CBottomRing.h:93
double m_dh
Vertical offset of torus plane from local xy-plane.
Definition: CBottomRing.h:96
double m_CentrePos[3]
Centre pos of bottom ring output.
Definition: CBottomRing.h:87
double m_Diameter
Diameter of cage.
Definition: CBottomRing.h:91
double m_dI
Moment of inertia.
Definition: CBottomRing.h:92
CBottomRing(const string &simobjectname, ISimObjectCreator *const creator)
The constructor sets the pointer to the output object and the parser object.
~CBottomRing()
The destructor cleans up.
double ** m_aadNetForceLocal
Net force in local coordinats, array of array of double (size m_iNumConnectors x 3)
Definition: CBottomRing.h:84
double m_dRr
Pipe radius.
Definition: CBottomRing.h:95
const double * outCentrePos(const double T, const double *const X)
Writes centre position to the output ports.
ISignalPort ** m_aIINetForce
Array of indices to connector forces in input vector.
Definition: CBottomRing.h:76
Class modelling a Net cage.
Definition: CBottomRing.h:35