43 #include "math/FGTable.h" 49 #define ID_PISTON "$Id: FGPiston.h,v 1.38 2016/01/02 17:42:53 bcoconni Exp $" 50 #define FG_MAX_BOOST_SPEEDS 3 229 std::string GetEngineLabels(
const std::string& delimiter);
230 std::string GetEngineValues(
const std::string& delimiter);
233 double GetPowerAvailable(
void)
const {
return (HP * hptoftlbssec);}
237 void SetMagnetos(
int magnetos) {Magnetos = magnetos;}
239 double GetEGT(
void)
const {
return EGT_degC; }
240 int GetMagnetos(
void)
const {
return Magnetos;}
242 double getExhaustGasTemp_degF(
void)
const {
return KelvinToFahrenheit(ExhaustGasTemp_degK);}
243 double getManifoldPressure_inHg(
void)
const {
return ManifoldPressure_inHg;}
244 double getCylinderHeadTemp_degF(
void)
const {
return KelvinToFahrenheit(CylinderHeadTemp_degK);}
245 double getOilPressure_psi(
void)
const {
return OilPressure_psi;}
247 double getRPM(
void)
const {
return RPM;}
254 double IndicatedHorsePower;
262 void doEngineStartup(
void);
263 void doBoostControl(
void);
265 void doAirFlow(
void);
266 void doFuelFlow(
void);
267 void doEnginePower(
void);
270 void doOilPressure(
void);
271 void doOilTemperature(
void);
272 double GetStdPressure100K(
double altitude)
const;
274 int InitRunning(
void);
282 const double calorific_value_fuel;
284 const double Cp_fuel;
285 const double standard_pressure;
288 FGTable *Lookup_Combustion_Efficiency;
289 FGTable *Mixture_Efficiency_Correlation;
294 double MinManifoldPressure_inHg;
295 double MaxManifoldPressure_inHg;
297 double ManifoldPressureLag;
299 double displacement_SI;
301 double StaticFriction_HP;
302 double SparkFailDrop;
309 double CylinderHeadMass;
310 double CompressionRatio;
313 double PeakMeanPistonSpeed_fps;
314 double RatedMeanPistonSpeed_fps;
315 double Ram_Air_Factor;
317 double StarterTorque;
331 double RatedBoost[FG_MAX_BOOST_SPEEDS];
332 double RatedAltitude[FG_MAX_BOOST_SPEEDS];
334 double RatedRPM[FG_MAX_BOOST_SPEEDS];
335 double RatedPower[FG_MAX_BOOST_SPEEDS];
336 double BoostSwitchAltitude[FG_MAX_BOOST_SPEEDS - 1];
338 double BoostSwitchPressure[FG_MAX_BOOST_SPEEDS - 1];
339 double BoostMul[FG_MAX_BOOST_SPEEDS];
340 double RatedMAP[FG_MAX_BOOST_SPEEDS];
341 double TakeoffMAP[FG_MAX_BOOST_SPEEDS];
342 double BoostSwitchHysteresis;
343 double BoostLossFactor;
359 double Cooling_Factor;
368 double volumetric_efficiency;
369 double volumetric_efficiency_reduced;
373 double equivalence_ratio;
377 double combustion_efficiency;
378 double ExhaustGasTemp_degK;
380 double ManifoldPressure_inHg;
381 double CylinderHeadTemp_degK;
382 double OilPressure_psi;
384 double MeanPistonSpeed_fps;
386 void Debug(
int from);
double CalcFuelNeed(void)
The fuel need is calculated based on power levels and flow rate for that power level.
static double KelvinToFahrenheit(double kelvin)
Converts from degrees Kelvin to degrees Fahrenheit.
void Calculate(void)
Calculates the thrust of the engine, and other engine functions.
FGPiston(FGFDMExec *exec, Element *el, int engine_number, struct Inputs &input)
Constructor.
Base class for all engines.
Models a Supercharged Piston engine.
void ResetToIC(void)
Resets the Engine parameters to the initial conditions.
Encapsulates the JSBSim simulation executive.