~ubuntu-branches/ubuntu/precise/flightgear/precise

« back to all changes in this revision

Viewing changes to src/FDM/JSBSim/models/propulsion/FGPiston.cpp

  • Committer: Package Import Robot
  • Author(s): Ove Kaaven
  • Date: 2011-09-03 22:16:12 UTC
  • mfrom: (3.1.9 sid)
  • Revision ID: package-import@ubuntu.com-20110903221612-2cjy0z7ztj5nkln5
Tags: 2.4.0-1
* New upstream release. Closes: #638588.
* Build-Depend on OpenSceneGraph 3.0, and the Subversion library.
* Recommend fgfs-scenery-base.
* Enable parallel builds (shorter compile times on multicore CPUs).
* Removed hack that tried to build without optimizations if
  building with optimizations fails.

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
#include <sstream>
44
44
 
45
45
#include "FGPiston.h"
46
 
#include "FGState.h"
47
46
#include "models/FGAtmosphere.h"
 
47
#include "models/FGAuxiliary.h"
48
48
#include "models/FGPropulsion.h"
49
49
#include "FGPropeller.h"
50
50
#include <iostream>
53
53
 
54
54
namespace JSBSim {
55
55
 
56
 
static const char *IdSrc = "$Id$";
 
56
static const char *IdSrc = "$Id: FGPiston.cpp,v 1.58 2011/06/13 15:23:09 jentron Exp $";
57
57
static const char *IdHdr = ID_PISTON;
58
58
 
59
59
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
64
64
  : FGEngine(exec, el, engine_number),
65
65
  R_air(287.3),                  // Gas constant for air J/Kg/K
66
66
  rho_fuel(800),                 // estimate
67
 
  calorific_value_fuel(47.3e6),
 
67
  calorific_value_fuel(47.3e6),  // J/Kg
68
68
  Cp_air(1005),                  // Specific heat (constant pressure) J/Kg/K
69
69
  Cp_fuel(1700),
70
70
  standard_pressure(101320.73)
74
74
  // Defaults and initializations
75
75
 
76
76
  Type = etPiston;
77
 
