]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/models/propulsion/FGPiston.h
Merge branch 'next' of gitorious.org:fg/flightgear into next
[flightgear.git] / src / FDM / JSBSim / models / propulsion / FGPiston.h
index 4a536b5d067803923cefa6a319a2573ab437ce85..8c56ace3df17594a55bcde863b37856dc4a42101 100644 (file)
@@ -46,7 +46,7 @@ INCLUDES
 DEFINITIONS
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
-#define ID_PISTON "$Id: FGPiston.h,v 1.29 2011/06/16 16:32:10 jentron Exp $";
+#define ID_PISTON "$Id: FGPiston.h,v 1.35 2012/04/07 01:50:54 jentron Exp $";
 #define FG_MAX_BOOST_SPEEDS 3
 
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -81,6 +81,9 @@ CLASS DOCUMENTATION
   <air-intake-impedance-factor> {number} </air-intake-impedance-factor>
   <ram-air-factor> {number} </ram-air-factor>
   <cooling-factor> {number} </cooling-factor>
+  <man-press-lag> {number} </man-press-lag>
+  <starter-torque> {number} </starter-torque> 
+  <starter-rpm> {number} </starter-rpm> 
   <cylinder-head-mass unit="{KG | LBS}"> {number} </cylinder-head-mass>
   <bsfc unit="{LBS/HP*HR | "KG/KW*HR"}"> {number} </bsfc>
   <volumetric-efficiency> {number} </volumetric-efficiency>
@@ -89,6 +92,7 @@ CLASS DOCUMENTATION
   <numboostspeeds> {number} </numboostspeeds>
   <boostoverride> {0 | 1} </boostoverride>
   <boostmanual> {0 | 1} </boostmanual>
+  <boost-loss-factor> {number} </boost-loss-factor>
   <ratedboost1 unit="{INHG | PA | ATM}"> {number} </ratedboost1>
   <ratedpower1 unit="{HP | WATTS}"> {number} </ratedpower1>
   <ratedrpm1> {number} </ratedrpm1>
@@ -112,6 +116,12 @@ Basic parameters:
 - \b maxmp - this value is the nominal maximum manifold pressure at sea-level
       without boost. Along with maxrpm it determines the resistance of the
       aircraft intake system. Overridden by air-intake-impedance-factor
+- \b man-press-lag - Delay in seconds for manifold pressure changes to take effect
+- \b starter-torque - A value specifing the zero RPM torque in lb*ft the starter motor
+      provides. Current default value is 40% of the horse power value.
+- \b starter-rpm - A value specifing the maximum RPM the unloaded starter motor
+      can achieve. Loads placed on the engine by the propeller and throttle will
+      further limit RPM achieved in practice.
 - \b idlerpm - this value affects the throttle fall off and the engine stops
       running if it is slowed below 80% of this value. The engine starts
       running when it reaches 80% of this value.
@@ -163,7 +173,10 @@ Supercharge parameters:
       supercharger speeds.  Merlin XII had 1 speed, Merlin 61 had 2, a late
       Griffon engine apparently had 3.  No known engine more than 3, although
       some German engines had continuously variable-speed superchargers.
-- \b boostoverride - unused
+- \b boostoverride - whether or not to clip output to the wastegate value
+- \b boost-loss-factor - zero (or not present) for 'free' supercharging. A value entered
+      will be used as a multiplier to the power required to compress the input air. Typical 
+      value should be 1.15 to 1.20.
 - \b boostmanual - whether a multispeed supercharger will manually or
       automatically shift boost speeds. On manual shifting the boost speeds is
       accomplished by controlling the property propulsion/engine/boostspeed.
@@ -198,7 +211,7 @@ boostspeed they refer to:
     @author David Megginson (initial porting and additional code)
     @author Ron Jensen (additional engine code)
     @see Taylor, Charles Fayette, "The Internal Combustion Engine in Theory and Practice"
-    @version $Id: FGPiston.h,v 1.29 2011/06/16 16:32:10 jentron Exp $
+    @version $Id: FGPiston.h,v 1.35 2012/04/07 01:50:54 jentron Exp $
   */
 
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -209,7 +222,7 @@ class FGPiston : public FGEngine
 {
 public:
   /// Constructor
-  FGPiston(FGFDMExec* exec, Element* el, int engine_number);
+  FGPiston(FGFDMExec* exec, Element* el, int engine_number, struct Inputs& input);
   /// Destructor
   ~FGPiston();
 
@@ -239,13 +252,12 @@ private:
   int crank_counter;
 
   double IndicatedHorsePower;
+  double IndicatedPower;
   double PMEP;
   double FMEP;
   double FMEPDynamic;
   double FMEPStatic;
-
-  // timestep
-  double dt;
+  double T_Intake;
 
   void doEngineStartup(void);
   void doBoostControl(void);
@@ -257,6 +269,7 @@ private:
   void doCHT(void);
   void doOilPressure(void);
   void doOilTemperature(void);
+  double GetStdPressure100K(double altitude) const;
 
   int InitRunning(void);
 
@@ -281,6 +294,7 @@ private:
   double MinManifoldPressure_inHg; // Inches Hg
   double MaxManifoldPressure_inHg; // Inches Hg
   double MaxManifoldPressure_Percent; // MaxManifoldPressure / 29.92
+  double ManifoldPressureLag;      // Manifold Pressure delay in seconds.
   double Displacement;             // cubic inches
   double displacement_SI;          // cubic meters
   double MaxHP;                    // horsepower
@@ -300,7 +314,9 @@ private:
   double RatedMeanPistonSpeed_fps; // ft/sec derived from MaxRPM and stroke.
   double Ram_Air_Factor;           // number
 
-  double StarterHP;                // initial horsepower of starter motor
+  double StarterTorque;// Peak Torque of the starter motor
+  double StarterRPM;   // Peak RPM of the starter motor
+  double StarterGain;  // control the torque of the starter motor.
   int BoostSpeeds;  // Number of super/turbocharger boost speeds - zero implies no turbo/supercharging.
   int BoostSpeed;   // The current boost-speed (zero-based).
   bool Boosted;     // Set true for boosted engine.
@@ -324,6 +340,7 @@ private:
   double RatedMAP[FG_MAX_BOOST_SPEEDS]; // Rated manifold absolute pressure [Pa] (BCV clamp)
   double TakeoffMAP[FG_MAX_BOOST_SPEEDS];   // Takeoff setting manifold absolute pressure [Pa] (BCV clamp)
   double BoostSwitchHysteresis; // Pa.
+  double BoostLossFactor; // multiplier for HP consumed by the supercharger
 
   double minMAP;  // Pa
   double maxMAP;  // Pa
@@ -334,6 +351,7 @@ private:
   //
   // Inputs (in addition to those in FGEngine).
   //
+  double TotalDeltaT;        // Time in seconds between calls.
   double p_amb;              // Pascals
   double p_ram;              // Pascals
   double T_amb;              // degrees Kelvin
@@ -349,11 +367,14 @@ private:
   //
   double rho_air;
   double volumetric_efficiency;
+  double volumetric_efficiency_reduced;
   double map_coefficient;
   double m_dot_air;
+  double v_dot_air;
   double equivalence_ratio;
   double m_dot_fuel;
   double HP;
+  double BoostLossHP;
   double combustion_efficiency;
   double ExhaustGasTemp_degK;
   double EGT_degC;