Marine systems simulation
ShipResistance.h
1#ifndef _CSHIRESISTANCE_H_
2#define _CSHIRESISTANCE_H_
3#include <vector>
4
5#include "ResistanceCurve.h"
6
7namespace Ship{
9 {
10 public:
11
12 enum ResistancCurves
13 {
14 RESISTANCE_SKIN_FRICTION=0,
15 RESISTANCE_RESIDUAL,
16 RESISTANCE_SKIN_ROU_GHNESS,
17 RESISTANCE_FORM_FACTOR,
18 RESISTANCE_GENERAL_FN,
19 RESISTANCE_GENERAL_RN
20 };
22
23 virtual ~ShipResistance();
24
25 double GetResistance(double V);
26
27 void SetResidualResistanceScale(double scale);
28
29 void SetLength(double _Lpp);
30 void SetBredth(float B);
31 void SetDraughtAft( float T );
32 void SetDraughtFore( float T);
33 void SetBlockCoefficient( float Cb);
34 void SetWetArea( double _S );
35 void SetViscosity( double _Mu );
36
37 void AddCurve( ResistanceCurve * curve, ResistanceCurve::CURVE type );
38 private:
39
40
41 float m_Rho; // Desnity of fluid
42
43
44 double m_Mu; // Dynamic viscocity
45 double m_Rn; // reynolds number
46 float m_Fn; // Froude number
47
48 float m_Lpp; // Length between perpendiculars
49 float m_Cb; // block coefficient
50 float m_Ta; // Draught aft
51 float m_Tf; // Draught fore
52 float m_B; // Ship bredth
53 float m_S; // Wetted area of vessel
54
55 double m_residualResitanceScale;
56
57 // RESISTANCE_SKIN_FRICTION
58 ResistanceCurve *m_Cf;
59
60 // RESISTANCE_SKIN_ROU_GHNESS
61 ResistanceCurve *m_dCF;
62
63 // RESISTANCE_RESIDUAL
64 ResistanceCurve *m_Cr;
65
66 //RESISTANCE_FORM_FACTOR,
67 ResistanceCurve *m_kCf;
68
69 //RESISTANCE_GENERAL_FN,
70 std::vector< ResistanceCurve* > m_Cfn;
71
72 //RESISTANCE_GENERAL_RN
73 std::vector< ResistanceCurve* > m_Crn;
74 };
75}
76
77#endif
Definition: ResistanceCurve.h:6
Definition: ShipResistance.h:9
Simple waypoint object.
Definition: CableAttach.h:16