19#include "CEnvironment.h"
20#include <CIntegratorOptions.h>
21#include "Subroutines.h"
30 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
32 CBarge(std::string sSimObjectName, ISimObjectCreator* pCreator);
33 virtual void FinalSetup(
const double dT,
const double*
const adX, ISimObjectCreator*
const pCreator);
34 virtual void InitialConditionSetup(
const double T,
const double *
const currentIC,
double* updatedIC, ISimObjectCreator* creator);
37#ifdef FH_VISUALIZATION
39 virtual void RenderInit(Ogre::Root*
const ogreRoot, ISimObjectCreator*
const creator);
42 virtual void RenderUpdate(
const double dT,
const double*
const adX);
45 void DrawBody(Ogre::SceneNode* renderNode, Ogre::SceneManager* sceneMgr,
const int& pi);
49 virtual void OdeFcn(
const double dT,
const double*
const adX,
double*
const adXDot,
const bool bIsMajorTimeStep);
55 virtual vec6 GetInternalForces(
const int& pi,
const vec6& dX,
const vec3& r,
const quat& ql2g,
const quat& qg2l,
double time,
const double*
const states);
58 virtual mat6 GetInertiaMatrix(
const int& pi,
const vec3& r,
const quat& q,
const double dT,
const double*
const adX);
61 virtual vec13 GetSecondDerivative(
const int& pi,
const vec3& r,
const quat& ql2g,
const quat& qg2l,
const vec3& v,
const vec3& w,
const vec6& externalForces,
const double time,
const double*
const states);
64 static vec6 GetCoriolisForce(
const vec6& dX,
const mat6& Inertia);
68 virtual vec6 CalConnectForce(
const vec3& r,
const vec6& dX,
const quat& ql2g,
const quat& qg2l,
const double dT,
const double*
const adX);
72 virtual vec6 CalcHydroforcesBarge(
const int& pi,
const vec6& dX,
const vec3& r,
const quat& ql2g,
const quat& qg2l,
double time,
const double*
const states);
73 virtual vec6 FroudeKriloffBarge(
const int& pi,
const vec6& dX,
const vec3& r,
const quat& ql2g,
const quat& qg2l,
double time,
const double*
const states);
74 virtual vec6 DiffractionBarge(
const int& pi,
const vec6& dX,
const vec3& r,
const quat& ql2g,
const quat& qg2l,
double time,
const double*
const states);
76 virtual vec6 CalWaveOverToppingBarge(
const int& pi,
const vec6& dX,
const vec3& r,
const quat& ql2g,
const quat& qg2l,
double time,
const double*
const states);
84 virtual const double* BargeState(
const double dT,
const double*
const adX);
85 virtual const double* ConnectForce(
const double dT,
const double*
const adX);
86 virtual const double* RadiationDamping(
const double dT,
const double*
const adX);
87 virtual const double* FirstOrderWave(
const double dT,
const double*
const adX);
122 virtual const double*
ConnectPos(
const double dT,
const double*
const adX,
int iConnect);
123 virtual const double* ConnectVel(
const double dT,
const double*
const adX,
int iConnect);
124 ISignalPort ** m_ConnectForce;
126 double m_StructConnectForce[8];
135 Eigen::Matrix<double, sys_size, sys_size>* m_SSpaceA;
136 Eigen::Matrix<double, sys_size,1>* m_SSpaceB;
137 Eigen::Matrix<double,1, sys_size>* m_SSpaceC;
138 Eigen::Matrix<double,1,1>* m_SSpaceD;
139 double* m_SSpaceSDot;
141 virtual vec6 CalStateSpaceStructure(
const int& pi,
const double dT,
const double*
const adX,
const vec6& VS);
146 std::vector<double> m_WaveF;
147 std::vector<double> m_WaveA;
148 std::vector<double> m_WaveP;
149 std::vector<double> m_WaveD;
150 std::vector<double> m_WaveN;
176 int m_wodwriteoutput;
177 std::ofstream m_wodoutputfile1;
178 std::ofstream m_wodoutputfile2;
179 bool m_isMajorTimeStep;
182 std::valarray<double> m_x;
184 std::valarray<double> m_u;
185 std::valarray<double> m_q1;
186 std::valarray<double> m_q2;
196 double m_radiationForce[6];
197 double m_firstOrderWave[6];
204#ifdef FH_VISUALIZATION
206 Ogre::SceneNode** m_RenderNodes;
207 Ogre::SceneManager* m_SceneMgr;
208 vector<Ogre::ManualObject*> m_Manual;
Definition: CEnvironment.h:10
double m_BargeD
Beam.
Definition: CBarge.h:159
int m_ConnectNum
Previous time step.
Definition: CBarge.h:117
int m_IStateQuater
Index of the global rotation in the state vector.
Definition: CBarge.h:92
double m_BargeSpeed[3]
Water drag coefficient.
Definition: CBarge.h:109
int m_IStateLocalVel
Index of the quaternions in the state vector.
Definition: CBarge.h:93
virtual void OdeFcn(const double dT, const double *const adX, double *const adXDot, const bool bIsMajorTimeStep)
Calculates the state derivatives.
PolyplateSpec m_PolyPlate[1]
Particle class for contact detection.
Definition: CBarge.h:105
double m_PrevTime
Integration step size.
Definition: CBarge.h:113
double * m_ConnectLoc
Index of the object to connect.
Definition: CBarge.h:119
int m_numFloe
Index of the local angular velocity in the state vector.
Definition: CBarge.h:97
int m_IStateRot
Index of the global position in the state vector.
Definition: CBarge.h:91
double m_BargeH
Draft.
Definition: CBarge.h:160
mat6 m_BargeMass
Restoring coefficient.
Definition: CBarge.h:164
virtual const double * ConnectPos(const double dT, const double *const adX, int iConnect)
List of velocities (u,v,w) of the connections.
double * m_ConnectPos
List of local locations of the connections.
Definition: CBarge.h:120
int m_ModeNum
Index of the additional states for state-space implementation in the state vector.
Definition: CBarge.h:132
double m_BargeDensity
Polyplate structure.
Definition: CBarge.h:107
vec3 m_TAcc
Mass matrix.
Definition: CBarge.h:168
double m_StepSize
Barge states - Why 22?
Definition: CBarge.h:112
double m_BargeZG[2]
Centre of gravity.
Definition: CBarge.h:162
int m_ConnectPA
Number of connections.
Definition: CBarge.h:118
vec3 ** m_xyzBargeV
Local coordinates of the barge vertices.
Definition: CBarge.h:99
CEnvironment * m_Environment
Initial barge drift speed.
Definition: CBarge.h:110
Particle m_Particle[1]
Damping matrix.
Definition: CBarge.h:104
double m_BargeB
Length.
Definition: CBarge.h:158
double m_BargeCOG[3]
Depth - Height/thickness?
Definition: CBarge.h:161
int m_StateSpace
Output global connect force acting on the structure.
Definition: CBarge.h:130
double m_BargeRST[6]
Bottom and top relative to COG.
Definition: CBarge.h:163
vec3 ** m_BargeV
Number of barges -> Will always be 1, therefore remove?
Definition: CBarge.h:98
mat6 * m_AddedMass
Coordinates of the barge vertices.
Definition: CBarge.h:101
double m_wDragCoeff[2]
Density of barge.
Definition: CBarge.h:108
int m_IStateOmega
Index of the local velocity in the state vector.
Definition: CBarge.h:94
double m_BargeState[22]
Pointer to DeepSeaGravityWaves -> CEnvironment.
Definition: CBarge.h:111
double * m_ConnectVel
List of positions (x,y,z) of the connections.
Definition: CBarge.h:121
mat6 * m_DampMatrix
Added mass matrix.
Definition: CBarge.h:102
Definition: Subroutines.h:265
Definition: Subroutines.h:94