JSBSim Engines

From FlightGear wiki
Jump to navigation Jump to search

JSBSim provides a framework for aerodynamics. This page will attempt to explain how to create engines for the JSBSim framework.


FGPiston

Piston engine model. You enter values based on commonly available data and this model creates reasonable output values.

Configuration File Format

<piston_engine name="{string}">
 <minmp unit="{INHG | PA | ATM}"> {number} </minmp>
 <maxmp unit="{INHG | PA | ATM}"> {number} </maxmp>
 <displacement unit="{IN3 | LTR | CC}"> {number} </displacement>
 <bore unit="{IN | M}"> {number} </bore> 
 <stroke unit="{IN | M}"> {number} </stroke>
 <cylinders> {number} </cylinders>
 <cylinder-head-mass unit="{KG | LBS}"> {number} </cylinder-head-mass> 
 <compression-ratio> {number} </compression-ratio>
 <sparkfaildrop> {number} </sparkfaildrop>
 <maxhp unit="{HP | WATTS}"> {number} </maxhp>
 <static-friction unit="{HP | WATTS}"> {number} </static-friction> 
 <cycles> {number} </cycles> 
 <idlerpm> {number} </idlerpm>
 <maxrpm> {number} </maxrpm>
 <maxthrottle> {number} </maxthrottle> 
 <minthrottle> {number} </minthrottle> 
 <numboostspeeds> {number} </numboostspeeds>
 <boostoverride> {0 | 1} </boostoverride>
 <boostmanual> {0 | 1} </boostmanual>
 <ratedboost1 unit="{INHG | PA | ATM}"> {number} </ratedboost1>
 <ratedpower1 unit="{HP | WATTS}"> {number} </ratedpower1>
 <ratedrpm1> {number} </ratedrpm1>
 <ratedaltitude1 unit="{FT | M}"> {number} </ratedaltitude1>
(repeat for speeds 2 and 3)
 <takeoffboost unit="{INHG | PA | ATM}"> {number} </takeoffboost>
 <bsfc unit="{LBS/HP*HR | "KG/KW*HR"}"> {number} </bsfc>
 <volumetric-efficiency> {number} </volumetric-efficiency>
 <air-intake-impedance-factor> {number} </air-intake-impedance-factor>
 <ram-air-factor> {number} </ram-air-factor>
 <cooling-factor> {number} </cooling-factor> 
</piston_engine>

Notes

  • Intake & Throttle
    • The intake is modeled by <ram-air-factor>,<minmp>, <maxmp>, and <air-intake-impedance-factor>.
    • <ram-air-factor> is the efficiency of the air scoop intake. 0 turns ram air off. Default is 1. This value is exposed on the property tree so it may be altered at runtime to simulate alternate air, etc.
    • <maxmp> is the maximum manifold pressure achievable. It is used for determining <BSFC> and <air-intake-impedance-factor> if a values are not supplied for those items.
    • <minmp> is used along with <idlerpm> to determine the slope of the throttle response
    • <air-intake-impedance-factor> is the fixed impedance in the air intake system. It is determined by <maxmp> if not supplied. This value is exposed on the property tree so it may be altered at runtime to simulate intake icing, alternate air, etc.
  • Boost
    • <numboostspeeds> zero (or not present) for a naturally-aspirated engine, either 1, 2 or 3 for a boosted engine. This corresponds to the number of 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 apparently had a continuously variable-speed supercharger.
    • <boostoverride> IGNORED
    • <boostmanual> whether a multispeed supercharger will manually or automatically shift boost speeds. On manual shifting the boost speeds is accomplished by controling propulsion/engine/boostspeed
    • <takeoffboost> - takeoff boost in psi above ambient. Many aircraft had an extra boost setting beyond rated boost, but not totally uncontrolled as in the already mentioned boost-control-cutout, typically attained by pushing the throttle past a mechanical 'gate' preventing its inadvertant use. This was typically used for takeoff, and emergency situations, generally for not more than five minutes. This is a change in the boost control setting, not the actual supercharger speed, and so would only give extra power below the rated altitude. When TAKEOFFBOOST is specified in the config file (and is above RATEDBOOST1), then the throttle position is interpreted as:
      • 0 to 0.98 : idle manifold pressure to rated boost (where attainable)
      • 0.99, 1.0 : takeoff boost (where attainable).
      • A typical takeoff boost for an earlyish Merlin was about 12psi, compared with a rated boost of 9psi.
      • It is quite possible that other boost control settings could have been used on some aircraft, or that takeoff/extra boost could have activated by other means than pushing the throttle full forward through a gate, but this will suffice for now.
    • <ratedboost[123]> - the absolute rated boost above sea level ambient (14.7 PSI, 29.92 inHg) for a given boost speed, in psi. Eg the Merlin XII had a rated boost of 9psi, giving approximately 39inHg manifold pressure up to the rated altitude.
      • Note that <maxmp> is still the non-boosted max manifold pressure even for boosted engines - effectively this is simply a measure of the pressure drop through the fully open throttle.
    • <ratedaltitude[123]> - The altitude up to which rated boost can be maintained. Up to this altitude the boost is maintained constant for a given throttle position by the BCV or wastegate. Beyond this altitude the manifold pressure must drop, since the supercharger is now at maximum unregulated output. The actual pressure multiplier of the supercharger system is calculated at initialisation from this value.
    • <ratedpower[123]> - The power developed at rated boost at rated altitude at rated rpm.
    • <ratedrpm[123]> - The rpm at which rated power is developed.
  • Power production
    • <sparkfaildrop> is the amount of power you get for single magneto operation, try a value of 0.8 or so.
    • <volumetric-efficiency> controls how much air goes through the engine at a given RPM. Values below 1 for unboosted engines and values over 1 for boosted engines. This value is exposed on the property tree so it may be altered at runtime.
    • <bsfc> is the amount of power the engine produces per unit of fuel consumed. Use it to tune the power produced. This value is exposed on the property tree so it may be altered at runtime.
  • Cooling
    • <cylinder-head-mass> controls how fast the engine heats up and cools off. So if you have a '5-minute' limit on a power setting you can adjust this value so the engine just starts to overheat at the end of the given time frame.
    • <cooling-factor> controls how much 'air' flows over the engine to cool it. Raising the value makes the engine run cooler. This value is exposed on the property tree so it may be altered at runtime to simulate cowl flaps, for example.
  • Tuning
    • Using a constant speed load, set the engine model to full throttle and rated RPM.
    • Set <ram-air-factor> to zero.
    • Adjust <air-intake-impedance-factor> to achieve the proper static full throttle manifold pressure.
    • Increase airspeed to cruise and adjust <ram-air-factor> to achieve the proper dynamic full throttle manifold pressure.
    • Adjust <volumetric-efficiency> first to achieve desired fuel flow rate, leaning engine as required.
    • Adjust <bsfc> to achieve desired power.

