Marine systems simulation
Propeller4Q.h
1#ifndef Propeller4Q_h__
2#define Propeller4Q_h__
68#include <Eigen/Eigen>
69#include <SimObject.h>
70#include <CEnvironment.h>
71#include <cstddef>
72#include "Ship/AzimuthCurve.h"
73
74#ifdef FH_VISUALIZATION
75 #include "sfh/ogre/CDynamicLines.h"
76#endif
77
78namespace Ship{
79 class Propeller4Q:public SimObject, ICurrentField{
80 public:
81 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
82
85 Ruth = 666,Smogeli
86 };
87
90 Open,Ducted,Tunnel
91 };
92
94 struct Curve4Q{
97 };
98
99 Propeller4Q(const string simObjectName, ISimObjectCreator* const creator);
100
101 ~Propeller4Q();
102
103 void FinalSetup( const double T, const double *const X, ISimObjectCreator* const creator );
104 void OdeFcn(const double T, const double* const X, double* const XDot, const bool bIsMajorTimeStep);
105 void GetCurrent(const double T, const double* const X, const double position[3], double* currentVelocity);
106
107#ifdef FH_VISUALIZATION
108 void RenderInit(Ogre::Root* const ogreRoot, ISimObjectCreator* const creator);
109 void RenderUpdate( const double T, const double* const X);
110#endif
111
113 const double* Us(const double T, const double* const X);
115 const double* Rs(const double T, const double* const X);
117 const double* BetaT(const double T, const double* const X);
118
120 const double* BetaQ(const double T, const double* const X);
121
123 const double* Ct(const double T, const double* const X);
124
126 const double* Cq(const double T, const double* const X);
127
129 const double* ForceNED(const double T, const double* const X);
130
132 const double* TorqueNED(const double T, const double* const X);
133
135 const double* ForceBody(const double T, const double* const X);
136
138 const double* TorqueBody(const double T, const double* const X);
139
141 const double* BetaH(const double T, const double* const X);
142
144 const double* PDCurrent(const double T, const double* const X);
145
147 const double* ForceCorrectedBody(const double T, const double* const X);
148
150 const double* TorqueCorrectedBody(const double T, const double* const X);
151
153 const double* ForceCorrectedNED(const double T, const double* const X);
154
156 const double* TorqueCorrectedNED(const double T, const double* const X);
157
159 const double* ShaftTorqueCorrectedBody(const double T, const double* const X);
161 const double* ShaftTorqueBody(const double T, const double* const X);
162
164 const double* ShaftPowerCorrected(const double T, const double* const X);
165
167 const double* ShaftPower(const double T, const double* const X);
168
170 void Compute(const double T, const double* const X);
171 protected:
173 ICommonComputation *m_compute;
174
176 Eigen::Vector3d m_ForceNED;
178 Eigen::Vector3d m_ForceBody;
179
181 Eigen::Vector3d m_TorqueNED;
183 Eigen::Vector3d m_TorqueBody;
184
186 Eigen::Vector3d m_ForceCorrectedNED;
188 Eigen::Vector3d m_ForceCorrectedBody;
189
191 Eigen::Vector3d m_TorqueCorrectedNED;
193 Eigen::Vector3d m_TorqueCorrectedBody;
194
197
200
203
206
209
212
215
217 double m_Us;
218
220 double m_Rs;
221
223 double m_betaT;
224
226 double m_betaQ;
227
229 double m_beta_h;
230
232 double m_PDcur;
233
235 ISignalPort *m_InOrientationNED;
236
238 ISignalPort *m_InMyRPM;
239
241 ISignalPort *m_InMyPD;
242
244 ISignalPort *m_InVelocityNED;
245
247 ISignalPort *m_InPositionNED;
248
251
254
257
260
263
266
269
271 int m_IndexRotationalFlowState1;
272
274 int m_IndexRotationalFlowState2;
275
277 double m_D;
278
281
283 double *m_PD;
284
287
289 double m_Cq;
290
292 double m_Ct;
293
296
299
301 double m_U;
302
305
308
309 bool m_azimuthinMainLoss;
310
311#ifdef FH_VISUALIZATION
313 int m_IndexPropellerRotationSatet;
314
316 bool m_reverseRotationDirection;
317
319 CDynamicLines * m_lines;
320
322 Ogre::SceneNode* m_RenderNode;
323
325 Ogre::SceneNode* m_RenderNodePropeller;
326#endif
327 };
328}
329#endif // Propeller4Q_h__
Definition: CEnvironment.h:10
Definition: ICurrentField.h:4
Definition: Propeller4Q.h:79
ISignalPort * m_InPositionNED
Definition: Propeller4Q.h:247
Eigen::Vector3d m_ForceCorrectedNED
Definition: Propeller4Q.h:186
const double * ForceBody(const double T, const double *const X)
double m_shaftPowerScaling
Definition: Propeller4Q.h:208
double m_shaftPower
Definition: Propeller4Q.h:202
Eigen::Vector3d m_TorqueCorrectedBody
Definition: Propeller4Q.h:193
PropellerType m_PropellerType
Definition: Propeller4Q.h:253
const double * TorqueCorrectedBody(const double T, const double *const X)
const double * TorqueNED(const double T, const double *const X)
const double * Cq(const double T, const double *const X)
VentilationTheory m_VentilationTheory
Definition: Propeller4Q.h:256
double m_shaftPowerCorrected
Definition: Propeller4Q.h:205
ISignalPort * m_InOrientationNED
Definition: Propeller4Q.h:235
double m_shaftTorqueCorrected
Definition: Propeller4Q.h:199
ISignalPort * m_InMyPD
Definition: Propeller4Q.h:241
CEnvironment * m_environment
Definition: Propeller4Q.h:250
double m_betaT
Definition: Propeller4Q.h:223
Eigen::Vector3d m_ForceBody
Definition: Propeller4Q.h:178
int m_IndexVentialtionStateT
Definition: Propeller4Q.h:262
const double * Rs(const double T, const double *const X)
double m_U
Definition: Propeller4Q.h:301
double m_beta_h
Definition: Propeller4Q.h:229
bool m_lowSpeedJet
Definition: Propeller4Q.h:214
int m_numPD
Definition: Propeller4Q.h:280
int m_IndexVentialtionStateQ
Definition: Propeller4Q.h:259
Curve4Q * m_curve
Definition: Propeller4Q.h:286
const double * PDCurrent(const double T, const double *const X)
Eigen::Vector3d m_TorqueBody
Definition: Propeller4Q.h:183
const double * ForceNED(const double T, const double *const X)
const double * Ct(const double T, const double *const X)
Eigen::Vector3d m_TorqueNED
Definition: Propeller4Q.h:181
double m_deltaBetaPlus
Definition: Propeller4Q.h:295
int m_IndexAxialFlowStateLow
Definition: Propeller4Q.h:265
double m_ThrustDeduction
Definition: Propeller4Q.h:307
double * m_PD
Definition: Propeller4Q.h:283
double m_Ct
Definition: Propeller4Q.h:292
double m_WakeFraction
Definition: Propeller4Q.h:304
double m_D
Definition: Propeller4Q.h:277
const double * BetaH(const double T, const double *const X)
ISignalPort * m_InVelocityNED
Definition: Propeller4Q.h:244
const double * ShaftPowerCorrected(const double T, const double *const X)
double m_Rs
Definition: Propeller4Q.h:220
Eigen::Vector3d m_TorqueCorrectedNED
Definition: Propeller4Q.h:191
const double * BetaQ(const double T, const double *const X)
const double * ShaftPower(const double T, const double *const X)
const double * ForceCorrectedNED(const double T, const double *const X)
const double * ForceCorrectedBody(const double T, const double *const X)
double m_PDcur
Definition: Propeller4Q.h:232
double m_shaftTorque
Definition: Propeller4Q.h:196
const double * ShaftTorqueCorrectedBody(const double T, const double *const X)
const double * ShaftTorqueBody(const double T, const double *const X)
Eigen::Vector3d m_ForceNED
Definition: Propeller4Q.h:176
double m_deltaBetaMinus
Definition: Propeller4Q.h:298
double m_Cq
Definition: Propeller4Q.h:289
VentilationTheory
Definition: Propeller4Q.h:84
Eigen::Vector3d m_ForceCorrectedBody
Definition: Propeller4Q.h:188
const double * TorqueBody(const double T, const double *const X)
ISignalPort * m_InMyRPM
Definition: Propeller4Q.h:238
double m_propellerThrustScaling
Definition: Propeller4Q.h:211
int m_IndexAxialFlowStateHigh
Definition: Propeller4Q.h:268
const double * Us(const double T, const double *const X)
const double * BetaT(const double T, const double *const X)
const double * TorqueCorrectedNED(const double T, const double *const X)
PropellerType
Definition: Propeller4Q.h:89
double m_Us
Definition: Propeller4Q.h:217
double m_betaQ
Definition: Propeller4Q.h:226
Simple waypoint object.
Definition: CableAttach.h:16
Definition: Propeller4Q.h:94