User Tools

Site Tools


aircraft:tmd:turbo_engines

This is an old revision of the document!


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.

            <[input_lever][Throttle1Input][]
                <[string8][Input][Controls.Throttle1]>
            >
            <[turbofan][Engine1][]
                <[string8][Body][Fuselage]>
                <[float64][MaximumThrust][120100.0]>
                <[tmvector3d][R0][ 1.3 5.838 -2.72 ]>
                <[string8][ThrottleControl][ThrottleInput.Output]>
                <[string8][ThrustReverseControl][0.0]>
                <[float64][RotationInertia][5.0]>
                <[float64][IdleFraction][0.2]>
            >

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 the 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.

Engine

            <[turbo_engine][Engine1][]
                <[string8][Components][ Engine1Station2
                                        Engine1Fan
                                        Engine1Station21
                                        Engine1LowPressureCompressor
                                        Engine1Station23
                                        Engine1HighPressureCompressor
                                        Engine1Station3
                                        Engine1Burner
                                        Engine1Station4
                                        Engine1HighPressureTurbine
                                        Engine1Station41
                                        Engine1LowPressureTurbine
                                        Engine1Station5
                                        Engine1Exhaust
                                        Engine1Bypass            ]>
            >
            <[drivetrain_shaft][Engine1LowPressureSpool][]
                <[float64][RotationSpeed][115.2]>
                <[float64][Inertia][45.0]>
                <[float64][Friction][0.001]>
            >
            <[drivetrain_shaft][Engine1HighPressureSpool][]
                <[float64][RotationSpeed][942.47]>
                <[float64][Inertia][25.0]>
                <[float64][Friction][0.01]>
            >
            <[turbo_station_inlet][Engine1Station2][]
                <[string8][Body][Engine1Body]>
            >
            <[turbo_fan][Engine1Fan][]
                <[string8][InputEntryTotalTemperature][Engine1Station2.OutputTotalTemperature]>
                <[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]>
                <[float64][Area][2.64]>
                <[float64][DesignPressureRatio][1.5]>
                <[float64][DesignRotationSpeed][523.60]>
                <[float64][Linearity][0.8]>
            >
            <[turbo_station][Engine1Station21][]
                <[float64][Rho][20000.0]>
                //<[string8][InputCaseTemperature][Engine1Case.Output]>
                //<[string8][AddHeat]             [Engine1Case.AddHeat]>
            >
            <[turbo_compressor][Engine1LowPressureCompressor][]
                <[string8][InputEntryTotalTemperature][Engine1Station21.OutputTotalTemperature]>
                <[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]>
                <[float64][Area][0.453]>
                <[float64][DesignPressureRatio][8.0]>
                <[float64][DesignRotationSpeed][523.60]>
                <[float64][Linearity][0.2]>
            >
            <[turbo_station][Engine1Station23][]
                <[float64][Rho][10000.0]>
                //<[string8][InputCaseTemperature][Engine1Case.Output]>
                //<[string8][AddHeat]             [Engine1Case.AddHeat]>
            >
            <[turbo_compressor][Engine1HighPressureCompressor][]
                <[string8][InputEntryTotalTemperature][Engine1Station23.OutputTotalTemperature]>
                <[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]>
                <[float64][Area][0.183]>
                <[float64][DesignPressureRatio][9.0]>
                <[float64][DesignRotationSpeed][1514.25]>
                <[float64][Linearity][0.05]>
            >
            <[turbo_station][Engine1Station3][]
                <[float64][Rho][500000.0]>
                <[float64][MetalHeatCapacity][1000.0]>
                <[float64][MetalHeatTransfer][500.0]>
                <[string8][InputCaseTemperature][Engine1Case.Output]>
                <[string8][AddHeat]             [Engine1Case.AddHeat]>
            >
            <[turbo_burner][Engine1Burner][]
                <[string8][InputEntryTotalTemperature][Engine1Station3.OutputTotalTemperature]>
                <[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]>
                <[float64][Burning][1.0]>
                //<[float64][DesignMassFlow][100.0]>
            >
            <[turbo_station][Engine1Station4][]
                <[float64][Rho][500000.0]>
                <[float64][MetalHeatCapacity][1000.0]>
                <[float64][MetalHeatTransfer][500.0]>
                <[string8][InputCaseTemperature][Engine1Case.Output]>
                <[string8][AddHeat]             [Engine1Case.AddHeat]>
            >
            <[turbo_turbine][Engine1HighPressureTurbine][]
                <[string8][InputEntryTotalTemperature][Engine1Station4.OutputTotalTemperature]>
                <[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]>
                <[float64][Area][0.047]>
                <[float64][EfficiencyDecay][0.1]>
                <[float64][EfficiencyMaximum][0.96]>
                <[float64][Friction][4.0]>
                <[float64][DesignRotationSpeed][1514.25]>
            >
            <[turbo_station][Engine1Station41][]
                <[float64][Rho][200000.0]>
                <[float64][MetalHeatCapacity][1000.0]>
                <[float64][MetalHeatTransfer][500.0]>
                <[string8][InputCaseTemperature][Engine1Case.Output]>
                <[string8][AddHeat]             [Engine1Case.AddHeat]>
            >
            <[turbo_turbine][Engine1LowPressureTurbine][]
                <[string8][InputEntryTotalTemperature][Engine1Station41.OutputTotalTemperature]>
                <[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]>
                <[float64][Area][0.13]>
                <[float64][EfficiencyDecay][0.07]>
                <[float64][EfficiencyMaximum][0.96]>
                <[float64][Friction][0.5]>
                <[float64][DesignRotationSpeed][523.60]>
            >
            <[turbo_station][Engine1Station5][]
                <[float64][Rho][10000.0]>
                <[float64][MetalHeatCapacity][1000.0]>
                <[float64][MetalHeatTransfer][500.0]>
                <[string8][InputCaseTemperature][Engine1Case.Output]>
                <[string8][AddHeat]             [Engine1Case.AddHeat]>
            >
            <[turbo_nozzle][Engine1Exhaust][]
                <[string8][Body][Engine1Body]>
                <[string8][InputEntryTotalTemperature][Engine1Station5.OutputTotalTemperature]>
                <[string8][InputEntryTotalPressure]   [Engine1Station5.OutputTotalPressure]>
                <[string8][ApplyEntryMassFlow]        [Engine1Station5.AddMassFlow]>
                <[float64][Area][0.53]>
            >
            <[turbo_nozzle][Engine1Bypass][]
                <[string8][Body][Engine1Body]>
                <[string8][InputEntryTotalTemperature][Engine1Station21.OutputTotalTemperature]>
                <[string8][InputEntryTotalPressure]   [Engine1Station21.OutputTotalPressure]>
                <[string8][ApplyEntryMassFlow]        [Engine1Station21.AddMassFlow]>
                <[string8][InputReverser]             [Reverser1Flaps.Output]>
                <[float64][Area][1.07]>
                <[float64][ReverserFraction][0.7]>
            >
            <[heat_reservoir][Engine1Case][]
                <[string8][HeatCapacity][5000.0]>
            >

