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