✔️ FIXED BUG: F-22 contrails too faint

Eggheads talking about bytes and stuff.
Post Reply
User avatar
Krishty
Site Admin
Posts: 1271
Joined: 2022-Jan-09, 00:59

✔️ FIXED BUG: F-22 contrails too faint

Post by Krishty »

The F-22’s thrust-specific fuel consumption was corrected. Now the contrails are too faint.
mikew
Data Genius
Posts: 559
Joined: 2022-Jan-09, 20:21

Re: 🔴 OPEN BUG: F-22 contrails too faint

Post by mikew »

Are you sure? It's supposed to be a stealthy plane after all.
User avatar
Krishty
Site Admin
Posts: 1271
Joined: 2022-Jan-09, 00:59

Re: 🔴 OPEN BUG: F-22 contrails too faint

Post by Krishty »

Absolutely:
2018 F-22 contrails 1.jpg
2018 F-22 contrails 1.jpg (304.87 KiB) Viewed 1500 times
2018 F-22 contrails 2.jpg
2018 F-22 contrails 2.jpg (419.96 KiB) Viewed 1500 times
Contrails are nothing you choose to emit; they are the involuntary consequence of burning jet fuel. Northrop tried adding chemicals to the B-2’s fuel to reduce contrails, but they ultimately gave up.

Interestingly, burning one liter of jet fuel produces more than a liter of water (due to the added oxygen). Let’s look at the concrete computation because that’s where TFXplorer uses lots of guesswork and I want to move it to a solid base.

This site has the chemical reaction:

  C₁₂H₂₆ + 18½ O₂ → 12 CO₂ + 13 H₂O

Real jet fuel has other chemicals added (mind control etc.), but we stick to the ideal model here 🙂

We know about the amount of fuel burnt per second from our engine API, which, in turn, computes it based upon the thrust-specific fuel consumption of the engine model.

We further know about the meteorological conditions from TFXplorer’s atmosphere model. These include the amount of water vapor currently in the air (kg/m³) and the water vapor capacity of the air (kg/m³). They are functions of air density, temperature, etc. and the latter tells us how much water can be absorbed by air before the remainder condenses.

Knowing about the fuel consumption of the engine (kg/s) and ultimately its water production (kg/s) via the reaction formula above, we want to compute the volume of air that is mixed with the additional water (m³). This is the speed of the plane (m/s) multiplied by the frame time (s) and the cross section of the contrail (m²).

Now we can say that, during the last frame, the plane left X m³ of contrail, and that it can absorb Y kg of water vapor, and that our engine actually emits Z kg over the same volume. max(Z - Y, 0) / X gets us the excess water density (kg/m³).

And here’s where it starts to break apart. Excess water density is fine, but how much excess makes a clearly visible contrail? Is a single gram per m³ enough? Or does it take a few dozen? Does temperature come into play (ice crystals vs. water droplets)? This is where I need to add a magic coefficient again …
mikew
Data Genius
Posts: 559
Joined: 2022-Jan-09, 20:21

Re: 🔴 OPEN BUG: F-22 contrails too faint

Post by mikew »

My comment didn't deserve such a thorough answer... :)
User avatar
Krishty
Site Admin
Posts: 1271
Joined: 2022-Jan-09, 00:59

Re: 🔴 OPEN BUG: F-22 contrails too faint

Post by Krishty »

Regard this thread as documentation of TFXplorer’s contrail feature!
User avatar
Krishty
Site Admin
Posts: 1271
Joined: 2022-Jan-09, 00:59

Re: 🔴 OPEN BUG: F-22 contrails too faint

Post by Krishty »

Funny problem.

After some debugging and fine-tuning, I had an improved version up and running. Worked on something else.

While I investigated something else, I started on the runway and fired up the afterburner. To my surprise … contrails formed and disappeared when the plane started to roll.

It does make sense: Your plane doesn’t move, so there isn’t too much air being moved. More fuel into less air saturates it with water vapor. Once the plane rolls, there is so much fresh air mixing with the exhaust that it no longer saturates with water vapor and no more contrails form.

But why doesn’t this happen in reality? A combination of exhaust speed (engines moving in more and more fresh air instead of recycling it) and temperature, I guess (at higher temperatures, more water can be absorbed).

So I’ll probably have to model these two quantities as well. That’s the problem with modeling complex systems: you either go all the way or don’t even try … 🤷
User avatar
Krishty
Site Admin
Posts: 1271
Joined: 2022-Jan-09, 00:59

✔️ FIXED BUG: F-22 contrails too faint

Post by Krishty »

New version is pushed.
  • We have contrails at 30.000 ft.
  • We have no contrails below 20.000 ft.
  • When I change the weather to -5° C and 90 % humidity, we still have no contrails below 20.000 ft.
  • When I change the weather to -30° C and 90 % humidity, we have contrails at takeoff just like in this video, and they dissipate relatively quick.
Any further improvements should be delayed to a new contrail renderer (as part of an upcoming D3D 12 / Vulkan renderer). The reason being that a proper renderer will likely require further adjustments and our time fine-tuning the current state will just be wasted. What counts is, TSFC + engine fuel rate + atmospheric humidity +… are now very close to real numbers.

Marking as fixed.
Post Reply