Peripheral Requirements

Objects with these names are required by the engine code above 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.

            <[input_lever][Throttle1Input][]
                <[string8][Input][Controls.Throttle1]>
            >
            <[linear_interpolation][Engine1FADEC][]
                <[string8][Input][Throttle1Input.Output]>
                <[tmvector2d][Map][ (0.0 0.05) (1.0 1.06) ]>
            >
            <[servoclassic][Engine1FuelMeteringUnit][]
                <[string8][Input][Engine1FADEC.Output]>
                <[float64][Speed][5.0]>
                <[float64][P0][0.0]>
                <[float64][P1][1.0]>
                <[float64][P2][0.0]>
                <[float64][P3][0.0]>
                <[float64][Position][0.02]>
            >
            <[constant][Engine1Ignition][]
                <[string8][Input][1.0]>
            >
            <[constant][Reverser1Flaps][]
                <[string8][Input][0.0]>
            >

Engine Output

            <[linear][Engine1N1][]
                <[string8][Input][Engine1LowPressureSpool.OutputRotationSpeed]>
                <[float64][Scaling][0.001909854851031]>
            >
            <[linear][Engine1N2][]
                <[string8][Input][Engine1HighPressureSpool.OutputRotationSpeed]>
                <[float64][Scaling][0.000660392933796]>
            >
            <[output_free][Engine1N1Output][]
                <[string8][Input][Engine1N1.Output]>
            >
            <[integral][Engine1RotationIntegral][]
                <[string8][Input][Engine1LowPressureSpool.OutputRotationSpeed]>
            >
            <[output][Engine1Rotation][]
                <[string8][Input][Engine1RotationIntegral.Output]>
            >
            <[first_order_low_pass][Engine1EGT][]
                <[string8][Input][Engine1Station5.OutputTotalTemperature]>
                <[float64][TimeConstant][3.0]>
                <[string8][Value][700.0]>
            >
            <[output_free][Engine1EGTOutput][]
                <[string8][Input][Engine1EGT.Output]>
            >
            <[output][Engine1FuelFlow][]
                <[string8][Input][Engine1FuelMeteringUnit.Output]>
            >

Debugging Values

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

            // DEBUG start

            <[sum][Engine1TotalThrust][]
                <[string8][Inputs][ Engine1Bypass.OutputThrust Engine1Exhaust.OutputThrust ]>
            >
            <[inverse][Engine1Station2TotalPressureInverted][]
                //<[string8][Input][Engine1Station2.OutputTotalPressure]>
                <[string8][Input][PitotTube.TotalPressure]>
            >
            <[product][Engine1FanPressureRatio][]
                <[string8][Inputs][ Engine1Station21.OutputTotalPressure Engine1Station2TotalPressureInverted.Output ]>
            >
            <[product][Engine1EnginePressureRatio][]
                <[string8][Inputs][ Engine1Station5.OutputTotalPressure Engine1Station2TotalPressureInverted.Output ]>
            >
            <[product][Engine1OverallPressureRatio][]
                <[string8][Inputs][ Engine1Station3.OutputTotalPressure Engine1Station2TotalPressureInverted.Output ]>
            >
            <[inverse][Engine1TotalThrustInverse][]
                <[string8][Input][Engine1TotalThrust.Output]>
            >
            <[product][Engine1SpecificFuelConsumption][]
                <[string8][Inputs][ Engine1FuelMeteringUnit.Output Engine1TotalThrustInverse.Output 1000.0 1000.0 ]>
            >

            // DEBUG end

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

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.

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

Abbreviations
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 - Profit

aircraft/tmd/turbo_engines.1613129003.txt.gz · Last modified: 2021/02/12 12:23 by jh