Marine systems simulation
FrameCable.h
1#pragma once
2
3#include "LineStructureGravityHydro.h"
4
6public:
7 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
8
9 FrameCable(CoRiBoDynamics::ConstraintSolver* solver, ISimObjectCreator* creator, double beta, string name, int num_plates);
10
11 void ComputeConstraints(const double T, const double * const X);
12
13 void InitialConditionSetup(double *const states, std::vector<CoRiBoDynamics::RigidElement*>& plates, const Eigen::Quaterniond& plate_null_angle);
14
15 void SetAnchorAPos(const Eigen::Vector3d& P){m_anchorA_P = P;}
16 void SetAnchorBPos(const Eigen::Vector3d& P){m_anchorB_P = P;}
17 std::vector<CoRiBoDynamics::RigidElement*> GetPlateConnections();
18
19 void setEnvironment(CEnvironment*e){m_environment = e;}
20
21 void SetPlateRadius(double R){m_plate_radius = R;}
22
23 virtual CollisionCheckInterface::GeometryVector CheckForContact(CoRiBoDynamics::CollisionManager::ExternalObject& object);
24
25#ifdef FH_VISUALIZATION
26 virtual void RenderInit(Ogre::Root* const ogreRoot);
27 virtual void RenderUpdate(const double T, const double* const X);
28#endif
29
30protected:
31 std::vector<CoRiBoDynamics::RigidElement*> m_elements;
32
33 CEnvironment *m_environment;
34
35 int m_num_frame_elements;
36 double m_frameLineLength;
37
38 int m_num_anchor_elements;
39 double m_anchorLineLength;
40
41 double m_frameDiameter;
42 double m_anchorDiameter;
43
44 double m_anchorDensity;
45 double m_frameDensity;
46
47 int m_num_plate_elements;
48 double m_plate_radius;
49
52
53 Eigen::Vector3d m_anchorA_P;
54 Eigen::Vector3d m_anchorB_P;
55
56 //double m_elemVolume;
57 //double m_elemArea;
58 //double m_elemProjArea;
59 //double m_elemDensity; /// Assumption that the line element is made up of nylon (rope)
60
61 double m_Cd_n;
62 double m_Cd_t;
63 Eigen::Vector3d m_Ca;
64
65#ifdef FH_VISUALIZATION
66 std::unique_ptr<C3DLine> m_line;
67#endif
68};
Definition: CEnvironment.h:10
Definition: CollisionManager.h:135
Definition: ConstraintSolver.h:31
Definition: JointConstraint.h:17
Definition: ShipContact.h:7
Definition: FrameCable.h:5
Eigen::Vector3d m_Ca
Tangential drag coefficient.
Definition: FrameCable.h:63
void ComputeConstraints(const double T, const double *const X)
double m_Cd_t
Normal drag coefficient.
Definition: FrameCable.h:62
Definition: JointConstraint.h:125