FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
OpenWaterPropeller.h
1#ifndef _COPENWATER_PROPELLER_H_
2#define _COPENWATER_PROPELLER_H_
3
4
5#include <cmath>
6#include <string>
7#include <vector>
8
9#include "IPropellerCalculator.h"
10#include "TableLookup.h"
11
12namespace Ship{
19 {
20 public:
21 OpenWaterPropeller(double D, double PD);
22
23 double GetKq(double J);
24 double GetKt(double J);
25
27 void SetData(double *J, double* Kt, double* Kq, int num_elements);
28 void SetData(std::vector<double> J, std::vector<double> Kt, std::vector<double> Kq);
29
31 void SetWarnOnce(WarnOnce* warnOnce) { m_warnOnce = warnOnce; }
32
33 private:
34 double Interpolate(const std::vector<double>& table, double J, const char* name) const;
35
36 std::vector<double> J; // Advance ratio axis
37 std::vector<double> Ct; // Thrust coefficient
38 std::vector<double> Cq; // Torque coefficient
39
40 double D; // Diameter
41 double PD; // PD ratio
42 WarnOnce* m_warnOnce = nullptr;
43 };
44}
45
46#endif
Definition IPropellerCalculator.h:8
Definition OpenWaterPropeller.h:19
void SetWarnOnce(WarnOnce *warnOnce)
Where to report a J outside the table; null (the default) reports nowhere.
Definition OpenWaterPropeller.h:31
void SetData(double *J, double *Kt, double *Kq, int num_elements)
Sets the data.
Definition TableLookup.h:18
Simple waypoint object.
Definition CableAttach.h:16