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.

<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>
  • 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
  • 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 engine

<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 defenitions

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

FGTurboprop

The turboprop engine

Configuration parameters:

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