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