  dt = State->Getdt();
 
77
  dt = FDMExec->GetDeltaT();
78
78
 
79
79
  // These items are read from the configuration file
80
80
  // Defaults are from a Lycoming O-360, more or less
92
92
  Bore = 5.125;
93
93
  Stroke = 4.375;
94
94
  Cylinders = 4;
 
95
  CylinderHeadMass = 2; //kg
95
96
  CompressionRatio = 8.5;
96
97
  Z_airbox = -999;
97
98
  Ram_Air_Factor = 1;
98
99
  PeakMeanPistonSpeed_fps = 100;
 
100
  FMEPDynamic= 18400;
 
101
  FMEPStatic = 46500;
 
102
  Cooling_Factor = 0.5144444;
 
103
  StaticFriction_HP = 1.5;
99
104
 
100
105
  // These are internal program variables
101
106
 
173
178
    Displacement = el->FindElementValueAsNumberConvertTo("displacement","IN3");
174
179
  if (el->FindElement("maxhp"))
175
180
    MaxHP = el->FindElementValueAsNumberConvertTo("maxhp","HP");
 
181
  if (el->FindElement("static-friction"))
 
182
    StaticFriction_HP = el->FindElementValueAsNumberConvertTo("static-friction","HP");
176
183
  if (el->FindElement("sparkfaildrop"))
177
184
    SparkFailDrop = Constrain(0, 1 - el->FindElementValueAsNumber("sparkfaildrop"), 1);
178
185
  if (el->FindElement("cycles"))
197
204
    Stroke = el->FindElementValueAsNumberConvertTo("stroke","IN");
198
205
  if (el->FindElement("cylinders"))
199
206
    Cylinders = el->FindElementValueAsNumber("cylinders");
 
207
  if (el->FindElement("cylinder-head-mass"))
 
208
    CylinderHeadMass = el->FindElementValueAsNumberConvertTo("cylinder-head-mass","KG");
200
209
  if (el->FindElement("air-intake-impedance-factor"))
201
210
    Z_airbox = el->FindElementValueAsNumber("air-intake-impedance-factor");
202
211
  if (el->FindElement("ram-air-factor"))
203
212
    Ram_Air_Factor  = el->FindElementValueAsNumber("ram-air-factor");
 
213
  if (el->FindElement("cooling-factor"))
 
214
    Cooling_Factor  = el->FindElementValueAsNumber("cooling-factor");
 
215
  if (el->FindElement("dynamic-fmep"))
 
216
    FMEPDynamic= el->FindElementValueAsNumberConvertTo("dynamic-fmep","PA");
 
217
  if (el->FindElement("static-fmep"))
 
218
    FMEPStatic = el->FindElementValueAsNumberConvertTo("static-fmep","PA");
204
219
  if (el->FindElement("peak-piston-speed"))
205
220
    PeakMeanPistonSpeed_fps  = el->FindElementValueAsNumber("peak-piston-speed");
206
221
  if (el->FindElement("numboostspeeds")) { // Turbo- and super-charging parameters
244
259
  // Create IFSC to match the engine if not provided
245
260
  if (ISFC < 0) {
246
261
      double pmep = 29.92 - MaxManifoldPressure_inHg;
247
 
      pmep *= inhgtopa;
248
 
      double fmep = (18400 * RatedMeanPistonSpeed_fps * fttom + 46500);
 
262
      pmep *= inhgtopa  * volumetric_efficiency;
 
263
      double fmep = (FMEPDynamic * RatedMeanPistonSpeed_fps * fttom + FMEPStatic);
249
264
      double hp_loss = ((pmep + fmep) * displacement_SI * MaxRPM)/(Cycles*22371);
250
 
      ISFC = ( 1.1*Displacement * MaxRPM * volumetric_efficiency *(MaxManifoldPressure_inHg / 29.92) ) / (9411 * (MaxHP+hp_loss));
 
265
      ISFC = ( 1.1*Displacement * MaxRPM * volumetric_efficiency *(MaxManifoldPressure_inHg / 29.92) ) / (9411 * (MaxHP+hp_loss-StaticFriction_HP));
251
266
// cout <<"FMEP: "<< fmep <<" PMEP: "<< pmep << " hp_loss: " <<hp_loss <<endl;
252
267
  }
253
268
  if ( MaxManifoldPressure_inHg > 29.9 ) {   // Don't allow boosting with a bogus number
262
277
 * Where:
263
278
 * Pm = Manifold Pressure
264
279
 * Pa = Ambient Pressre
265
 
 * Ze = engine impedance, Ze is effectively 1 / Mean Piston Speed  
 
280
 * Ze = engine impedance, Ze is effectively 1 / Mean Piston Speed
266
281
 * Zi = airbox impedance
267
282
 * Zt = throttle impedance
268
 
 * 
 
283
 *
269
284
 * For the calculation below throttle is fully open or Zt = 0
270
285
 *
271
 
 * 
 
286
 *
272
287
 *
273
288
 */
274
289
 
276
291
    double Ze=PeakMeanPistonSpeed_fps/RatedMeanPistonSpeed_fps; // engine impedence
277
292
    Z_airbox = (standard_pressure *Ze / maxMAP) - Ze; // impedence of airbox
278
293
  }
279
 
  Z_throttle=(((MaxRPM * Stroke) / 360)/((IdleRPM * Stroke) / 360))*(standard_pressure/minMAP - 1) - Z_airbox; // Constant for Throttle impedence
 
294
  // Constant for Throttle impedence
 
295
  Z_throttle=(PeakMeanPistonSpeed_fps/((IdleRPM * Stroke) / 360))*(standard_pressure/minMAP - 1) - Z_airbox; 
 
296
  //  Z_throttle=(MaxRPM/IdleRPM )*(standard_pressure/minMAP+2); // Constant for Throttle impedence
280
297
 
281
298
  string property_name, base_property_name;
282
299
  base_property_name = CreateIndexedPropertyName("propulsion/engine", EngineNumber);
294
311
  PropertyManager->Tie(property_name, &Z_airbox);
295
312
  property_name = base_property_name + "/ram-air-factor";
296
313
  PropertyManager->Tie(property_name, &Ram_Air_Factor);
 
314
  property_name = base_property_name + "/cooling-factor";
 
315
  PropertyManager->Tie(property_name, &Cooling_Factor);
297
316
  property_name = base_property_name + "/boost-speed";
298
317
  PropertyManager->Tie(property_name, &BoostSpeed);
 
318
  property_name = base_property_name + "/cht-degF";
 
319
  PropertyManager->Tie(property_name, this, &FGPiston::getCylinderHeadTemp_degF);
 
320
  property_name = base_property_name + "/engine-rpm";
 
321
  PropertyManager->Tie(property_name, this, &FGPiston::getRPM);
 
322
  property_name = base_property_name + "/oil-temperature-degF";
 
323
  PropertyManager->Tie(property_name, this, &FGPiston::getOilTemp_degF);
 
324
  property_name = base_property_name + "/oil-pressure-psi";
 
325
  PropertyManager->Tie(property_name, this, &FGPiston::getOilPressure_psi);
 
326
  property_name = base_property_name + "/egt-degF";
 
327
  PropertyManager->Tie(property_name, this, &FGPiston::getExhaustGasTemp_degF);
299
328
 
300
329
  // Set up and sanity-check the turbo/supercharging configuration based on the input values.
301
330
  if (TakeoffBoost > RatedBoost[0]) bTakeoffBoost = true;
376
405
}
377
406
 
378
407
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
379
 
 
380
 
double FGPiston::Calculate(void)
 
408
void FGPiston::Calculate(void)
381
409
{
 
410
  RunPreFunctions();
 
411
 
382
412
  if (FuelFlow_gph > 0.0) ConsumeFuel();
383
413
 
384
414
  Throttle = FCS->GetThrottlePos(EngineNumber);
385
 
  // calculate the throttle plate angle.  1 unit is approx pi/2 radians.
386
 
  ThrottleAngle = MinThrottle+((MaxThrottle-MinThrottle)*Throttle );
387
415
  Mixture = FCS->GetMixturePos(EngineNumber);
388
416
 
389
 
  //
390
417
  // Input values.
391
 
  //
392
418
 
393
419
  p_amb = Atmosphere->GetPressure() * psftopa;
394
420
  double p = Auxiliary->GetTotalPressure() * psftopa;
410
436
  //Assume lean limit at 22 AFR for now - thats a thi of 0.668
411
437
  //This might be a bit generous, but since there's currently no audiable warning of impending
412
438
  //cutout in the form of misfiring and/or rough running its probably reasonable for now.
413
 
//  if (equivalence_ratio < 0.668)
414
 
//    Running = false;
 
439
 
 
440
  //  if (equivalence_ratio < 0.668)
 
441
  //    Running = false;
415
442
 
416
443
  doEnginePower();
417
444
  if (IndicatedHorsePower < 0.1250) Running = false;
426
453
    ((FGPropeller*)Thruster)->SetFeather(FCS->GetPropFeather(EngineNumber));
427
454
  }
428
455
 
429
 
