Wikipedia says that the Tu-154B-2 has a range between 2500 km at full load and 3900 km at full fuel load and MTOW (1300 to 2100 nmi) and a MTOW of 98 t (216000 lbs).
I have tested the Tu-154 version 3.1 in FlightGear and found a range in excess of 4900 nmi at full fuel and MTOW (i.e. 2.3 times more than advertized); this is no small difference as it changes the aeroplane from a medium-range to a long-range airliner.
Is this a bug in the model or is the information on Wikipedia incorrect?
I think the fuel consumption of the engines seems correct but some Nasal code seems to create fuel out of thin air while attempting to transfer fuel between tanks.
There are in fact two problems, both triggered by autoconsumption mode (switceh 5018 and 5019 on the engineer's panel). To reproduce them, fill all the tanks, autostart and apply full throttle while still on the ground. Observe the Fuel and Payload dialog and some properties in /tu154/systems/fuel.
The first problem happens whenever you have burned 150kg of fuel from the feeder tank (tank 1 <= 6946 lbs). At that point, the portioner kicks in to refill tank 1 from tanks 2L and 2R. This, it does by means of interpolations that last 5 seconds. During these 5 seconds, the level in tanks 2L and 2R and the level in tank 1 increases correspondingly, without taking into account the fuel burn from the engines, so the total fuel quantity stabilizes and does not decrease. Essentially, for every 150 kg of fuel you burn, you're getting 5 seconds of free fuel. The faster you burn fuel, the more often and the more free fuel you get, since you get the free fuel at your current burn rate.
The second problem is more severe. It kicks in when tanks 2L and 2R are almost empty and thanks 3L and 3R are completely empty. When the portioner kicks in, it refills tank 1 from all of 2L, 2R and 4 (the ballast tank). During this time (5 seconds) the fuel level in tank 1 increases but tanks 2L, 2R and 4 stagnate, so the total fuel quantity actually increases.
Bug #3 is triggered by fuel transfer which, according to the doc, should only be performed on the ground but is still a bug. If the amount of fuel in tank 3L and 3R is less then TRANSFER_CONST (0.74 US gallon), tank 1 still receives TRANSFER_CONST and any excess is transferred to 2L and 2R. If, at this point, 1, 2L and 2R are all full, 2L and 2R become overfull (more than 100%) full. This effectively creates fuel out of thin air. The same thing happens when transferring from 4 to 1 then 2L and 2R.
r537 fixes the bugs I reported but the aircraft still has too much range: 3600 nmi instead of 2100. Perhaps the engines modeled are really the turbofans of the Tu-154M as opposed to the turbojets of the Tu-143B-2?
@lbrenta, there have been some minor updates since then. Can you check if the issue is still present?
@Gijs, have the minor updates touched the fuel system?
@lbrenta, looking at the tu154b log in FGAddon, there is at least one commit that includes something about fuel: https://sourceforge.net/p/flightgear/fgaddon/742/ (the commit message is useless, but the Aircraft/tu154b/tu154b.xml file has a change regarding fuel)
I have measured the full-fuel range to be in excess of 3800 nmi, so the bug is still present. Perhaps the oscilloscope addon might reveal how the total fuel on board does not decrease at a constant rate during cruise. I suspect that some fuel is still created out of thin air during fuel transfers between tanks.
So I have used the oscilloscope add-on to monitor total fuel on board and found that the problem I suspected does not exist. There is only a minor bug which I will not resolve.
When the level in the feed tank (#1) reaches 95.45% of the capacity, 150kg of fuel are created immediately and magically in this tank, and then subtracted from thanks #2 or #3 over 4 seconds. This creates only a temporary spike in total fuel on board. The minor bug hits when the level in tanks #2 is between 0 and 75 kg; in this case tanks #2 are emptied in 4 seconds but the feed tank still receives the full 150 kg. The same bug applies when tanks #3 become empty, and again when tank #4 (ballast tank) becomes empty. So, this bug occurs only 3 times at most; not worth fixing.
The Tu-154 still has too much range, so I researched the Soloviev NK-8U engines and found concordant sources for their TSFC at 0.766 kg/kgf/h during cruise, much higher than the 0.67 in the FDM. With this correction, the full-fuel range becomes a reasonable 2700nmi; the 2300nmi on Wikipedia most probably excludes any reserves. The POH says that a loud siren warns continuously when feed tank contains less than 2.5t; flying with less fuel appears to be forbidden, reducing the "normal operation" range. So I'm going to make this change in TSFC and declare victory on this bug.