FGTurbine

The jet turbine engine

Configuration File Format

<turbine_engine name="{string}">
 <milthrust unit="{LBS | N}"> {number} </milthrust>
 <maxthrust unit="{LBS | N}"> {number} </maxthrust>
 <bypassratio> {number} </bypassratio>
 <bleed> {number} </bleed>
 <tsfc> {number} </tsfc>
 <atsfc> {number} </atsfc>
 <idlen1> {number} </idlen1>
 <idlen2> {number} </idlen2>
 <maxn1> {number} </maxn1>
 <maxn2> {number} </maxn2>
 <augmented> {0 | 1} </augmented>
 <augmethod> {0 | 1 | 2} </augmethod>
 <injected> {0 | 1} </injected>
 <injection-time> {number} </injection-time>
</turbine_engine>

Parameter definitions

milthrust Maximum thrust, static, at sea level.
maxthrust Afterburning thrust, static, at sea level.
bypassratio Ratio of bypass air flow to core air flow.
bleed Thrust reduction factor due to losses (0.0 to 1.0).
tsfc Thrust-specific fuel consumption at cruise, lbm/hr/lbf
atsfc Afterburning TSFC, lbm/hr/lbf
idlen1 Fan rotor rpm (% of max) at idle
idlen2 Core rotor rpm (% of max) at idle
maxn1 Fan rotor rpm (% of max) at full throttle
maxn2 Core rotor rpm (% of max) at full throttle
augmented 0 = afterburner not installed
1 = afterburner installed
augmethod 0 = afterburner activated by property /engines/engine[n]/augmentation
1 = afterburner activated by pushing throttle above 99% position
2 = throttle range is expanded in the FCS, and values above 1.0 are afterburner range
injected 0 = Water injection not installed
1 = Water injection installed
injection-time Time, in seconds, of water injection duration

Notes

  • Bypass ratio is used only to estimate engine acceleration time. The effect of bypass ratio on engine efficiency is already included in the TSFC value. Feel free to set this parameter (even for turbojets) to whatever value gives a desired spool-up rate. Default value is 0.
  • The bleed factor is multiplied by thrust to give a resulting thrust after losses. This can represent losses due to bleed, or any other cause. Default value is 0. A common value would be 0.04.
  • Nozzle position, for variable area exhaust nozzles, is provided for users needing to drive a nozzle gauge or animate a virtual nozzle.
  • This model can only be used with the "direct" thruster. See the file: /engine/direct.xml

FGTurboprop

The turboprop engine

Parameter definitions

milthrust [LBS]
idlen1 [%]
maxn1 [%]
betarangeend[%] if ThrottleCmd < betarangeend/100.0 then engine power=idle, propeller pitch is controled by ThrottleCmd (between MINPITCH and REVERSEPITCH).
if ThrottleCmd > betarangeend/100.0 then engine power increases up to max reverse power reversemaxpower [%] max engine power in reverse mode
maxpower [HP]
psfc power specific fuel consumption [pph/HP] for N1=100%
n1idle_max_delay [-] time constant for N1 change
maxstartenginetime [sec] after this time the automatic starting cycle is interrupted when the engine doesn't start (0=automatic starting not present)
startern1 [%] when starting starter spin up engine to this spin
ielumaxtorque [lb.ft] if torque>ielumaxtorque limiters decrease the throttle (ielu = Integrated Electronic Limiter Unit)
itt_delay [-] time constant for ITT change (ITT = Inter Turbine Temperature)

FGRocket

The rocket engine

FGElectric

Simple thrust producer. You enter the max power as <power unit="WATTS"> and the engine model produces throttle_setting*power watts of output.

  • Enter the max power as <power unit="WATTS"> and the engine model produces throttle_setting*power watts of output.

Sources