• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

FS2004 [SOLVED] EPR Calculation

Messages
252
Country
us-kentucky
Hello,

After finishing the N1 Gauge, I wanted to have a real XML challenge: Calculating my own EPR value.

I have access to the net thrust vs mach vs EPR for the 747 I am modelling, and I have even figured out the equation of this line for Mach 0, with net thrust being the x value and EPR being the y value:

EPR (y) = 0.000127787 (thrust) ^2 + 0.00486389 (thrust) + 1.00178

I then put this equation into XML, though I am not sure if I got the notations and orders correct. I know it does not produce the expected value between 1 and 2. My code currently produces values around 5 - 120. I have included below the graph of thrust vs EPR and the snippet of code responsible for calculating this variable.

For right now, I just want to be able to calculate Mach 0 EPR, though some guidance on the simplest method to include the effects of mach would be brilliant.

XML:
<Element>
    <Select>
        <Value Minimum="0" Maximum="2">
        0.000127787 (A:TURB ENG1 JET THRUST,lbs) * 2 pow 0.00486389 (A:TURB ENG1 JET THRUST,lbs) * 1.00178 + + (>L:ENG1 EPR, number)
        </Value>
    </Select>
</Element>

Here is the chart. Net thrust is the x axis in thousands of lbf, y axis is EPR.

2020-07-02 13_10_19-.png
 
try this!!! the problems is the position of the 2 pow on the equation ...

XML:
<Element>
    <Select>
        <Value Minimum="0" Maximum="2">
        0.000127787 (A:TURB ENG1 JET THRUST,lbs) 2 pow * 0.00486389 (A:TURB ENG1 JET THRUST,lbs) * 1.00178 + + (>L:ENG1 EPR, number)
        </Value>
    </Select>
</Element>
 
try this!!! the problems is the position of the 2 pow on the equation ...

Hm. Still not indicating correctly. The value is very very large now. I added some code to divide the result by 1000 and the gauge is indicating 1.79 at idle, when it should be quite close to 1.02. At full firewall thrust, it gives around 353 when it should be around 1.62.

Appreciate the assistance though!
 
ok divide by 1000 the thrust

XML:
<Element>
    <Select>
        <Value Minimum="0" Maximum="2">
        0.000127787 (A:TURB ENG1 JET THRUST,lbs) 1000 / * 2 pow 0.00486389 (A:TURB ENG1 JET THRUST,lbs) 1000 / * 1.00178 + + (>L:ENG1 EPR, number)
        </Value>
    </Select>
</Element>
 
ok divide by 1000 the thrust

Thank you! I just realized after I made my post in response to you that this would be the answer. :p

The gauge now works!!! I am very excited about this! Now to just make it change with mach number!

Thank you once again!
 
After doing much math and converting my equations to cubics, I am still falling short of how to make this EPR value a function of mach number. My sea level values at mach 0 are perfect.

I even have a couple of equations worked out for the EPR curve at mach 0.2 and mach 0.4, with data for 0.6, 0.8, and 1.0 as well, based on corrected net thrust.

Mach 0:
0.000000000000001619 (A:TURB ENG1 JET THRUST,lbs) 3 pow * 0.00000735459 (A:TURB ENG1 JET THRUST,lbs) * + 0.996689 +

Mach 0.2:
0.000000000000002077 (A:TURB ENG1 JET THRUST,lbs) 3 pow * 0.0000106068 (A:TURB ENG1 JET THRUST,lbs) * + 0.968679 +

Mach 0.4:
0.0000000000000029135 (A:TURB ENG1 JET THRUST,lbs) 3 pow * 0.0000126248 (A:TURB ENG1 JET THRUST,lbs) * + 0.91641 +

What is the easiest method to get to these? Make each mach number curve an if statement? Would the sim know to linearly interpolate between these?
 
Last edited:
This is my graph for mach number multiples of 0.2, up to Mach 1.0. As you can see, these lines do not change linearly at all...

2020-07-03 11_14_47-Line graph - Brave.png


I also have this code that is calculating corrected net thrust:

XML:
    <!--Calculation of EPR-->
    <Element>
        <Select>
            <Value Minimum="0" Maximum="2">
                0.000000000000001619 (L:Corrected Net Thrust ENG2, number) 3 pow * 0.00000735459 (L:Corrected Net Thrust ENG2, number) * + 0.996689 +  (>L:ENG2 EPR, number)
            </Value>
        </Select>
    </Element>
    <!--Calculation of Delta-->
    <Element>
        <Select>
            <Value>
                (A:AMBIENT PRESSURE,inHg) 29.92 / (>L:Delta, number)
            </Value>
        </Select>
    </Element>
        <!--Calculation of Delta2-->
    <Element>
        <Select>
            <Value>
                (L:Delta, number) (A:AIRSPEED MACH,mach) (A:AIRSPEED MACH,mach) * 0.2 * 1 + 3.5 pow * (>L:Delta2, number)
            </Value>
        </Select>
    </Element>
    <!--Calculation of Corrected Net Thrust-->
    <Element>
        <Select>
            <Value>
                (A:TURB ENG2 JET THRUST,lbs) (L:Delta2, number) / (>L:Corrected Net Thrust ENG2, number)
            </Value>
        </Select>
    </Element>
 
