FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
FlukeAnchor.h
1#ifndef CFlukeAnchor_H
2#define CFlukeAnchor_H
3
92#include <fhsim/simobject/ISimObjectCreator.h>
93
94namespace rigidbody
95{
96class CRigidCompositeBody;
97};
98namespace environment
99{
100class EnvironmentProvider;
101}
102
103class FlukeAnchor : public SimObject
104{
105 public:
106 FlukeAnchor(const std::string& simObjectName, ISimObjectCreator* const creator);
107 ~FlukeAnchor();
108 void OdeFcn(const double T, const double* const X, double* const XDot) const;
109
110 void FinalSetup(const double T, const double* const X, ISimObjectCreator* const creator);
111
112#ifdef FH_VISUALIZATION
113 void RenderInit(Ogre::Root* const ogreRoot, ISimObjectCreator* const creator);
114 void RenderUpdate(const double T, const double* const X);
115#endif
116
117 const double* Position(const double T, const double* const X);
118 const double* Velocity(const double T, const double* const X);
119 const double* Theta(const double T, const double* const X);
120 const double* Omega(const double T, const double* const X);
121
122 // Jacobian support (partial: kinematics + quaternion dynamics; force terms omitted)
123 bool HasJacobians() const override;
124 void OdeJacobian(double T, const double* X, double* J, int nStates) override;
125 int GetJacobianSparsity(int nStates, int* rowPtr, int* colIdx) override;
126
127 protected:
129
130
131 double m_MaterialRho; // Total mass of anchor [kg]
132 double m_ShankLength; // Total volume displacement of anchor [m^3]
133 double m_ShankDiameter; // Relative added mass (to displaced fluid volume) [-]
134 double m_ShankThickness; // Total length of anchor [m]
135 double m_ShankFlukeAngle; // Length from anchor-tip to fluke [m]
136 double m_FlukeWidth; // Fluke width times fluke height [m^2]
137 double m_FlukeSideLength; // Main diameter of shank [m]
138 double m_FlukePointLength;
139 double m_FlukeThickness; // Anchor drag coefficient [-]
140
141 ISignalPort* m_Force;
142 int m_PositionIndex;
143 int m_VelocityIndex;
144 int m_ThetaIndex;
145 int m_OmegaIndex;
146
147 environment::EnvironmentProvider* m_environment;
148
149#ifdef FH_VISUALIZATION
150 Ogre::SceneNode* m_RenderNode;
151 Ogre::SceneNode* m_seabed;
152#endif
153};
154
155
156#endif
Definition FlukeAnchor.h:104
Definition CRigidCompositeBody.h:12