  PowerAvailable = (HP * hptoftlbssec) - Thruster->GetPowerRequired();
 
456
  Thruster->Calculate(HP * hptoftlbssec);
430
457
 
431
 
  return Thruster->Calculate(PowerAvailable);
 
458
  RunPostFunctions();
432
459
}
433
460
 
434
461
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
435
462
 
436
463
double FGPiston::CalcFuelNeed(void)
437
464
{
438
 
  double dT = State->Getdt() * Propulsion->GetRate();
 
465
  double dT = FDMExec->GetDeltaT() * Propulsion->GetRate();
439
466
  FuelExpended = FuelFlowRate * dT;
440
467
  return FuelExpended;
441
468
}
444
471
 
445
472
int FGPiston::InitRunning(void) {
446
473
  Magnetos=3;
447
 
  //Thruster->SetRPM( 1.1*IdleRPM/Thruster->GetGearRatio() );
448
 
  Thruster->SetRPM( 1000 );
 
474
  p_amb = Atmosphere->GetPressure() * psftopa;
 
475
  double mix= p_amb / (101325.0*1.3);
 
476
  FCS->SetMixturePos(EngineNumber, mix);
 
477
  Thruster->SetRPM( 2.*IdleRPM/Thruster->GetGearRatio() );
 
478
  //Thruster->SetRPM( 1000 );
449
479
  Running=true;
 
480
// cout <<"Set Running in FGPiston. RPM:" << Thruster->GetRPM()*Thruster->GetGearRatio() <<" Pressure:"<<p_amb<<" Mixture:"<< mix <<endl;
450
481
  return 1;
451
482
}
452
483
 
