Debian Codegraph @

src/FDM/YASim/TurbineEngine.hpp

raw symbols SCIP
1 #ifndef _TURBINEENGINE_HPP
2 #define _TURBINEENGINE_HPP
3
4 #include "Engine.hpp"
5
6 namespace yasim {
7
8 class TurbineEngine : public Engine {
9 public:
10 virtual TurbineEngine* isTurbineEngine() { return this; }
11
12 TurbineEngine(float power, float omega, float alt, float flatRating);
13 void setN2Range(float low_idle, float high_idle, float max) {
14 _n2LowIdle = low_idle;
15 _n2HighIdle = high_idle;
16 _n2Max = max;
17 }
18 void setFuelConsumption(float bsfc) { _bsfc = bsfc; }
19
20 virtual void calc(float pressure, float temp, float speed);
21 virtual void stabilize();
22 virtual void integrate(float dt);
23
24 void setCondLever( float lever ) {
25 _cond_lever = lever;
26 }
27 virtual float getTorque() { return _torque; }
28 virtual float getFuelFlow() { return _fuelFlow; }
29 float getN2() { return _n2; }
30
31 private:
32 void setOutputFromN2();
33
34 float _cond_lever;
35
36 float _maxTorque;
37 float _flatRating;
38 float _rho0;
39 float _bsfc; // SI units! kg/s per watt
40 float _n2LowIdle;
41 float _n2HighIdle;
42 float _n2Max;
43
44 float _n2Min;
45 float _n2Target;
46 //float _torqueTarget;
47 //float _fuelFlowTarget;
48
49 float _n2;
50 float _rho;
51 float _omega;
52 float _torque;
53 float _fuelFlow;
54 };
55
56 }; // namespace yasim
57 #endif // _TURBINEENGINE_HPP