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/nerftheja39gripenflightmodel/
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 EM 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:
 Around 2021 deg/sec sustained turn at: sea level, speed: 700900kph and 50% fuel
 Engine thrust curve should be somewhat accurate
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:
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^21} With n_y being the aircraft normal overload (perpendicular to the speed vector)
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^21}} , and by consequence turn time: t = \dfrac{2π}{V}\dfrac{V^2}{g\ \sqrt{n_y^21}}
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{(CdCd_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:
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):
F16 polar:
MiG29 polar: (I think the MiG29 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.