User Tools

Site Tools


Turbo Engines

Advanced Turbo-Engines

In Aerofly FS engine simulation is based on a real-time thermodynamic simulation of each engine component. The engine is composed of multiple elements such as compressors, burner, turbines and nozzles each of which follows the laws of physics to create the right forces or torque. With these components you can create your own turbofan, turbojet or turboshaft engines. They can be used for regular engines or auxiliary power units alike.

Turbo-Engine components are:

  • turbo_engine main engine components list
  • turbo_station_inlet engine intake station
  • turbo_station engine station within the engine
  • turbo_fan fan component (similar to a compressor)
  • turbo_compressor compresses air and requires torque to run.
  • turbo_burner fuel is introduced and burned
  • turbo_turbine hot gases are expanded and thus torque is produced
  • turbo_nozzle remaining hot gases exit the engine at high velocity and thrust is created as a reaction force, can act as reverser

Used in conjuction with turbo engines:

  • drivetrain_shaft general purpose drive shaft with inertia and friction
  • drivetrain_gear gearbox for attachment of engine accessories like starter, electrical generator, hydraulic pumps, etc.
  • heat_reservoir general purpose heat capacity

Basic Turbofan

For basic aircraft the Aerofly FS still supports the turbofan class. This class simulates a turbofan on a much simpler level and it cannot simulate engine start and shut down. For that you'll have to use the advanced and new turbo_engine components.

                <[tmvector3d][R0][ 1.3 5.838 -2.72 ]>

Engine Station Nomenclature

The implementation of these engines in the Aerofly simulator follows the international standard nomenclature for jet stream engines. It assigns numbers to the different locations within an engine.

All air from the outside, far in front of an engine (0) enters through the intake (1) and is split into the core (1) and bypass air flow (12). The bypass air masses are accelerated by the fan or “booster” (13) and exit the engine directly (19).

The core air masses are further compressed (21 to 3). They enter the combustion chamber at a relatively slow airspeed (3), where they hit the hot flames. The exhaust is accelerated from the end of the combustion chamber (4) towards the lower pressure rear end of the engine (5). The turbine blades (4 to 5) that spin in the airflow that is rushing towards the low pressure end hereby extract the heat energy in the air flow and converted it into mechanical power to drive all other components (compressor and fan) via shafts in the center of the engine.

The afterburning turbojet engines take the still hot exhaust gases and mix it with fuel for a second time (at 5, between 5 and 7). The resulting fuel burn is not as efficient but it increases the maximum thrust further for short term applications.

All exhaust gases then finally leave the engine through the nozzle (7 to 9) which is can be mechanically controlled in afterburning fighter jet engines.

Creating a New Turbo-Engine

It is advisable to create new engines based on existing and working engines of our default aircraft. It starts by copying an existing engine, simplifying the required inputs: ignition = on, fuel flow = basic mapping, reverser closed.

Step 1 - Copy Paste

The code below is a working engine-setup for a CFM56-5B4 engine as found in the A320 with 120kN of thrust. Copy paste all this code into your tmd file, engine, peripherals and debug outputs.

These debug outputs compute the engine thrust, engine compression ratio and engine pressure ratio (EPR) to be displayed by the debug monitoring.