Last edited:
Another quick update: The gauge now accurately represents EPR at each 0.2 mach step, but does not interpolate in between them. How can the interpolation be achieved?

Here is how I have it varying with mach:

XML:
    <Element>
        <Select>
            <Value>
            (A:AIRSPEED MACH,mach) 0.2 &gt;
            if{ 0.000000000000002077 (L:Corrected Net Thrust ENG2, number) 3 pow * 0.0000106068 (L:Corrected Net Thrust ENG2, number) * + 0.968679 +  (>L:ENG2 EPR, number) }
            (A:AIRSPEED MACH,mach) 0.4 &gt;
            if{ 0.0000000000000029135 (L:Corrected Net Thrust ENG2, number) 3 pow * 0.0000126248 (L:Corrected Net Thrust ENG2, number) * + 0.91641 +  (>L:ENG2 EPR, number) }
            (A:AIRSPEED MACH,mach) 0.6 &gt;
            if{ 0.0000000000000035608 (L:Corrected Net Thrust ENG2, number) 3 pow * 0.000013942 (L:Corrected Net Thrust ENG2, number) * + 0.831526 +  (>L:ENG2 EPR, number) }
            (A:AIRSPEED MACH,mach) 0.8 &gt;
            if{ 0.0000000000000023823 (L:Corrected Net Thrust ENG2, number) 3 pow * 0.0000165413 (L:Corrected Net Thrust ENG2, number) * + 0.708204 +  (>L:ENG2 EPR, number) }
            (A:AIRSPEED MACH,mach) 1.0 &gt;
            if{ 0.00000000000000056786 (L:Corrected Net Thrust ENG2, number) 3 pow * 0.0000200972 (L:Corrected Net Thrust ENG2, number) * + 0.564751 +  (>L:ENG2 EPR, number) }
            </Value>
        </Select>
    </Element>
 
only mach above 1.0 use "greater than" and mach use "less than" when lower than 0.2.
use m > 0.2 & m < 0.4 as in between
so only 1 formula at a time.
this will have issue when formula changed, "needle could jump up / down"
 
only mach above 1.0 use "greater than" and mach use "less than" when lower than 0.2.
use m > 0.2 & m < 0.4 as in between
so only 1 formula at a time.
this will have issue when formula changed, "needle could jump up / down"

Right, that is my problem is that the needle is jumping between mach number shifts rather than interpolating between the different values.

I thought about possibly writing each value of the cubic to an Lvar, then multiplying those by a G:var for each one via a Nonlinearity table. But that's a little over the scope of things that I've read. Here is a possible example of what I mean.

XML:
    <!--Set LVars for Mach Calculation and EPR Calculation-->
    <Element>
        <Select>
            <Value>
                0.000000000000001619 (>L:Cubic1,number) 
                0.00000735459 (>L:Cubic2, number) 
                0.996689 (>L:Cubic3, number)
            </Value>
        </Select>
    </Element>
    <!--Calculation of EPR-->
    <Element>
        <Select>
            <Value Minimum="0" Maximum="2">
                (L:Cubic1,number) (G:Var1) * (L:Corrected Net Thrust ENG2, number) 3 pow *(L:Cubic2, number) (G:Var2) * (L:Corrected Net Thrust ENG2, number) * + (L:Cubic3, number) (G:Var3) * +  (>L:ENG2 EPR, number)
            </Value>
        </Select>
    </Element>
    <!--Set G:Var1 for Mach-->
    <Element>
        <Select>
            <Value>(A:AIRSPEED MACH,mach) (>G:Var1)
            </Value>
        </Select>
    </Element>
    <!--Variation of Cubic1 with Mach Number-->
    <Element>
        <Select>
            <Value>(G:Var1)</Value>
            <Nonlinearity>
            <Item Value="0.2" X="1.282890673" />
            </Nonlinearity>
        </Select>
    </Element>
 
(A:TURB ENG1 JET THRUST,lbs ) is the sum of Gross thrust and Ram drag. When Mach=0 there is no ram drag but as soon as speed increases the ram drag increases and net thrust may fall or rise depending on the engine design.
Corrected net thrust is an intermediate value calculated by the sim as part of its way of calculating actual net thrust. You will not find corrected values displayed (or should not).
It is one thing to do calculations based on engine theory but another thing to get the sim to reproduce them. Most of the basis for that statement is explained in a paper I wrote some years ago which you can find in the Resources section of this site under the title of FS Thrust vs Altitude calculations. It does not deal with EPR as such because the sim only fudged that for display purposes.
Roy
 
