Marine systems simulation
RingStructureGravityHydro.h
1#pragma once
2
7#include <RingStructure.h>
8#include <CollisionManager.h>
9#include <CEnvironment.h>
10#include <cmath>
11
12#include <environment/DeepSeaGravityWaves.h>
13#include "Contact/ShipContact.h"
14
15namespace CoRiBoDynamics { class CoRiBoNet; }
16#include "Net_unsupported/CoriboNet.h"
17
19public:
20 RingStructureGravityHydro(CoRiBoDynamics::ConstraintSolver* solver, ISimObjectCreator* creator, RingStructure::RingSpec spec, double unit_weight, std::string name);
21
22 void setEnvironment(CEnvironment*e);
23 virtual void ComputeConstraints(const double T, const double * const X);
24
25 CollisionCheckInterface::GeometryVector CheckForContact(CoRiBoDynamics::CollisionManager::ExternalObject& object);
26
27 double Diameter() { return m_spec.RingDiameter; }
28 double TubeDiameter() { return m_spec.TubeDiameter; }
29 int ringElementIndex( double angle );
30 double ringElementOffset(double angle);
31 Eigen::Vector3d relativePosition(double angle);
32
33
34
35#ifdef FH_VISUALIZATION
36 virtual void RenderInit(Ogre::Root* const ogreRoot);
37 //virtual void RenderUpdate(const double T, const double* const X);
38#endif
39
40 void SetCoRiBoNet(CoRiBoDynamics::CoRiBoNet* net) { m_net = net; }
41 //virtual const CoRiBoDynamics::Vector& GetNetForces(double T, const double* X) = 0;
42
43protected:
45 virtual void Init(CoRiBoDynamics::ConstraintSolver* solver, ISimObjectCreator* creator, RingStructure::RingSpec spec, double unit_weight, std::string name);
46
48
49 CEnvironment *m_environment;
50 double m_elemMass;
51 double m_elemArea;
53 double m_elemRadius;
54 double m_elemVolume;
55 double m_Cd_n;
56 double m_Cd_t;
57
61 Eigen::Vector3d m_Ca;
62 Eigen::Vector3d m_Cb;
63};
64
65
67{
68public:
69 FloatingCollar(CoRiBoDynamics::ConstraintSolver* solver, ISimObjectCreator* creator, double beta, std::string name);
70 //const CoRiBoDynamics::Vector& GetNetForces(double T, const double* X);
71};
72
74{
75public:
76 BottomRing(CoRiBoDynamics::ConstraintSolver* solver, ISimObjectCreator* creator, double beta, std::string name);
77 //const CoRiBoDynamics::Vector& GetNetForces(double T, const double* X);
78};
Definition: RingStructureGravityHydro.h:74
Definition: CEnvironment.h:10
Definition: CoriboNet.h:21
Definition: CollisionManager.h:135
Definition: ConstraintSolver.h:31
Definition: RingStructure.h:8
Definition: ShipContact.h:7
Definition: RingStructureGravityHydro.h:67
Definition: RingStructureGravityHydro.h:18
virtual void ComputeConstraints(const double T, const double *const X)
Eigen::Vector3d m_Ca
Definition: RingStructureGravityHydro.h:61
double m_elemProjArea
Surface area of element;.
Definition: RingStructureGravityHydro.h:52
Definition: CollisionManager.h:6
double RingDiameter
Damping frequency coefficient; [s^-1].
Definition: RingStructure.h:14
double TubeDiameter
Total diameter of the ring [m].
Definition: RingStructure.h:15