The peripherals are required by the engine code to run. The code below offers an example on how these could look like and is the bare minimum. The FADEC in this example is just a simple mapping from thrust lever input to fuel flow in kg/s. This mapping has to be adjusted later and depends on the particular aircraft system.

            // engine controls

            // engine 1 FADEC
                <[tmvector2d][Map][ (0.0 0.05) (1.0 1.06) ]>
            // fuel metering

            // DEBUG start

                <[string8][Inputs][ Engine1Bypass.OutputThrust Engine1Exhaust.OutputThrust ]>
                <[string8][Inputs][ Engine1Station21.OutputTotalPressure Engine1Station2TotalPressureInverted.Output ]>
                <[string8][Inputs][ Engine1Station5.OutputTotalPressure Engine1Station2TotalPressureInverted.Output ]>
                <[string8][Inputs][ Engine1Station3.OutputTotalPressure Engine1Station2TotalPressureInverted.Output ]>
                <[string8][Inputs][ Engine1FuelMeteringUnit.Output Engine1TotalThrustInverse.Output 1000.0 1000.0 ]>

            // DEBUG end

            // turbo engine
                <[string8][Components][ Engine1Station2
                                        Engine1Bypass            ]>
                <[string8][InputEntryTotalPressure]   [Engine1Station2.OutputTotalPressure]>
                <[string8][InputExitTotalPressure]    [Engine1Station21.OutputTotalPressure]>
                <[string8][ApplyEntryMassFlow]        [Engine1Station2.AddMassFlow]>
                <[string8][ApplyExitMassFlow]         [Engine1Station21.AddMassFlow]>
                <[string8][ApplyExitEnergyFlow]       [Engine1Station21.AddEnergyFlow]>
                <[string8][InputRotationSpeed]        [Engine1LowPressureSpool.OutputRotationSpeed]>
                <[string8][ApplyTorque]               [Engine1LowPressureSpool.AddTorque]>
                //<[string8][AddHeat]             [Engine1Case.AddHeat]>
                <[string8][InputEntryTotalPressure]   [Engine1Station21.OutputTotalPressure]>
                <[string8][InputExitTotalPressure]    [Engine1Station23.OutputTotalPressure]>
                <[string8][ApplyEntryMassFlow]        [Engine1Station21.AddMassFlow]>
                <[string8][ApplyExitMassFlow]         [Engine1Station23.AddMassFlow]>
                <[string8][ApplyExitEnergyFlow]       [Engine1Station23.AddEnergyFlow]>
                <[string8][InputRotationSpeed]        [Engine1LowPressureSpool.OutputRotationSpeed]>
                <[string8][ApplyTorque]               [Engine1LowPressureSpool.AddTorque]>
                //<[string8][AddHeat]             [Engine1Case.AddHeat]>
                <[string8][InputEntryTotalPressure]   [Engine1Station23.OutputTotalPressure]>
                <[string8][InputExitTotalPressure]    [Engine1Station3.OutputTotalPressure]>
                <[string8][ApplyEntryMassFlow]        [Engine1Station23.AddMassFlow]>
                <[string8][ApplyExitMassFlow]         [Engine1Station3.AddMassFlow]>
                <[string8][ApplyExitEnergyFlow]       [Engine1Station3.AddEnergyFlow]>
                <[string8][InputRotationSpeed]        [Engine1HighPressureSpool.OutputRotationSpeed]>
                <[string8][ApplyTorque]               [Engine1HighPressureSpool.AddTorque]>
                <[string8][AddHeat]             [Engine1Case.AddHeat]>
                <[string8][InputEntryTotalPressure]   [Engine1Station3.OutputTotalPressure]>
                <[string8][InputExitTotalPressure]    [Engine1Station4.OutputTotalPressure]>
                <[string8][ApplyEntryMassFlow]        [Engine1Station3.AddMassFlow]>
                <[string8][ApplyExitMassFlow]         [Engine1Station4.AddMassFlow]>
                <[string8][ApplyExitEnergyFlow]       [Engine1Station4.AddEnergyFlow]>
                <[string8][InputFuelFlow]             [Engine1FuelMeteringUnit.Output]>
                <[string8][InputIgnition]             [Engine1Ignition.Output]>
                <[string8][AddHeat]             [Engine1Case.AddHeat]>
                <[string8][InputEntryTotalPressure]   [Engine1Station4.OutputTotalPressure]>
                <[string8][InputExitTotalPressure]    [Engine1Station41.OutputTotalPressure]>
                <[string8][ApplyEntryMassFlow]        [Engine1Station4.AddMassFlow]>
                <[string8][ApplyExitMassFlow]         [Engine1Station41.AddMassFlow]>
                <[string8][ApplyExitEnergyFlow]       [Engine1Station41.AddEnergyFlow]>
                <[string8][InputRotationSpeed]        [Engine1HighPressureSpool.OutputRotationSpeed]>
                <[string8][AddTorque]                 [Engine1HighPressureSpool.AddTorque]>
                <[string8][AddHeat]             [Engine1Case.AddHeat]>
                <[string8][InputEntryTotalPressure]   [Engine1Station41.OutputTotalPressure]>
                <[string8][InputExitTotalPressure]    [Engine1Station5.OutputTotalPressure]>
                <[string8][ApplyEntryMassFlow]        [Engine1Station41.AddMassFlow]>
                <[string8][ApplyExitMassFlow]         [Engine1Station5.AddMassFlow]>
                <[string8][ApplyExitEnergyFlow]       [Engine1Station5.AddEnergyFlow]>
                <[string8][InputRotationSpeed]        [Engine1LowPressureSpool.OutputRotationSpeed]>
                <[string8][AddTorque]                 [Engine1LowPressureSpool.AddTorque]>
                <[string8][AddHeat]             [Engine1Case.AddHeat]>
                <[string8][InputEntryTotalPressure]   [Engine1Station5.OutputTotalPressure]>
                <[string8][ApplyEntryMassFlow]        [Engine1Station5.AddMassFlow]>
                <[string8][InputEntryTotalPressure]   [Engine1Station21.OutputTotalPressure]>
                <[string8][ApplyEntryMassFlow]        [Engine1Station21.AddMassFlow]>
                <[string8][InputReverser]             [Reverser1Flaps.Output]>

            // engine outputs

