Issues with the JAS 39 Gripen flight model

This thread is intended to discuss the flight model of the Jas39 gripen. Please keep the discussion civil as toxicity won’t help the game. Let’s not get this thread closed like: https://forum.warthunder.com/t/nerf-the-ja39-gripen-flight-model/

Since it’s introduction and despite having been nerfed many times since it’s release the Jas39 gripen is without a doubt the best top tier plane in terms of flight performance, with his extremely high manoeuvring energy retention at all subsonic speeds as the aircraft best and most controversial feature.
The problem with the flight model of the aircraft is that there are no E-M diagrams publicly available for the gripen, so it is impossible to accurately model the flight model, with the only somewhat confirmed values found yet being:

Doing a sustained turn test at 700kph and 50% fuel we find that currently the sustained turn rate is ~22.3 degrees per seconds at that speed, at least 1.3 deg/sec higher than what it should be, but this is far from what makes the gripen such a good fighter, especially it does not explain why it loses much less energy than any other aircraft when tightening down a turn.
The reason for this phenomenon is actually the low speed sustained turn rate. Doing a test at 400kph the Jas39 still manages to achieve 20.3 degrees per second with only a 1.5 second increase in a 360 degree turn time compared to the 700kph result, which is really low compared to other aircraft (especially considering that it is 1.5 on an already very good STR, which makes for a remarkably low % difference).
I think the reason why this happens is because the aircraft low speed (under Mach 0.85) polar diagram was approximated using Lifting line theory, which gives a relation for Drag and Lift coefficients when flow is not compressible and steady, with the relation being: Cd_i = \dfrac{Cl^2}{π\ e_0\ AR} , where Cd_i is induced drag, Cl is the lift coefficient, e_0 is Oswald efficiency number and AR is aspect ratio (Wingspan^2/Wing Area).
Including in the formula the baseline Drag and Lift coefficient at 0 AoA and adjusting Oswald number to match known Cl and Cd values (which we have for the gripen at 700kph) we can get ourself a good approximation for low angles of attack:

Cd = Cd_0 + \dfrac{(Cl-Cl_0)^2}{π\ e_0\ AR}

To see if this is really the case with the gripen we can set up a function that, once e_0 is calibrated for correct turn time at 700kph, should accurately match the in game level sustained turn times for a 360 degree turn at subsonic speeds (in this case the lower limit being 400kph as the gripen won’t go below that with a level turn no matter how hard you pull).

Meaning of letters for the following part
  • ρ = air density = 1.225 kg/m^3 at sea level

  • α = angle of attack

  • S = reference surface = 25.5m^2 for the gripen

  • Cl = total lift coefficient

  • Cl_0 = baseline lift coefficient (lift coefficient at 0 AoA generated by wing shape) = ~0.065 for the gripen

  • Cd = drag coefficient

  • Cd_0 = baseline drag coefficient (AoA = 0) = ~0.0148 for the gripen

  • AR = aspect ratio = 2.75 for the gripen

  • m = mass = 8300kg for gripen with 50% fuel

  • V = tangent velocity = velocity at which the aircraft goes around the circle

  • T = thrust

  • e_0 = Oswald efficiency number = for the gripen e_0 = 0.927

  • g = gravity acceleration at sea level = 9.81 m/s^2

Since we are doing a level turn (altitude is not changing), our centripetal force will be:
mg\,\sqrt{n_y^2-1} With n_y being the aircraft normal overload (perpendicular to the speed vector)
image

Since the turn is sustained it will also be a circular motion, meaning that the centripetal force will be m \dfrac{V^2}{R} , and 360 degree turn time will be: \dfrac{2πR}{V} .

Equating the 2 expressions for centripetal force, we get that turn radius will be:
R = \dfrac{V^2}{g\ \sqrt{n_y^2-1}} , and by consequence turn time: t = \dfrac{2π}{V}\dfrac{V^2}{g\ \sqrt{n_y^2-1}}

Since n_y = \dfrac{N}{mg} where N is the normal force, we can rewrite the equation as: t = \dfrac{2π}{V}\dfrac{mV^2}{\sqrt{N^2-(mg)^2}}

