2004-05-01 00:26:33 +00:00
|
|
|
#ifndef _TURBINEENGINE_HPP
|
|
|
|
#define _TURBINEENGINE_HPP
|
|
|
|
|
|
|
|
#include "Engine.hpp"
|
|
|
|
|
|
|
|
namespace yasim {
|
|
|
|
|
|
|
|
class TurbineEngine : public Engine {
|
|
|
|
public:
|
|
|
|
virtual TurbineEngine* isTurbineEngine() { return this; }
|
|
|
|
|
|
|
|
TurbineEngine(float power, float omega, float alt, float flatRating);
|
2004-07-27 20:39:56 +00:00
|
|
|
void setN2Range(float low_idle, float high_idle, float max) {
|
|
|
|
_n2LowIdle = low_idle;
|
|
|
|
_n2HighIdle = high_idle;
|
|
|
|
_n2Max = max;
|
|
|
|
}
|
2004-05-01 00:26:33 +00:00
|
|
|
void setFuelConsumption(float bsfc) { _bsfc = bsfc; }
|
|
|
|
|
|
|
|
virtual void calc(float pressure, float temp, float speed);
|
|
|
|
virtual void stabilize();
|
|
|
|
virtual void integrate(float dt);
|
|
|
|
|
2004-07-20 22:17:58 +00:00
|
|
|
void setCondLever( float lever ) {
|
|
|
|
_cond_lever = lever;
|
|
|
|
}
|
2004-05-01 00:26:33 +00:00
|
|
|
virtual float getTorque() { return _torque; }
|
|
|
|
virtual float getFuelFlow() { return _fuelFlow; }
|
|
|
|
float getN2() { return _n2; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
void setOutputFromN2();
|
|
|
|
|
2004-07-20 22:17:58 +00:00
|
|
|
float _cond_lever;
|
|
|
|
|
2004-05-01 00:26:33 +00:00
|
|
|
float _maxTorque;
|
|
|
|
float _flatRating;
|
|
|
|
float _rho0;
|
|
|
|
float _bsfc; // SI units! kg/s per watt
|
2004-07-27 20:39:56 +00:00
|
|
|
float _n2LowIdle;
|
|
|
|
float _n2HighIdle;
|
2004-05-01 00:26:33 +00:00
|
|
|
float _n2Max;
|
|
|
|
|
2004-07-27 20:39:56 +00:00
|
|
|
float _n2Min;
|
2004-05-01 00:26:33 +00:00
|
|
|
float _n2Target;
|
|
|
|
float _torqueTarget;
|
|
|
|
float _fuelFlowTarget;
|
|
|
|
|
|
|
|
float _n2;
|
|
|
|
float _rho;
|
|
|
|
float _omega;
|
|
|
|
float _torque;
|
|
|
|
float _fuelFlow;
|
|
|
|
};
|
|
|
|
|
|
|
|
}; // namespace yasim
|
|
|
|
#endif // _TURBINEENGINE_HPP
|