Step 2 - Testing

Select an airport close to sea level, select your aircraft in the sim and make sure that you have a good way to see the engine N1, N2 and EGT values. The engine should respond to your throttle movements and should create around 10 kN of idle thrust and more than 120 kN with thrust lever at maximum.

Enable your debug monitoring output to be able to see the EPR and pressure ratio change as you move your thrust levers.

Set the parking brake input to ON (1.0). This way your aircraft won't start rolling after each reload when you apply full thrust.

Step 3 - Research

Engine Specifications

For the turbofan engine that you want to simulate you'll need to research the real world specifications of the engine in question.

From engine Type Certificate Data Sheet (TSDS), e.g. from EASA

  • takeoff thrust in Newtons
  • maximum continuous thrust in Newtons
  • maximum takeoff rating N1 and N2 RPM
  • maximum EGT for takeoff and continuous in Celsius (later converted to Kelvin)
  • compression ratio/overall pressure ratio
  • fan diameter in meters
  • specific fuel consumption (fuel flow g/s per kN of thrust) at cruise

From aircraft performance manuals or videos:

  • takeoff, climb, cruise N1 ratings

From real world videos, ideally in near standard conditions: At sea level and at 15 degrees Celsius (ISA Standard)

  • typical idle N1 % (or EPR) with fuel flow in kg/s
  • typical takeoff N1 % (or EPR) with fuel flow in kg/s

If possible find a value for the air mass flow for takeoff, also in kg/s.

For turboshaft engines search for the rated power, gas producer speeds and residual thrust.

Step 4 - Adjust Rotation Speeds

Design Rotation Speed

From the maximum N1 and N2 compute the nominal 100% value. Take the RPM for maximum N1 and divide it by the percentage, multiply by 100. E.g. We know that maximum N1 is 117.5% at 3854 RPM. Then the 100% N1 value is 3854 RPM / 1.175 = 3280 RPM.

N1_RPM_100% = N1_max_RPM / N1_max_in_percent * 100%;

Now convert these revolutions per minute to radiants per second by multiplying with 2 * pi or 6.28 and dividing by 60 s/min. In our example we get 3854 RPM * 2 * pi / 60 = 343.5 rad/s

This gives us the design rotation speed value as used in Aerofly FS.

DesignRotationSpeed = 2 * pi * N1_max_RPM / N1_max_in_percent * 100%;

To scale the actual rotation speed of our driveshaft we need to take the inverse of this value. So 343.5 becomes 0.0029112. This value is the Scaling in our EngineN1 or N2 linear object. This scaling is crucial to seeing realistic N1 and N2 values!

After computing the design rotation speeds for N1 and N2 as described above enter them into the turbo components fields. Make sure to fill in the N1 design value for all components that are attached to the low pressure spool, namely the fan, the booster/low pressure compressor and the low pressure turbine. Add the N2 design value for all components attached to the high pressure spool, the high pressure compressor and high pressure turbine.

Initital Rotation Speed

Take the DesignRotationSpeed and multiply it by the engine idle fraction and insert the result into the respective RotationSpeed parameter of the drivetrain_shaft.

In our example we multiply 343.5 x 0.2 for 20% N1 idle to get 68.7 for our Engine1LowPressureSpool RotationSpeed and 1029.1 x 0.65 for 65% N2 idle = 668.9.

Step 5 - Area Scaling

We're going to scale all of the turbo engine area values with the same factor. This will give us an engine that has the same pressure ratio as the example engine (about 32 to 35:1) at similar rotation speeds.

Main Scaling Factor

Because the engine thrust is proportional to the area of the intake and exhaust we can scale an existing engine up or down just by computing the thrust ratios between them.

