1#ifndef CTrawlDoor_base_H
2#define CTrawlDoor_base_H
8#include "sfh/sim/kinematics.h"
11#include <ICurrentVel.h>
12#include <CEnvironment.h>
16#ifdef FH_VISUALIZATION
17#include "OgreParticleSystem.h"
18#ifdef USE_BILLBOARD_LABELS
19#include "sfh/ogre/CMovableText.h"
128 virtual void OdeFcn(
const double dT,
const double*
const adX,
double*
const adXDot,
const bool bIsMajorTimeStep);
131#ifdef FH_VISUALIZATION
133 virtual void RenderInit(Ogre::Root*
const pOgreRoot, ISimObjectCreator*
const pCreator);
136 virtual void RenderUpdate(
const double dT,
const double*
const adX);
140 virtual void TD_HydroForces(
const double pRelVel[],
double *pAlpha,
double *pBeta,
double *pU,
double pForceSS[]);
142 virtual void TD_HydroForces_SS(
double TD_Area,
double rho,
const double pRelVel[],
double alpha,
double beta,
double U,
double* pCoeffSS,
double* pForceSS);
143 virtual void TD_HydroCoeff_SS(
double alpha,
double beta,
double pCoeffSS[]);
144 virtual void TD_vel2HydroAng(
const double pRelVel[],
double* pAlpha,
double* pBeta,
double* pU);
145 virtual void AddExternalForces(
double dT,
const double*
const adX);
146 virtual void AddInternalForces();
147 virtual void AddHydroForces();
148 virtual void AddDampingForces();
149 virtual void AddBottomForces(){};
150 virtual void CalcDerivatives(
double dT,
double*
const adXDot,
const double*
const adX);
151 virtual void CalcFoundation(
const double dT,
const double*
const adX,
double*
const adXDot,
bool bIsMajorTimeStep);
152 virtual void AddExternalForce(
const double adPos_d[3],
const double adForceExternal_n[3]);
153 virtual void CalcOutput(
const double dT,
const double*
const adX);
154 void FinalSetup(
const double dT,
const double *
const adX, ISimObjectCreator*
const pCreator);
164 double m_dMassInverse[6][6];
165 double m_mdCornerPos_body[4][3];
169 double m_adOutOfBoundCoeff[6];
170 double m_adHydrodynamicCorrections[6];
173 double m_adWarpPos_d[3];
174 double m_adLBPos_d[3];
175 double m_adUBPos_d[3];
194 const double* OutPos1(
const double dT,
const double*
const adX);
195 const double* OutPos3(
const double dT,
const double*
const adX);
196 const double* OutPos2(
const double dT,
const double*
const adX);
197 const double* OutVel1(
const double dT,
const double*
const adX);
198 const double* OutVel3(
const double dT,
const double*
const adX);
199 const double* OutVel2(
const double dT,
const double*
const adX);
201 double m_adOutPos1[3];
202 double m_adOutPos3[3];
203 double m_adOutPos2[3];
204 double m_adOutVel1[3];
205 double m_adOutVel3[3];
206 double m_adOutVel2[3];
208 unsigned long m_IStatePos;
209 unsigned long m_IStateQuater;
210 unsigned long m_IStateLocalVel;
211 unsigned long m_IStateOmega;
212 unsigned long m_IStateHydroForce;
215 double ma_adSumForces[6];
220 const double* ma_adXPos_n;
221 const double* ma_adXQuater;
222 const double* ma_adXVel_d;
223 const double* ma_adXOmega;
226 double ma_adXVel_n[3];
227 double ma_adHydroForceSS[6];
228 double ma_adRelVel_d[6];
229 double ma_adWaterVel_d[3];
231#ifdef FH_VISUALIZATION
232 void BottomContactRenderInit();
233 void RenderBottomContact(
double depth,
double m_aCornerPos_ned[4][3],
double m_adSubmergence[4]);
234 Ogre::ParticleSystem* m_particleSystem;
235 Ogre::SceneNode* m_particleNode;
236 Ogre::ParticleEmitter* m_particleEmitter;
237 Ogre::Vector3 m_visualizationScale;
239 std::string m_sMeshName;
241 double m_dLengthScale;
242 double m_dHeightScale;
243 double m_dCurvatureScale;
244 Ogre::Entity* m_pRenderEntity;
245 Ogre::SceneNode* m_pRenderNode;
246 Ogre::Quaternion m_InitOrientation;
247 Ogre::SceneManager* m_pSceneMgr;
249#ifdef USE_BILLBOARD_LABELS
250 Ogre::SceneNode* m_BBRenderNode;
251 Ogre::CMovableText* m_BBTxt;
Definition: CEnvironment.h:10
Definition: CTrawlDoor_base.h:122
double m_adForce_LB[3]
A pointer to the force.
Definition: CTrawlDoor_base.h:180
double m_adWaterVel_n[3]
The water velocity in the door position.
Definition: CTrawlDoor_base.h:182
double m_dRhoWater
The density of the surrounding fluid.
Definition: CTrawlDoor_base.h:178
double m_adForce_warp[3]
A pointer to the Warp force.
Definition: CTrawlDoor_base.h:179
double m_dRhoDoor
The density of the trawl door material.
Definition: CTrawlDoor_base.h:166
bool m_bIsPort
Is this a port trawl door?
Definition: CTrawlDoor_base.h:156
CTrawlDoor_base(std::string sSimObjectName, ISimObjectCreator *pCreator)
The constructor sets the pointer to the output object and the parser object.
ICommonComputation * m_pCommonCalc
Calculations necessary for more than one output port.
Definition: CTrawlDoor_base.h:183
ISignalPort * m_pInLB_F
The cable length input port.
Definition: CTrawlDoor_base.h:190
double m_dMass
The mass of the object.
Definition: CTrawlDoor_base.h:163
ISignalPort * m_pInUB_F
The cable length input port.
Definition: CTrawlDoor_base.h:191
double m_dArea
The trawldoor area.
Definition: CTrawlDoor_base.h:158
ISignalPort * m_pInWarp_F
The cable length input port.
Definition: CTrawlDoor_base.h:189
double m_adForce_UB[3]
A pointer to the input force.
Definition: CTrawlDoor_base.h:181
double m_adCOG[3]
The trawl door center of gravity.
Definition: CTrawlDoor_base.h:157
virtual void OdeFcn(const double dT, const double *const adX, double *const adXDot, const bool bIsMajorTimeStep)
Calculates the state derivatives.
Definition: ICurrentVel.h:12