Marine systems simulation
MooringSystemCoRiBo.h
1#ifndef MooringSystemCoRiBo_h__
2#define MooringSystemCoRiBo_h__
3
8#include <string>
9#include <cmath>
10#include <SimObject.h>
11
12#include "./Cable/BridleCable.h"
13#include "./Cable/BuoyCable.h"
14#include "./Cable/CollarChain.h"
15#include "./Cable/FrameCable.h"
16#include "./Cable/LineStructureGravityHydro.h"
17#include "./RingStructureGravityHydro.h"
18#include "./Contact/ShipContact.h"
19#include "./Net_unsupported/ParametricNet.h"
20#include "./Net_unsupported/CoriboNet.h"
21
22namespace Netcage{
23 class MooringSystemCoRiBo: public SimObject{
24 public:
25 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
26 MooringSystemCoRiBo(const std::string& name, ISimObjectCreator* const creator );
28
29 void OdeFcn(const double T, const double *const X, double *const XDot, const bool IsMajorTimeStep);
30 void InitialConditionSetup( const double, const double *const, double* const updatedIC, ISimObjectCreator* const);
31 void FinalSetup(const double T, const double *const X, ISimObjectCreator* const creator);
32
33 const double* ShipReactionTorqueNED( const double T, const double* const X );
34 const double* ShipReactionForceNED( const double T, const double* const X );
35 void compute( const double T, const double * const X );
36
37#ifdef FH_VISUALIZATION
38 void RenderInit(Ogre::Root* const ogreRoot, ISimObjectCreator* const creator);
39 void RenderUpdate( const double T, const double* const X);
40#endif
41
42 virtual void PreOdeFcn(const double T, const double *const X, IStateUpdater* updater);
43
44 private:
45 ICommonComputation* m_compute;
46 std::unique_ptr<CoRiBoDynamics::ConstraintSolver> m_solver;
47
48 int m_numU;
49 int m_numV;
50 int m_numLineU;
51 int m_numLineV;
52
53 static const int num_collar_chains = 24;
54 struct Cell {
55 FloatingCollar* floating_collar;
56 BottomRing* bottom_ring;
57 BridleCable* bridle[12];
58 CollarChain* collar_chain[num_collar_chains];
60 };
61
62 std::vector<FrameCable*> m_U_cables;
63 std::vector<FrameCable*> m_V_cables;
64 std::vector<BuoyCable*> m_buoy_cables;
65 std::vector<Cell> m_cell;
66
67 ShipContact* m_ship_contact;
68 ISignalPort* m_inShipPosition;
69 ISignalPort* m_inShipVelocity;
70 ISignalPort* m_inShipOmega;
71 ISignalPort* m_inShipOrientation;
72
73 double m_prev_time = 0.0;
74 };
75}
76#endif
Definition: RingStructureGravityHydro.h:74
Definition: BridleCable.h:8
Definition: CoriboNet.h:21
Definition: CollarChain.h:10
Definition: RingStructureGravityHydro.h:67
Definition: MooringSystemCoRiBo.h:23
Definition: ShipContact.h:15
Class modelling a Net cage.
Definition: CBottomRing.h:35