Scaling factor = thrust_new / thrust_old
The thrust for our example engine is 120100 Newtons.

Now scale each of the turbo components by multiplying the Area property with this factor.

component_area_new = component_area_example * ratio

Scale the drive shaft Inertia values with the same factor as the areas.

Scale the linear mapping output for the fuel flow with the same factor, too.

And also scale the heat_reservoir HeatCapacity value, and all turbo_station MetalHeatCapacity and MetalHeatTransfer values with this factor.

Compute Fan Area

Compute the fan disk area with the formula: area = pi * square( diameter / 2 );

Measure the fan spinner diameter using your 3D model and compute its disk area with the same formula. Then take the difference of the fan area and the spinner areas to compute the theoretical area of the fan where air passes through. Make sure to use meters for the computations.

Compare your computed area with the value that we got from scaling up the example engine. They should be in the same ballpark and shouldn't differ too much if you are developing a high by-pass turbofan. Obviously it will be a lot different for a turbojet.

Our example engine reaches the maximum takeoff thrust at about 86% N1. If your engine uses more N1 for takeoff then your fan area is probably smaller.

Step 5 - Adjustments

N1 - fan rotation speed
N2 - core rotation speed
HP - high pressure
IP - intermediate pressure
LP - low pressure (fan)
OPR - overall pressure ratio (pressure after compressor divided by intake pressure, usually between 28 to 42)
EPR - engine pressure ratio (pressure before nozzle divided by intake pressure, usually 1 to 1.7)
FPR - fan pressure ratio (pressure of bypass nozzle divided by intake pressure, usually around 1.5 to 1.6)
EGT - exhaust gas temperature (usually measured at station 45 or 5)
ITT - inter turbine temperature (between HP and LP turbine, station 41)

Goal to increase Action to take
Overall Pressure Ratio (OPR) Reduce HP turbine area, increase design compression ratio (at cost of core speed or fan speed)
Turbine Temperature (ITT, EGT) Reduce core size, IP, HP compressor and turbine areas. Or change turbine efficiencies at the cost of reducing power
Fan speed (N1) Check fan area, check fan compression ratio and if below roughly 1.5 decrease the bypass nozzle area. Otherwise check the engine core pressure ratio, if EPR is below 1.5 decrease the core nozzle size to increase N1 speed. Consider increasing efficiency of the LP turbine or fuel flow.
Core speed (N2) When compression ratio is not met yet decrease area of the HP turbine. Otherwise increase area of the HP compressor or increase HP compressor design compression ratio (to increase torque)… or increase HP turbine efficiency
Fuel flow Reduce efficiencies of the turbines, consider increasing friction, decrease thermal efficiency by making the core larger and less hot.
Thrust Check engine, fan and compressor pressure ratio. When EPR or fan PR below 1.5 decrease nozzle area of affected section. When OPR less than design value (and N2 at target) decrease LP turbine area and IP/LP turbine and increase compressor design compression areas (to keep N2 the same). When all is well but ITT/EGT is cold then consider making engine more efficient by making it run hotter.

Step 6 - Engine control (FADEC)

Turbo-engines in real life are often controlled by full authority digital engine controllers (FADECs). These take sensor readings from the engine, air data computers, thrust lever angle and other inputs to compute the required engine fuel flow.

For a very basic fuel controller you can implement a fuel flow proportional to the compressor output pressure and add a governor proportional to the speed deviation. Do something similar like this in the tmd:

Governor = C_Gov * ( TargetN1 - N1 )

Enrichment = Engine1Station3.OutputTotalPressure / ( PitotTube.StaticPressure * DesignCompressionRatio ).

Gain = PitotTube.StaticPressure / 101325.0

FuelFlowRaw = Gain * C_FF * ( Governor + Enrichment )

FuelFlow = clamp( FuelFlowRaw, MinFuelFlow, MaxFuelFlow )

where C_Gov is your governor gain (about 0.2 is ok), and C_FF is your fuel flow constant, use your maximum takeoff fuel flow at the beginning. MinFuelFlow is your idle fuel flow at high altitude (high enough to prevent flame out) and MaxFuelFlow is your takeoff fuel flow plus a small amount. DesignCompressionRatio is the compression ratio that you see at takeoff power (depending on the engine data, ranges between like 11 to 42).

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
aircraft/tmd/turbo_engines.txt · Last modified: 2021/02/12 13:51 by jh