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