FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
FlukeAnchor.h
1#ifndef CFlukeAnchor_H
2#define CFlukeAnchor_H
3
109#include <fhsim/simobject/ISimObjectCreator.h>
110
111namespace rigidbody
112{
113class CRigidCompositeBody;
114};
115namespace environment
116{
117class EnvironmentProvider;
118}
119
120class FlukeAnchor : public SimObject
121{
122 public:
123 FlukeAnchor(const std::string& simObjectName, ISimObjectCreator* const creator);
124 ~FlukeAnchor();
125 void OdeFcn(const double T, const double* const X, double* const XDot) const;
126
127 void FinalSetup(const double T, const double* const X, ISimObjectCreator* const creator);
128
129#ifdef FH_VISUALIZATION
130 void RenderInit(Ogre::Root* const ogreRoot, ISimObjectCreator* const creator);
131 void RenderUpdate(const double T, const double* const X);
132#endif
133
134 const double* Position(const double T, const double* const X);
135 const double* Velocity(const double T, const double* const X);
136 const double* Quater(const double T, const double* const X);
137 const double* Omega(const double T, const double* const X);
138
139 // Jacobian support (drag, soil and added-mass derivatives omitted)
140 bool HasJacobians() const override;
141 void OdeJacobian(double T, const double* X, double* J, int nStates) override;
142 int GetJacobianSparsity(int nStates, int* rowPtr, int* colIdx) override;
143
144 protected:
146
147
148 double m_MaterialRho; // Total mass of anchor [kg]
149 double m_ShankLength; // Total volume displacement of anchor [m^3]
150 double m_ShankDiameter; // Relative added mass (to displaced fluid volume) [-]
151 double m_ShankThickness; // Total length of anchor [m]
152 double m_ShankFlukeAngle; // Length from anchor-tip to fluke [m]
153 double m_FlukeWidth; // Fluke width times fluke height [m^2]
154 double m_FlukeSideLength; // Main diameter of shank [m]
155 double m_FlukePointLength;
156 double m_FlukeThickness; // Anchor drag coefficient [-]
157
158 ISignalPort* m_Force;
159 int m_PositionIndex;
160 int m_VelocityIndex;
161 int m_QuaterIndex;
162 int m_OmegaIndex;
163
164 environment::EnvironmentProvider* m_environment;
165
166#ifdef FH_VISUALIZATION
167 Ogre::SceneNode* m_RenderNode;
168 Ogre::SceneNode* m_seabed;
169#endif
170};
171
172
173#endif
Definition FlukeAnchor.h:121
Definition CRigidCompositeBody.h:12