Marine systems simulation
RingStructure.h
1#pragma once
2
3#include "JointConstraint.h"
4#include "SimObject.h"
5
6namespace CoRiBoDynamics {
7namespace Structures {
9public:
10 struct RingSpec {
11 int num;
12 double Beta;
13 double Alpha;
14 double RingDiameter;
15 double TubeDiameter;
16 double EA;
17 vec3 EI;
18 double Inertia[6];
19 };
20
25 virtual ~RingStructure(){}
26
30 virtual void InitialConditionSetup(double *const UpdatedIC, vec3 CenterPosition );
31
32#ifdef FH_VISUALIZATION
33 virtual void RenderInit(Ogre::Root* const ogreRoot, double RingDiameter);
34 virtual void RenderUpdate(const double T, const double* const X);
35#endif
36
37 RigidElement* getElement(int i){return m_elements[i];}
38 std::vector<RigidElement*> getElements(){return m_elements;}
39 RigidElement* getFirstElement(){return m_elements.front();}
40 RigidElement* getLastElement() {return m_elements.back();}
41 int getNumElements(){return (int)m_elements.size();}
42
43 double GammaN(){return m_GammaN;}
44 double GammaMx(){return m_GammaMx;}
45 double GammaMy(){return m_GammaMy;}
46 double GammaT(){return m_GammaT;}
47
48 virtual void ComputeConstraints(const double T, const double * const X);
49
50 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
51
52protected:
54 virtual void Init(ConstraintSolver* solver, ISimObjectCreator* creator, RingSpec spec, std::string name);
55
56 RingSpec m_spec;
57 double m_elemLength;
58
59 std::vector<RigidElement*> m_elements;
60
61 double m_GammaN;
62 double m_GammaMx;
63 double m_GammaMy;
64 double m_GammaT;
65
66
67#ifdef FH_VISUALIZATION
68 float m_ring_radius;
69 Ogre::ManualObject* m_visual_ring;
70 Eigen::Matrix<float,3,15> m_base_circle;
71#endif
72
73};
74}
75}
Definition: ConstraintSolver.h:31
Definition: JointConstraint.h:17
Definition: RigidElement.h:15
Definition: RingStructure.h:8
double m_elemLength
Base properties of the ring.
Definition: RingStructure.h:57
double m_GammaN
list of all elements
Definition: RingStructure.h:61
double m_GammaMx
axial regulator stiffness parameter
Definition: RingStructure.h:62
virtual void ComputeConstraints(const double T, const double *const X)
double m_GammaMy
bending regulator stiffness parameter
Definition: RingStructure.h:63
std::vector< RigidElement * > m_elements
element length [m]
Definition: RingStructure.h:59
virtual void InitialConditionSetup(double *const UpdatedIC, vec3 CenterPosition)
double m_GammaT
bending regulator stiffness parameter
Definition: RingStructure.h:64
RingStructure(CoRiBoDynamics::ConstraintSolver *solver, ISimObjectCreator *creator, CoRiBoDynamics::Structures::RingStructure::RingSpec spec, std::string name)
Definition: CollisionManager.h:6
double RingDiameter
Damping frequency coefficient; [s^-1].
Definition: RingStructure.h:14
double Inertia[6]
Bending stiffness around x, y and z axis [Nm].
Definition: RingStructure.h:18
double Alpha
Regulator frequency coefficient; [s^-1].
Definition: RingStructure.h:13
double Beta
Number of discrete elements in the ring.
Definition: RingStructure.h:12
double EA
Diameter of tube [m];.
Definition: RingStructure.h:16
vec3 EI
Axial stiffness [N].
Definition: RingStructure.h:17
double TubeDiameter
Total diameter of the ring [m].
Definition: RingStructure.h:15