(A:TURB ENG1 JET THRUST,lbs ) is the sum of Gross thrust and Ram drag. When Mach=0 there is no ram drag but as soon as speed increases the ram drag increases and net thrust may fall or rise depending on the engine design.
Corrected net thrust is an intermediate value calculated by the sim as part of its way of calculating actual net thrust. You will not find corrected values displayed (or should not).
It is one thing to do calculations based on engine theory but another thing to get the sim to reproduce them. Most of the basis for that statement is explained in a paper I wrote some years ago which you can find in the Resources section of this site under the title of FS Thrust vs Altitude calculations. It does not deal with EPR as such because the sim only fudged that for display purposes.
Roy

Roy,

The basis of my calculations hardly uses (A:TURB ENG1 JET THRUST,lbs ) anymore, but the variable is still useful. Using this value for net thrust, I applied it to a couple of other equations earlier to get corrected net thrust, which the gauge now accurately calculates for pressure and temperature.

My gauge also calculates EPR based on this corrected net thrust, at mach number steps (i.e. the corrected net thrust and EPR exactly match the chart I have for Mach 0, 0.2, 0.4, 0.6, 0.8, and 1.0). I also have data points for odd mach numbers too, i.e. 0.1, 0.3, 0.5, 0.7, and 0.9.

The problem now is that I am trying to figure out how to get the simulator to interpolate between these different data points with mach number. As it is right now, the gauge is "snapping" between mach numbers (i.e. when decelerating through mach 0.6, the gauge snaps from the mach 0.6 formula to the mach 0.4 formula).

I am sure there is a method to make this work and I am determined to figure it out. I have already made it much further than I anticipated I would with this gauge... Lol :D
 
If you want to have an equation that will give you EPR based on Mach then I do not think having different equations for different Mach values is the way to go. You need one which will input Mach and output EPR, not optimised for each Mach interval.
If you use corrected net thrust surely that will give a form of corrected EPR.
If you are not using the jet thrust, what do you use to vary EPR with throttle setting?
Roy
 
If you want to have an equation that will give you EPR based on Mach then I do not think having different equations for different Mach values is the way to go. You need one which will input Mach and output EPR, not optimised for each Mach interval.
If you use corrected net thrust surely that will give a form of corrected EPR.
If you are not using the jet thrust, what do you use to vary EPR with throttle setting?
Roy

That is why I thought about multiplying each coefficient of the cubic equation by a G:Var, set by a Nonlinearity table, but I am not sure how to properly set up the G:Var against mach number such that it will multiply into my equation properly.

EPR varies with corrected net thrust, which varies with the throttle. My EPR is just under 1.02 at idle and at max firewall (107% N1) I get about 1.63 at Mach 0 and sea level.
 
At sea level and Mach 0 corrected anything is the same as the actual values. So your correction is 1.0 ie does nothing. Your values of EPR are accurate (nearly said correct !)
Story changes when you start to move and climb. The corrected values are not accurate unless you uncorrect them to the actual Mach and altitude.
The FS jet engine simulation uses corrected values so that it is easy to calculate performance. The corrected values are used in the calculation to generate actual predicted real values. I would have thought that EPR would undergo something similar.
Roy
 
The chart I have is from a NASA study on the accurate simulation of a Boeing 747 aircraft. The chart is simply corrected net thrust vs. EPR for the JT9D with several lines representing different mach numbers. Since FS gives me the uncorrected Net Thrust already, all I have to do is correct it for temperature and pressure and from that I worked out the equation for EPR. At any temperature and pressure, my EPR is now accurate save for Mach number, which is what I am trying to achieve here. As far as EPR is concerned it does not matter what FS is seeing for CN1 or CN2, or what I set in the Airfile 1506, or any of the other tables for that matter. It will always give the same EPR for the same corrected net thrust. I just need to figure out this mach implementation...
 
I see what you are doing, thanks for explaining it clearly. I would not be surprised if there was quite a strong influence on the results from the specific intake design/bypass ratio. That could introduce a non-linearity which would be difficult to calculate empirically. It might also mean that the results from engine X cannot be copied over to Engine Y.
Good luck, interesting project.
Roy
 
The results from this will only ever work for the JT9D, but it should be valid or quite close for all variants used on the 747. I've got the equations for each mach step figured already, I just have to find a way to tell FS to interpolate between them.
 
I always using timer to create smooth transition. timer will subtract or add target value when both value not same.
 
I always using timer to create smooth transition. timer will subtract or add target value when both value not same.

That's an interesting answer but not applicable I don't think unless I'm misunderstanding. The timer wouldn't account for flying in between different mach number segments i.e. cruising at Mach 0.84 when I have two equations for Mach 0.8 and mach 0.9.
 
Back
Top