]> git.mxchange.org Git - flightgear.git/blob - src/FDM/JSBSim/FGPiston.cpp
Latest JSBSim changes.
[flightgear.git] / src / FDM / JSBSim / FGPiston.cpp
1 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2
3  Module:       FGPiston.cpp
4  Author:       Jon S. Berndt, JSBSim framework
5                Dave Luff, Piston engine model
6  Date started: 09/12/2000
7  Purpose:      This module models a Piston engine
8
9  ------------- Copyright (C) 2000  Jon S. Berndt (jsb@hal-pc.org) --------------
10
11  This program is free software; you can redistribute it and/or modify it under
12  the terms of the GNU General Public License as published by the Free Software
13  Foundation; either version 2 of the License, or (at your option) any later
14  version.
15
16  This program is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
18  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
19  details.
20
21  You should have received a copy of the GNU General Public License along with
22  this program; if not, write to the Free Software Foundation, Inc., 59 Temple
23  Place - Suite 330, Boston, MA  02111-1307, USA.
24
25  Further information about the GNU General Public License can also be found on
26  the world wide web at http://www.gnu.org.
27
28 FUNCTIONAL DESCRIPTION
29 --------------------------------------------------------------------------------
30
31 This class descends from the FGEngine class and models a Piston engine based on
32 parameters given in the engine config file for this class
33
34 HISTORY
35 --------------------------------------------------------------------------------
36 09/12/2000  JSB  Created
37
38 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
39 INCLUDES
40 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
41
42 #include "FGPiston.h"
43 #include "FGPropulsion.h"
44
45 static const char *IdSrc = "$Id$";
46 static const char *IdHdr = ID_PISTON;
47
48 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
49 CLASS IMPLEMENTATION
50 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
51
52 FGPiston::FGPiston(FGFDMExec* exec, FGConfigFile* Eng_cfg) : FGEngine(exec),
53   CONVERT_CUBIC_INCHES_TO_METERS_CUBED(1.638706e-5),
54   R_air(287.3),
55   rho_fuel(800),                 // estimate
56   calorific_value_fuel(47.3e6),
57   Cp_air(1005),
58   Cp_fuel(1700)
59 {
60   string token;
61
62   MinManifoldPressure_inHg = 6.5;
63   MaxManifoldPressure_inHg = 28.5;
64   Displacement = 360;
65   MaxHP = 200;
66   Cycles = 2;
67   IdleRPM = 600;
68
69   Name = Eng_cfg->GetValue("NAME");
70   Eng_cfg->GetNextConfigLine();
71   while (Eng_cfg->GetValue() != string("/FG_PISTON")) {
72     *Eng_cfg >> token;
73     if      (token == "MINMP") *Eng_cfg >> MinManifoldPressure_inHg;
74     else if (token == "MAXMP") *Eng_cfg >> MaxManifoldPressure_inHg;
75     else if (token == "DISPLACEMENT") *Eng_cfg >> Displacement;
76     else if (token == "MAXHP") *Eng_cfg >> MaxHP;
77     else if (token == "CYCLES") *Eng_cfg >> Cycles;
78     else if (token == "IDLERPM") *Eng_cfg >> IdleRPM;
79     else if (token == "MAXTHROTTLE") *Eng_cfg >> MaxThrottle;
80     else if (token == "MINTHROTTLE") *Eng_cfg >> MinThrottle;
81     else if (token == "SLFUELFLOWMAX") *Eng_cfg >> SLFuelFlowMax;
82     else cerr << "Unhandled token in Engine config file: " << token << endl;
83   }
84
85   Type = etPiston;
86   crank_counter = 0;
87   EngineNumber = 0;
88   OilTemp_degK = 298;
89   ManifoldPressure_inHg = Atmosphere->GetPressure() * 0.014138; // psf to in Hg
90
91   dt = State->Getdt();
92
93   // Initialisation
94   volumetric_efficiency = 0.8;  // Actually f(speed, load) but this will get us running
95
96   // First column is thi, second is neta (combustion efficiency)
97   Lookup_Combustion_Efficiency = new FGTable(12);
98   *Lookup_Combustion_Efficiency << 0.00 << 0.980;
99   *Lookup_Combustion_Efficiency << 0.90 << 0.980;
100   *Lookup_Combustion_Efficiency << 1.00 << 0.970;
101   *Lookup_Combustion_Efficiency << 1.05 << 0.950;
102   *Lookup_Combustion_Efficiency << 1.10 << 0.900;
103   *Lookup_Combustion_Efficiency << 1.15 << 0.850;
104   *Lookup_Combustion_Efficiency << 1.20 << 0.790;
105   *Lookup_Combustion_Efficiency << 1.30 << 0.700;
106   *Lookup_Combustion_Efficiency << 1.40 << 0.630;
107   *Lookup_Combustion_Efficiency << 1.50 << 0.570;
108   *Lookup_Combustion_Efficiency << 1.60 << 0.525;
109   *Lookup_Combustion_Efficiency << 2.00 << 0.345;
110
111   Power_Mixture_Correlation = new FGTable(13);
112   *Power_Mixture_Correlation << (14.7/1.6) << 78.0;
113   *Power_Mixture_Correlation << 10 <<  86.0;
114   *Power_Mixture_Correlation << 11 <<  93.5;
115   *Power_Mixture_Correlation << 12 <<  98.0;
116   *Power_Mixture_Correlation << 13 << 100.0;
117   *Power_Mixture_Correlation << 14 <<  99.0;
118   *Power_Mixture_Correlation << 15 <<  96.4;
119   *Power_Mixture_Correlation << 16 <<  92.5;
120   *Power_Mixture_Correlation << 17 <<  88.0;
121   *Power_Mixture_Correlation << 18 <<  83.0;
122   *Power_Mixture_Correlation << 19 <<  78.5;
123   *Power_Mixture_Correlation << 20 <<  74.0;
124   *Power_Mixture_Correlation << (14.7/0.6) << 58;
125
126   Debug(0); // Call Debug() routine from constructor if needed
127 }
128
129 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
130
131 FGPiston::~FGPiston()
132 {
133   Debug(1); // Call Debug() routine from constructor if needed
134 }
135
136 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
137
138 double FGPiston::Calculate(double PowerRequired)
139 {
140   // FIXME: calculate from actual fuel flow
141   ConsumeFuel();
142
143   Throttle = FCS->GetThrottlePos(EngineNumber);
144   Mixture = FCS->GetMixturePos(EngineNumber);
145
146   //
147   // Input values.
148   //
149
150   p_amb = Atmosphere->GetPressure() * 48;              // convert from lbs/ft2 to Pa
151   p_amb_sea_level = Atmosphere->GetPressureSL() * 48;
152   T_amb = Atmosphere->GetTemperature() * (5.0 / 9.0);  // convert from Rankine to Kelvin
153
154   RPM = Propulsion->GetThruster(EngineNumber)->GetRPM();
155   //if (RPM < IdleRPM) RPM = IdleRPM;  // kludge
156     
157   IAS = Auxiliary->GetVcalibratedKTS();
158
159   if (Mixture >= 0.5) {
160     doEngineStartup();
161     doManifoldPressure();
162     doAirFlow();
163     doFuelFlow();
164     doEnginePower();
165     doEGT();
166     doCHT();
167     doOilTemperature();
168     doOilPressure();
169   } else {
170     HP = 0;
171   }
172
173   PowerAvailable = (HP * hptoftlbssec) - PowerRequired;
174   return PowerAvailable;
175 }
176
177 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
178 /**
179  * Start or stop the engine.
180  */
181
182 void FGPiston::doEngineStartup(void)
183 {
184   // TODO: check magnetos, spark, starter, etc. and decide whether
185   // engine is running
186
187   // Check parameters that may alter the operating state of the engine. 
188   // (spark, fuel, starter motor etc)
189   bool spark;
190   bool fuel;
191
192   // Check for spark
193   Magneto_Left = false;
194   Magneto_Right = false;
195   // Magneto positions:
196   // 0 -> off
197   // 1 -> left only
198   // 2 -> right only
199   // 3 -> both
200   if (Magnetos != 0) {
201     spark = true;
202   } else {
203     spark = false;
204   }  // neglects battery voltage, master on switch, etc for now.
205   
206   if ((Magnetos == 1) || (Magnetos > 2)) Magneto_Left = true;
207   if (Magnetos > 1)  Magneto_Right = true;
208
209   // Assume we have fuel for now
210   fuel = true;
211
212   // Check if we are turning the starter motor
213   if (Cranking != Starter) {
214     // This check saves .../cranking from getting updated every loop - they
215     // only update when changed.
216     Cranking = Starter;
217     crank_counter = 0;
218   }
219
220   //Check mode of engine operation
221   // ACK - unfortunately this hack doesn't work in JSBSim since the RPM is reset
222   // each iteration by the propeller :-(
223   if (Cranking) {
224     crank_counter++;
225     if (RPM <= 480) {
226       RPM += 100;
227       if (RPM > 480)
228         RPM = 480;
229     } else {
230       // consider making a horrible noise if the starter is engaged with
231       // the engine running
232     }
233     // TODO - find a better guess at cranking speed
234   }
235   
236   // if ((!Running) && (spark) && (fuel) && (crank_counter > 120)) {
237
238   if ((!Running) && (spark) && (fuel)) {
239   // start the engine if revs high enough
240     if (RPM > 450) {
241       // For now just instantaneously start but later we should maybe crank for
242       // a bit
243       Running = true;
244       // RPM = 600;
245     }
246   }
247
248   if ( (Running) && ((!spark)||(!fuel)) ) {
249     // Cut the engine
250     // note that we only cut the power - the engine may continue to
251     // spin if the prop is in a moving airstream
252     Running = false;
253   }
254
255   // And finally a last check for stalling
256   if (Running) { 
257     //Check if we have stalled the engine
258     if (RPM == 0) {
259       Running = false;
260     } else if ((RPM <= 480) && (Cranking)) {
261       // Make sure the engine noise dosn't play if the engine won't
262             // start due to eg mixture lever pulled out.
263       Running = false;
264     }
265   }
266 }
267
268 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
269
270 /**
271  * Calculate the nominal manifold pressure in inches hg
272  *
273  * This function calculates nominal manifold pressure directly
274  * from the throttle position, and does not adjust it for the
275  * difference between the pressure at sea level and the pressure
276  * at the current altitude (that adjustment takes place in
277  * {@link #doEnginePower}).
278  *
279  * TODO: changes in MP should not be instantaneous -- introduce
280  * a lag between throttle changes and MP changes, to allow pressure
281  * to build up or disperse.
282  *
283  * Inputs: MinManifoldPressure_inHg, MaxManifoldPressure_inHg, Throttle
284  *
285  * Outputs: ManifoldPressure_inHg
286  */
287
288 void FGPiston::doManifoldPressure(void)
289 {
290   if (Running || Cranking) {
291     ManifoldPressure_inHg = MinManifoldPressure_inHg +
292             (Throttle * (MaxManifoldPressure_inHg - MinManifoldPressure_inHg));
293   } else {
294     ManifoldPressure_inHg = Atmosphere->GetPressure() * 0.014138; // psf to in Hg
295   }  
296 }
297
298 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
299 /**
300  * Calculate the air flow through the engine.
301  *
302  * Inputs: p_amb, R_air, T_amb, ManifoldPressure_inHg, Displacement,
303  *   RPM, volumetric_efficiency
304  *
305  * Outputs: rho_air, m_dot_air
306  */
307
308 void FGPiston::doAirFlow(void)
309 {
310   rho_air = p_amb / (R_air * T_amb);
311   double rho_air_manifold = rho_air * ManifoldPressure_inHg / 29.6;
312   double displacement_SI = Displacement * CONVERT_CUBIC_INCHES_TO_METERS_CUBED;
313   double swept_volume = (displacement_SI * (RPM/60)) / 2;
314   double v_dot_air = swept_volume * volumetric_efficiency;
315   m_dot_air = v_dot_air * rho_air_manifold;
316 }
317
318 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
319 /**
320  * Calculate the fuel flow into the engine.
321  *
322  * Inputs: Mixture, thi_sea_level, p_amb_sea_level, p_amb, m_dot_air
323  *
324  * Outputs: equivalence_ratio, m_dot_fuel
325  */
326
327 void FGPiston::doFuelFlow(void)
328 {
329   double thi_sea_level = 1.3 * Mixture;
330   equivalence_ratio = thi_sea_level * p_amb_sea_level / p_amb;
331   m_dot_fuel = m_dot_air / 14.7 * equivalence_ratio;
332 }
333
334 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
335 /**
336  * Calculate the power produced by the engine.
337  *
338  * Currently, the JSBSim propellor model does not allow the
339  * engine to produce enough RPMs to get up to a high horsepower.
340  * When tested with sufficient RPM, it has no trouble reaching
341  * 200HP.
342  *
343  * Inputs: ManifoldPressure_inHg, p_amb, p_amb_sea_level, RPM, T_amb, 
344  *   equivalence_ratio, Cycles, MaxHP
345  *
346  * Outputs: Percentage_Power, HP
347  */
348
349 void FGPiston::doEnginePower(void)
350 {
351   double True_ManifoldPressure_inHg = ManifoldPressure_inHg * p_amb / p_amb_sea_level;
352   double ManXRPM = True_ManifoldPressure_inHg * RPM;
353         // FIXME: this needs to be generalized
354   Percentage_Power = (6e-9 * ManXRPM * ManXRPM) + (8e-4 * ManXRPM) - 1.0;
355   double T_amb_degF = (T_amb * 1.8) - 459.67;
356   double T_amb_sea_lev_degF = (288 * 1.8) - 459.67; 
357   Percentage_Power =
358     Percentage_Power + ((T_amb_sea_lev_degF - T_amb_degF) * 7 /120);
359   double Percentage_of_best_power_mixture_power =
360     Power_Mixture_Correlation->GetValue(14.7 / equivalence_ratio);
361   Percentage_Power =
362     Percentage_Power * Percentage_of_best_power_mixture_power / 100.0;
363   if (Percentage_Power < 0.0)
364     Percentage_Power = 0.0;
365   else if (Percentage_Power > 100.0)
366     Percentage_Power = 100.0;
367   HP = Percentage_Power * MaxHP / 100.0;
368
369   //Hack
370   if (!Running) {
371     if (Cranking) {
372       if (RPM < 480) {
373         HP = 3.0 + ((480 - RPM) / 10.0);
374       } else {
375         HP = 3.0;
376       }
377     } else {
378       // Quick hack until we port the FMEP stuff
379       if (RPM > 0.0)
380         HP = -1.5;
381       else
382         HP = 0.0;
383     }
384   }
385 }
386
387 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
388 /**
389  * Calculate the exhaust gas temperature.
390  *
391  * Inputs: equivalence_ratio, m_dot_fuel, calorific_value_fuel, 
392  *   Cp_air, m_dot_air, Cp_fuel, m_dot_fuel, T_amb, Percentage_Power
393  *
394  * Outputs: combustion_efficiency, ExhaustGasTemp_degK
395  */
396
397 void FGPiston::doEGT(void)
398 {
399   double delta_T_exhaust;
400   double enthalpy_exhaust;
401   double heat_capacity_exhaust;
402   double dEGTdt;
403
404   if ((Running) && (m_dot_air > 0.0)) {  // do the energy balance
405     combustion_efficiency = Lookup_Combustion_Efficiency->GetValue(equivalence_ratio);
406     enthalpy_exhaust = m_dot_fuel * calorific_value_fuel * 
407                               combustion_efficiency * 0.33;
408     heat_capacity_exhaust = (Cp_air * m_dot_air) + (Cp_fuel * m_dot_fuel);
409     delta_T_exhaust = enthalpy_exhaust / heat_capacity_exhaust;
410     ExhaustGasTemp_degK = T_amb + delta_T_exhaust;
411     ExhaustGasTemp_degK *= 0.444 + ((0.544 - 0.444) * Percentage_Power / 100.0);
412   } else {  // Drop towards ambient - guess an appropriate time constant for now
413     dEGTdt = (298.0 - ExhaustGasTemp_degK) / 100.0;
414     delta_T_exhaust = dEGTdt * dt;
415     ExhaustGasTemp_degK += delta_T_exhaust;
416   }
417 }
418
419 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
420 /**
421  * Calculate the cylinder head temperature.
422  *
423  * Inputs: T_amb, IAS, rho_air, m_dot_fuel, calorific_value_fuel,
424  *   combustion_efficiency, RPM
425  *
426  * Outputs: CylinderHeadTemp_degK
427  */
428
429 void FGPiston::doCHT(void)
430 {
431   double h1 = -95.0;
432   double h2 = -3.95;
433   double h3 = -0.05;
434
435   double arbitary_area = 1.0;
436   double CpCylinderHead = 800.0;
437   double MassCylinderHead = 8.0;
438
439   double temperature_difference = CylinderHeadTemp_degK - T_amb;
440   double v_apparent = IAS * 0.5144444;
441   double v_dot_cooling_air = arbitary_area * v_apparent;
442   double m_dot_cooling_air = v_dot_cooling_air * rho_air;
443   double dqdt_from_combustion = 
444     m_dot_fuel * calorific_value_fuel * combustion_efficiency * 0.33;
445   double dqdt_forced = (h2 * m_dot_cooling_air * temperature_difference) + 
446     (h3 * RPM * temperature_difference);
447   double dqdt_free = h1 * temperature_difference;
448   double dqdt_cylinder_head = dqdt_from_combustion + dqdt_forced + dqdt_free;
449     
450   double HeatCapacityCylinderHead = CpCylinderHead * MassCylinderHead;
451     
452   CylinderHeadTemp_degK = dqdt_cylinder_head / HeatCapacityCylinderHead;
453 }
454
455 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
456 /**
457  * Calculate the oil temperature.
458  *
459  * Inputs: Percentage_Power, running flag.
460  *
461  * Outputs: OilTemp_degK
462  */
463
464 void FGPiston::doOilTemperature(void)
465 {
466   double idle_percentage_power = 2.3;        // approximately
467   double target_oil_temp;        // Steady state oil temp at the current engine conditions
468   double time_constant;          // The time constant for the differential equation
469
470   if (Running) {
471     target_oil_temp = 363;
472     time_constant = 500;        // Time constant for engine-on idling.
473     if (Percentage_Power > idle_percentage_power) {
474       time_constant /= ((Percentage_Power / idle_percentage_power) / 10.0); // adjust for power 
475     }
476   } else {
477     target_oil_temp = 298;
478     time_constant = 1000;  // Time constant for engine-off; reflects the fact
479                            // that oil is no longer getting circulated
480   }
481
482   double dOilTempdt = (target_oil_temp - OilTemp_degK) / time_constant;
483
484   OilTemp_degK += (dOilTempdt * dt);
485 }
486
487 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
488 /**
489  * Calculate the oil pressure.
490  *
491  * Inputs: RPM
492  *
493  * Outputs: OilPressure_psi
494  */
495
496 void FGPiston::doOilPressure(void)
497 {
498   double Oil_Press_Relief_Valve = 60; // FIXME: may vary by engine
499   double Oil_Press_RPM_Max = 1800;    // FIXME: may vary by engine
500   double Design_Oil_Temp = 85;        // FIXME: may vary by engine
501              // FIXME: WRONG!!! (85 degK???)
502   double Oil_Viscosity_Index = 0.25;
503
504   OilPressure_psi = (Oil_Press_Relief_Valve / Oil_Press_RPM_Max) * RPM;
505
506   if (OilPressure_psi >= Oil_Press_Relief_Valve) {
507     OilPressure_psi = Oil_Press_Relief_Valve;
508   }
509
510   OilPressure_psi += (Design_Oil_Temp - OilTemp_degK) * Oil_Viscosity_Index;
511 }
512
513 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
514 //
515 //    The bitmasked value choices are as follows:
516 //    unset: In this case (the default) JSBSim would only print
517 //       out the normally expected messages, essentially echoing
518 //       the config files as they are read. If the environment
519 //       variable is not set, debug_lvl is set to 1 internally
520 //    0: This requests JSBSim not to output any messages
521 //       whatsoever.
522 //    1: This value explicity requests the normal JSBSim
523 //       startup messages
524 //    2: This value asks for a message to be printed out when
525 //       a class is instantiated
526 //    4: When this value is set, a message is displayed when a
527 //       FGModel object executes its Run() method
528 //    8: When this value is set, various runtime state variables
529 //       are printed out periodically
530 //    16: When set various parameters are sanity checked and
531 //       a message is printed out when they go out of bounds
532
533 void FGPiston::Debug(int from)
534 {
535   if (debug_lvl <= 0) return;
536
537   if (debug_lvl & 1) { // Standard console startup message output
538     if (from == 0) { // Constructor
539
540       cout << "\n    Engine Name: "         << Name << endl;
541       cout << "      MinManifoldPressure: " << MinManifoldPressure_inHg << endl;
542       cout << "      MaxManifoldPressure: " << MaxManifoldPressure_inHg << endl;
543       cout << "      Displacement: "        << Displacement             << endl;
544       cout << "      MaxHP: "               << MaxHP                    << endl;
545       cout << "      Cycles: "              << Cycles                   << endl;
546       cout << "      IdleRPM: "             << IdleRPM                  << endl;
547       cout << "      MaxThrottle: "         << MaxThrottle              << endl;
548       cout << "      MinThrottle: "         << MinThrottle              << endl;
549       cout << "      SLFuelFlowMax: "       << SLFuelFlowMax            << endl;
550
551       cout << endl;
552       cout << "      Combustion Efficiency table:" << endl;
553       Lookup_Combustion_Efficiency->Print();
554       cout << endl;
555
556       cout << endl;
557       cout << "      Power Mixture Correlation table:" << endl;
558       Power_Mixture_Correlation->Print();
559       cout << endl;
560
561     }
562   }
563   if (debug_lvl & 2 ) { // Instantiation/Destruction notification
564     if (from == 0) cout << "Instantiated: FGPiston" << endl;
565     if (from == 1) cout << "Destroyed:    FGPiston" << endl;
566   }
567   if (debug_lvl & 4 ) { // Run() method entry print for FGModel-derived objects
568   }
569   if (debug_lvl & 8 ) { // Runtime state variables
570   }
571   if (debug_lvl & 16) { // Sanity checking
572   }
573   if (debug_lvl & 64) {
574     if (from == 0) { // Constructor
575       cout << IdSrc << endl;
576       cout << IdHdr << endl;
577     }
578   }
579 }
580