Virtual Testbed
Ship dynamics simulator for extreme conditions
propeller.hh
1 #ifndef VTESTBED_CORE_PROPELLER_HH
2 #define VTESTBED_CORE_PROPELLER_HH
3 
4 namespace vtb {
5 
6  namespace core {
7 
8  template <class T>
9  class Propeller {
10 
11  private:
12  T _revolutions{0};
13  T _diameter{15};
14  T _thrust_coefficient{0.188};
15  T _torque_coefficient{};
16 
17  public:
18 
19  Propeller() = default;
20 
21  inline explicit
22  Propeller(T revolutions, T diameter, T Kt):
23  _revolutions(revolutions), _diameter(diameter), _thrust_coefficient(Kt) {}
24 
25  inline void revolutions(T rhs) { this->_revolutions = rhs; }
26  inline void diameter(T rhs) { this->_diameter = rhs; }
27  inline void thrust_coefficient(T rhs) { this->_thrust_coefficient = rhs; }
28  inline void torque_coefficient(T rhs) { this->_torque_coefficient = rhs; }
29 
31  inline T revolutions() const { return this->_revolutions; }
32 
34  inline T diameter() const { return this->_diameter; }
35 
37  inline T thrust_coefficient() const { return this->_thrust_coefficient; }
38 
40  inline T torque_coefficient() const { return this->_torque_coefficient; }
41 
43  T thrust() const;
44 
46  T torque() const;
47 
49  T advance_coefficient(T velocity) const;
50 
52  T efficiency(T velocity) const;
53 
54  };
55  }
56 }
57 
58 #endif // vim:filetype=cpp
T thrust_coefficient() const
Thrust coefficient .
Definition: propeller.hh:37
T efficiency(T velocity) const
Efficieny in open water .
Definition: propeller.cc:32
T torque_coefficient() const
Torque coefficient .
Definition: propeller.hh:40
T torque() const
Torque .
Definition: propeller.cc:18
Main namespace.
Definition: convert.hh:9
T revolutions() const
Revolutions per second .
Definition: propeller.hh:31
T diameter() const
Diameter .
Definition: propeller.hh:34
T advance_coefficient(T velocity) const
Advance coefficient .
Definition: propeller.cc:27
T thrust() const
Thrust .
Definition: propeller.cc:9