461
492
  // (spark, fuel, starter motor etc)
462
493
  bool spark;
463
494
  bool fuel;
464
 
 
465
495
  // Check for spark
466
496
  Magneto_Left = false;
467
497
  Magneto_Right = false;
541
571
      if(p_amb < BoostSwitchPressure[BoostSpeed] - BoostSwitchHysteresis) {
542
572
        BoostSpeed++;
543
573
      }
544
 
    } else if(BoostSpeed > 0) {
 
574
    } if(BoostSpeed > 0) {
545
575
      // Check if we need to change to a lower boost speed
546
576
      if(p_amb > BoostSwitchPressure[BoostSpeed - 1] + BoostSwitchHysteresis) {
547
577
        BoostSpeed--;
559
589
 * from the throttle position, turbo/supercharger boost control
560
590
 * system, engine speed and local ambient air density.
561
591
 *
562
 
 * Inputs: p_amb, Throttle, ThrottleAngle,
 
592
 * Inputs: p_amb, Throttle,
563
593
 *         MeanPistonSpeed_fps, dt
564
594
 *
565
595
 * Outputs: MAP, ManifoldPressure_inHg, TMAP
567
597
 
568
598
void FGPiston::doMAP(void)
569
599
{
570
 
  double Zt =(1-Throttle)*(1-Throttle)*Z_throttle; // throttle impedence
 
600
  double Zt = (1-Throttle)*(1-Throttle)*Z_throttle; // throttle impedence
571
601
  double Ze= MeanPistonSpeed_fps > 0 ? PeakMeanPistonSpeed_fps/MeanPistonSpeed_fps : 999999; // engine impedence
572
602
 
573
603
  double map_coefficient = Ze/(Ze+Z_airbox+Zt);
579
609
  // Find the mean effective pressure required to achieve this manifold pressure
580
610
  // Fixme: determine the HP consumed by the supercharger
581
611
 
582
 
  PMEP = TMAP - p_amb; // Fixme: p_amb should be exhaust manifold pressure
 
612
  PMEP = (TMAP - p_amb) * volumetric_efficiency; // Fixme: p_amb should be exhaust manifold pressure
583
613
 
584
614
  if (Boosted) {
585
615
    // If takeoff boost is fitted, we currently assume the following throttle map:
618
648
 * (used in CHT calculation for air-cooled engines).
619
649
 *
620
650
 * Inputs: p_amb, R_air, T_amb, MAP, Displacement,
621
 
 *   RPM, volumetric_efficiency, ThrottleAngle
 
651
 *   RPM, volumetric_efficiency,
622
652
 *
623
653
 * TODO: Model inlet manifold air temperature.
624
654
 *
627
657
 
628
658
void FGPiston::doAirFlow(void)
629
659
{
630
 
  double gamma = 1.1; // specific heat constants
 
660
  double gamma = 1.3; // specific heat constants
631
661
// loss of volumentric efficiency due to difference between MAP and exhaust pressure
632
 
  double ve =((gamma-1)/gamma)+( CompressionRatio -(p_amb/MAP))/(gamma*( CompressionRatio - 1));
633
 
 
 
662
// Eq 6-10 from The Internal Combustion Engine - Charles Taylor Vol 1
 
663
  double ve =((gamma-1)/gamma) +( CompressionRatio -(p_amb/MAP))/(gamma*( CompressionRatio - 1));
 
664
// FGAtmosphere::GetDensity() * FGJSBBase::m3toft3 / FGJSBBase::kgtoslug;
634
665
  rho_air = p_amb / (R_air * T_amb);
635
666
  double swept_volume = (displacement_SI * (RPM/60)) / 2;
636
667
  double v_dot_air = swept_volume * volumetric_efficiency *ve;
665
696
/**
666
697
 * Calculate the power produced by the engine.
667
698
 *
668
 
 * Currently, the JSBSim propellor model does not allow the
669
 
 * engine to produce enough RPMs to get up to a high horsepower.
670
 
 * When tested with sufficient RPM, it has no trouble reaching
671
 
 * 200HP.
672
 
 *
673
 
 * Inputs: ManifoldPressure_inHg, p_amb, RPM, T_amb,
 
699
 * Inputs: ManifoldPressure_inHg, p_amb, RPM, T_amb, ISFC,
674
700
 *   Mixture_Efficiency_Correlation, Cycles, MaxHP, PMEP,
 
701
 *   MeanPistonSpeed_fps
675
702
 *
676
 
 * Outputs: PctPower, HP
 
703
 * Outputs: PctPower, HP, FMEP, IndicatedHorsePower
677
704
 */
678
705
 
679
706
void FGPiston::doEnginePower(void)
686
713
    ME = Mixture_Efficiency_Correlation->GetValue(m_dot_fuel/m_dot_air);
687
714
 
688
715
    percent_RPM = RPM/MaxRPM;
689
 
// Guestimate engine friction as a percentage of rated HP + a percentage of rpm + a percentage of Indicted HP
690
 
//    friction = 1 - (percent_RPM * percent_RPM * percent_RPM/10);
691
 
    FMEP = (-18400 * MeanPistonSpeed_fps * fttom - 46500);
 
716
// Guestimate engine friction losses from Figure 4.4 of "Engines: An Introduction", John Lumley
 
717
    FMEP = (-FMEPDynamic * MeanPistonSpeed_fps * fttom - FMEPStatic);
692
718
 
693
719
    power = 1;
694
720
 
715
741
  // (1/2) convert cycles, 60 minutes to seconds, 745.7 watts to hp.
716
742
  double pumping_hp = ((PMEP + FMEP) * displacement_SI * RPM)/(Cycles*22371);
717
743
 
718
 
  HP = IndicatedHorsePower + pumping_hp - 1.5; //FIXME 1.5 static friction should depend on oil temp and configuration
 
744
  HP = IndicatedHorsePower + pumping_hp - StaticFriction_HP; //FIXME static friction should depend on oil temp and configuration
719
745
//  cout << "pumping_hp " <<pumping_hp << FMEP << PMEP <<endl;
720
746
  PctPower = HP / MaxHP ;
721
747
//  cout << "Power = " << HP << "  RPM = " << RPM << "  Running = " << Running << "  Cranking = " << Cranking << endl;
741
767
  if ((Running) && (m_dot_air > 0.0)) {  // do the energy balance
742
768
    combustion_efficiency = Lookup_Combustion_Efficiency->GetValue(equivalence_ratio);
743
769
    enthalpy_exhaust = m_dot_fuel * calorific_value_fuel *
744
 
                              combustion_efficiency * 0.33;
 
770
                              combustion_efficiency * 0.30;
745
771
    heat_capacity_exhaust = (Cp_air * m_dot_air) + (Cp_fuel * m_dot_fuel);
746
772
    delta_T_exhaust = enthalpy_exhaust / heat_capacity_exhaust;
747
773
    ExhaustGasTemp_degK = T_amb + delta_T_exhaust;
759
785
 * Calculate the cylinder head temperature.
760
786
 *
761
787
 * Inputs: T_amb, IAS, rho_air, m_dot_fuel, calorific_value_fuel,
762
 
 *   combustion_efficiency, RPM, MaxRPM, Displacement
 
788
 *   combustion_efficiency, RPM, MaxRPM, Displacement, Cylinders
763
789
 *
764
790
 * Outputs: CylinderHeadTemp_degK
765
791
 */
770
796
  double h2 = -3.95;
771
797
  double h3 = -140.0; // -0.05 * 2800 (default maxrpm)
772
798
 
773
 
  double arbitary_area = 1.0;
 
799
  double arbitary_area = Displacement/360.0;
774
800
  double CpCylinderHead = 800.0;
775
 
  double MassCylinderHead = 8.0;
 
801
  double MassCylinderHead = CylinderHeadMass * Cylinders;
776
802
 
777
803
  double temperature_difference = CylinderHeadTemp_degK - T_amb;
778
 
  double v_apparent = IAS * 0.5144444;
 
804
  double v_apparent = IAS * Cooling_Factor;
779
805
  double v_dot_cooling_air = arbitary_area * v_apparent;
780
806
  double m_dot_cooling_air = v_dot_cooling_air * rho_air;
781
807
  double dqdt_from_combustion =
782
808
    m_dot_fuel * calorific_value_fuel * combustion_efficiency * 0.33;
783
809
  double dqdt_forced = (h2 * m_dot_cooling_air * temperature_difference) +
784
810
    (h3 * RPM * temperature_difference / MaxRPM);
785
 
  double dqdt_free = h1 * temperature_difference;
 
811
  double dqdt_free = h1 * temperature_difference * arbitary_area;
786
812
  double dqdt_cylinder_head = dqdt_from_combustion + dqdt_forced + dqdt_free;
787
813
 
788
814
  double HeatCapacityCylinderHead = CpCylinderHead * MassCylinderHead;
813
839
  if (OilPressure_psi > 5.0 ) {
814
840
    time_constant = 5000 / OilPressure_psi; // Guess at a time constant for circulated oil.
815
841
                                            // The higher the pressure the faster it reaches
816
 
                                            // target temperature.  Oil pressure should be about
817
 
                                            // 60 PSI yielding a TC of about 80.
 
842
                                            // target temperature.  Oil pressure should be about
 
843
                                            // 60 PSI yielding a TC of about 80.
818
844
  } else {
819
845
    time_constant = 1000;  // Time constant for engine-off; reflects the fact
820
846
                           // that oil is no longer getting circulated
856
882
{
857
883
  std::ostringstream buf;
858
884
 
859
 
  buf << Name << " Power Available (engine " << EngineNumber << " in HP)" << delimiter
 
885
  buf << Name << " Power Available (engine " << EngineNumber << " in ft-lbs/sec)" << delimiter
860
886
      << Name << " HP (engine " << EngineNumber << ")" << delimiter
861
887
      << Name << " equivalent ratio (engine " << EngineNumber << ")" << delimiter
862
888
      << Name << " MAP (engine " << EngineNumber << " in inHg)" << delimiter
871
897
{
872
898
  std::ostringstream buf;
873
899
 
874
 
  buf << PowerAvailable << delimiter << HP << delimiter
 
900
  buf << (HP * hptoftlbssec) << delimiter << HP << delimiter
875
901
      << equivalence_ratio << delimiter << ManifoldPressure_inHg << delimiter
876
902
      << Thruster->GetThrusterValues(EngineNumber, delimiter);
877
903
 
914
940
      cout << "      Bore: "                << Bore                     << endl;
915
941
      cout << "      Stroke: "              << Stroke                   << endl;
916
942
      cout << "      Cylinders: "           << Cylinders                << endl;
 
943
      cout << "      Cylinders Head Mass: " <<CylinderHeadMass          << endl;
917
944
      cout << "      Compression Ratio: "   << CompressionRatio         << endl;
918
945
      cout << "      MaxHP: "               << MaxHP                    << endl;
919
946
      cout << "      Cycles: "              << Cycles                   << endl;
920
947
      cout << "      IdleRPM: "             << IdleRPM                  << endl;
921
948
      cout << "      MaxRPM: "              << MaxRPM                   << endl;
922
 
      cout << "      MaxThrottle: "         << MaxThrottle              << endl;
923
 
      cout << "      MinThrottle: "         << MinThrottle              << endl;
 
949
      cout << "      Throttle Constant: "   << Z_throttle               << endl;
924
950
      cout << "      ISFC: "                << ISFC                     << endl;
925
951
      cout << "      Volumetric Efficiency: " << volumetric_efficiency    << endl;
926
952
      cout << "      PeakMeanPistonSpeed_fps: " << PeakMeanPistonSpeed_fps << endl;
927
953
      cout << "      Intake Impedance Factor: " << Z_airbox << endl;
 
954
      cout << "      Dynamic FMEP Factor: " << FMEPDynamic << endl;
 
955
      cout << "      Static FMEP Factor: " << FMEPStatic << endl;
928
956
 
929
957
      cout << endl;
930
958
      cout << "      Combustion Efficiency table:" << endl;