N will also simply mostly be the upwards lift made by the Gripen, as the normal ( T sin(α) component of the thrust (apart from being much smaller than lift) is cancelled out by the downward lift made by the elevator (the gripen is currently modelled as a stable aircraft). If that didn’t happen the aircraft would just spin downwards around his center of gravity as both positive lift and normal thrust do momentum in the same direction.
This means N = \dfrac{1}{2} \ ρ\ S \ Cl \ V^2

Now the fun part, calculating Cl as a function of speed:

In a sustained turn thrust equals drag, so if we know the thrust at a certain speed we know the drag coefficient of the drag force that the aircraft is overcoming. We also need to consider that the aircraft has a certain angle of attack, so the full thrust won’t be pushing against drag.
All this means drag will be: Cd = \dfrac{2T(v)\ cos(α(v)) }{ρ\ S\ V^2} where T is thrust in newton as a function of speed and α is AoA as a function of speed (both can be approximated decently well from in game testing through an interpolation).

From the formula we use to approximate the polar diagram we can also get that:
Cl = Cl_0 + \sqrt{(Cd-Cd_0 ) π\ e_0\ AR} , and by combining this with the previous equation we get:

Cl = Cl_0 + \sqrt{({\dfrac{2T(v)\ cos(α(v)) }{ρ\ S\ V^2}}-Cd_0 ) π\ e_0\ AR} .

Plugging all of this in our main equation we finally get:

t = \dfrac{2π}{V}\dfrac{mV^2}{\sqrt{ \left( \dfrac{1}{2}\ ρ\ S\ V^2\ (Cl_0 + \sqrt{({\dfrac{2T(v)\ cos(α(v)) }{ρ\ S\ V^2}}-Cd_0 ) π\ e_0\ AR} ) \right)^2 -(mg)^2}}

which on a chart (when including experimentally derived interpolation for thrust, AoA and values for Cd_0 and Cl_0 ) looks like this after putting sea level values for air density and gripen values for reference wing area and aspect ratio and after e_0 calibration:

I’d say the functions works quite well (hooray lol), considering that the margin of error in testing and with both the AoA and in particular thrust interpolation (which both work only between 400 and ~750kph, before or after that they are useless). The blue dots are the results of some tests I have made (with A and F being the 700kph and400kph ones respectively).
On x axis we have speed in m/s while in y axis we have turn time in seconds

(in our case e_0 is around 0.927, which is a really high value but not to unbelievable for it considering that the Jas39 is certainly a very aerodynamic efficient aircraft (unstable delta canard configuration) that is currently a bit boosted by the fact that the gripen is over performing by 1.3 deg/sec at the reference test of ~700kph).

The reason why I idid all this crap math up there is that lifting line theory does a good job at approximating the polar diagram with steady and non compressible flow, but at higher AoAs the flow is more and more unsteady and at very high AoAs upper flow even starts detaching from the wing (which causes the lift coefficient to start actually decreasing all the way to 0 while the drag coefficient increases (that’s why aircraft will stall at high AoAs and also why Cobras aren’t useful in 99% of the situations).

Those are 2 examples of how the approximation is progressively worse as Cd increases (red line is approximation with the lifting line theory):
F-16 polar:

MiG-29 polar: (I think the MiG-29 polar also includes the downwards lift of the elevator (while lifting line theory should count only positive lift), so difference should be a bit less, but still big.

22 Likes

Maffs

7 Likes

@MiG_23M
Yo we got a thread. As stated earlier I’m pretty done with FM discussions but if it remains civil and productive I’ll provide some input here at some point.

4 Likes

This was pre-nerf Gripen FM sustained discussion (when it did 25°+), did you mean to link something else?

7 Likes

i love this!
well done man!

one thing not taken into account at the end is the movable canards effect on attached flow and over wing vortices. the canards continuously calculated angles is not only for pitch but also for induced vortices at optimal levels for each situation. in one situation it might give more lift, in another more fuel efficiency and in a third better attached flow.
this is virtually impossible to both model within the game (as it stands currently) and calculate correct values for as we know way to little about the inner workings of gripens FBW and to little about aerodynamics at that level (i do at least).

But man, Great job!

6 Likes

That’s all true, the difference from the approximated curve is definitely less for the gripen than the one a normal stable aircraft would have.

If this calculation was done to approximate what the real life gripen would look like I think we would not be able to get further than ~5 degrees AoA analytically (basically untill canards start moving extensively) as to simulate actual canard and wing interaction i think you need to do a CFD or a straight up wind tunnel.
(Idk thought, i am studying mechanical engineering so maybe some way exists that allows to approximate that analytically for steady flow)

Thank you ;-D.

Edit: actually i seem to remember to have seen in a textbook an extended version of the lifting line theory equation that included a ^4 dependency to Cl other than the square one, it would still be overestimating everything but maybe could be used to get a less overperforming curve.
Need to find it again thought to understand how it is derived, as it may only work in a few or even only one case as far as I know

4 Likes

Thank you so much for writing this up. It’c clear, concise, and written in such a way that it is easily (at least for me) understood.

Me thinks off your original comment on the other thread that there is definitely something off with the Canards. Visually, definitely. Physically, I suspect the same but don’t and can’t prove that myself.

I’m very grateful for this being written, and look forward to further discussion.

3 Likes

So i’ve read everything, and i really don’t understand everything being said besides someee stuff. whats the point of all this? like is the gripen over preforming? under preforming? having issues like the canard one when it was in the dev server? i would be glad if i was detailed on this and thanks.

Thanks, making it concise while not missing out on important information wasn’t easy lol… at first I had written also how to do the interpolations and other stuff but since it was just a bunch of calculus decided to leave it out.
Glad it seems it ended up being something good :D

Imho canards are doing basically nothing physically right now.
They are definitely not doing what they do in real life (opposite of animation aka pushing air up) as, with the way the gripen is modelled right now which is a stable configuration (aka in game the centre of lift is behind centre of gravity and the aircraft naturally pitches down), they would just make the aircraft pitch down while trying to pitch up.
(The aircraft rotates around the axis passing in the centre of gravity, which is the point where weight is applied. Each forces applies a rotating momentum equal to the force times distance from centre of gravity times cos(AoA) )

Them doing what they do in the animation (pushing air, down creating lift) would help pitch up and create some extra positive lift but at the same time decrease airflow to the main wings, which would probably be detrimental.

likewise, really hope this remains civil as the other thread was unbearable

2 Likes

Is GJN including the canards as part of the wing area maybe?

1 Like

It is over performing especially at low speed, more particularly in proportion to to how it performs at high speed it performs extremely (really extremely) too good at low speed, which is what somewhat gives it the sense of “infinite energy”.

At the same time the amount of over performance at lower speed is LESS than what would be, for example a MiG-29, canards and unstable configuration do A LOT of improvement and the already good high speed performance of the gripen.

Another reason why the gripen is expected to perform well at low speed compared to other jets is that the thrust curve is fairly flat, while aircraft like the MiG-29 and F-15 while less efficient at higher speeds just brute force their way to higher turn rate with sheer thrust

1 Like

i think it’s accurate rn, you can’t expect EXACT numbers in a simcade game.

2 Likes

That could be, I think only a datamine of the whole flight model could tell.
They may have modelled them in this way

but they ignore the detrimental effect it would cause for airflow on the wing and just add them as an increased lift (and by consequence increased drag) device. Since canards do most of their job at lower speed the extra drag they would cause may be the reason my function gives a bit better turn time than tested one at lower speed, although that difference is well within the 1% interpolation error margin

exact not, but this is far from it being a little difference and war thunder in air RB does simulate the physics, it’s not just ace combat but more realistic

2 Likes

the thing can’t win on stuff like F16A’s all the time you are talking like this thing is always on arcade Mode.

I never said the gripen is on arcade mode, I am simply saying that it is performing too well at low speed.

F-16As does not come close to the low speed energy retention of the gripen.

Lets be honest not even DCS gets fully accurate flight models that don’t overperform.

4 Likes

not perfectly simulated their are issues

1 Like

DCS while far more accurate in terms of cockpits/instrumentations etc. isn’t always ahead of war thunder in terms of actual physics.
The MiG-29 flight model for example in war thunder is really accurate right now, while the DCS one right now seems to underperform in rate.

1 Like

it is still a simulation, when you are flying an aircraft in the game the computer is numerically solving partial differential equations to create that aircraft behaviour. The main issues in the simulation 99% of the time are related to incorrect starting values (such as what the polar diagram is for the gripen right now), not on the simulation itself.