JSBSim Fuel System
Jump to navigation
Jump to search
JSBSim provides a framework for aerodynamics. This page will attempt to explain how to create fuel and oxidizer tanks for the JSBSim framework.
FGTank
Tanks are a subsection of the Propulsion block.
Capacity and Contents:
Tank capacity and contents are measured by weight, not by volume.
Burn Sequence:
Each fuel tank has a "priority" value which is used to set the sequence of fuel burn. The priority can be set in the tank block, and it can also be changed at runtime using the property "propulsion/tank[n]/priority". A priority of 0 means the tank is closed, and no fuel will be used from it. By default each tank has a priority of 1, the highest priority.
Fuel Temperature:
Fuel temperature is calculated using the following assumptions:
Fuel temperature will only be calculated for tanks which have an initial fuel temperature specified in the configuration file.
The surface area of the tank is estimated from the capacity in pounds. It is assumed that the tank is a wing tank with dimensions h by 4h by 10h. The volume of the tank is then 40(h)(h)(h). The area of the upper or lower surface is then 40(h)(h). The volume is also equal to the capacity divided by 49.368 lbs/cu-ft, for jet fuel. The surface area of one side can then be derived from the tank's capacity.
The heat capacity of jet fuel is assumed to be 900 Joules/lbm/K, and the heat transfer factor of the tank is 1.115 Watts/sq-ft/K.
Fuel temperature is currently not written to the property tree.
Fuel Dump:
Fuel dumping is handled by the FGPropulsion class. A standpipe can be defined here for each tank which sets the level of contents (in pounds or kg) which is not dumpable. Default standpipe level is zero, making all contents dumpable.
Dump rate is set in the propulsion block.
Fuel dumping is triggered with the boolean property "propulsion/fuel_dump".
Refueling:
Refueling rate (intended for air refueling) is set in the propulsion block. Default is 6000 lb/min. Onloading fuel is divided amongst all tanks equally.
Refueling is triggered with the boolean property "propulsion/refuel".
Fuel Transfer:
Fuel transfer is handled by the FGPropulsion class, however the contents of tanks may be manipulated directly using the SetContents() function here, or via the property tree at propulsion/tank[i]/contents-lbs, where i is the tank number (Tanks are automatically numbered, starting at zero, in the order in which they are read in the aircraft configuration file). The latter method allows one to use a system of FCS components to control tank contents.
There is also a property propulsion/tank[i]/external-flow-rate-pps. Setting this property to a positive value causes the tank to fill at the rate specified. Setting a negative number causes the tank to drain. The value is the rate in pounds of fuel per second. The tank will not fill past 100% full and will not drain below 0%. Fuel may be transfered between two tanks by setting the source tank's external flow rate to a negative value and the destination's external flow rate to the same positive value. Care must be taken to stop fuel flow before the source tank becomes empty to prevent phantom fuel being created.
Configuration File Format
<tank type="{FUEL | OXIDIZER}">
<grain_config type="{CYLINDRICAL | ENDBURNING}">
<length unit="{FT | M | IN}"> {number} </radius>
</grain_config>
<location unit="{FT | M | IN}">
<x> {number} </x>
<y> {number} </y>
<z> {number} </z>
</location>
<drain_location unit="{FT | M | IN}">
<x> {number} </x>
<y> {number} </y>
<z> {number} </z>
</drain_location>
<radius unit="{FT | M | IN}"> {number} </radius>
<capacity unit="{LBS | KG}"> {number} </capacity>
<contents unit="{LBS | KG}"> {number} </contents>
<temperature> {number} </temperature> <!-- must be degrees fahrenheit -->
<standpipe unit="{LBS | KG"}> {number} </standpipe>
<priority> {integer} </priority>
<density unit="{KG/L | LBS/GAL}"> {number} </density>
<type> {string} </type> <!-- will override previous density setting -->
</tank>
Definition of the tank configuration file parameters:
type | One of FUEL or OXIDIZER. This is required. |
radius | Equivalent radius of tank for modeling slosh, defaults to inches. |
grain_config type | One of CYLINDRICAL or ENDBURNING. |
length | length of tank for modeling solid fuel propellant grain, defaults to inches. |
capacity | Capacity, defaults to pounds. |
contents | Initial contents, defaults to pounds. |
temperature | Initial temperature, in degrees Fahrenheit. |
standpipe | Minimum contents to which tank can dump, defaults to pounds. |
priority | Establishes feed sequence of tank. The value start from "1" (highest priority) to number up to a number that can not be bigger than the number of tanks. The highest priority is the tank (or a set of tanks) that feed the propulsion system first. If all the tanks with a certain priority are empty, JSBSim goes to the next lowest priority tank, if a tank with higher priority is filled during engine operation, this tank (or tank group with the same priority) will be immediately used. Tanks with priority "0" are off. |
density | Density of liquid tank contents. |
type | Named fuel type. One of AVGAS, JET-A, JET-A1, JET-B, JP-1, JP-2, JP-3, JP-4, JP-5, JP-6, JP-7, JP-8, JP-8+100, RP-1, T-1, ETHANOL, HYDRAZINE, F-34, F-35, F-40, F-44, AVTAG, AVCAT |
location: | |
x - Location of tank on aircraft's x-axis, defaults to inches. | |
y - Location of tank on aircraft's y-axis, defaults to inches. | |
z - Location of tank on aircraft's z-axis, defaults to inches. | |
drain_location: | |
x - Location of tank drain on aircraft's x-axis, defaults to inches. | |
y - Location of tank drain on aircraft's y-axis, defaults to inches. | |
z - Location of tank drain on aircraft's z-axis, defaults to inches. |
Default values of the tank configuration file parameters:
type | ttUNKNOWN (causes a load error in the propulsion configuration) |
location drain_location | both optional, but a warning message will be printed to the console if the location is not given |
x - 0.0 (both full and drained CG locations) | |
y - 0.0 (both full and drained CG locations) | |
z - 0.0 (both full and drained CG locations) | |
radius | 0.0 |
capacity | 0.00001 (tank capacity must not be zero) |
contents | 0.0 |
temperature | -9999.0 (flag which indicates no temperature is set) |
standpipe | 0.0 (all contents may be dumped) |
priority | 1 (highest feed sequence priority) |
density | 6.6 |
Fuel Densities (lb/gallon):
Type | Density |
AVGAS | 6.02 |
JET-A | 6.74 |
JET-A1 | 6.74 |
JET-B | 6.48 |
JP-1 | 6.76 |
JP-2 | 6.38 |
JP-3 | 6.34 |
JP-4 | 6.48 |
JP-5 | 6.81 |
JP-6 | 6.55 |
JP-7 | 6.61 |
JP-8 | 6.66 |
JP-8+100 | 6.66 |
RP-1 | 6.73 |
T-1 | 6.88 |
ETHANOL | 6.58 |
HYDRAZINE | 8.61 |
F-34 | 6.66 |
F-35 | 6.74 |
F-40 | 6.48 |
F-44 | 6.81 |
AVTAG | 6.48 |
AVCAT | 6.81 |
Display fuel tank names in the Fuel and Equipment dialog
To display their names you need to add some properties to your aircraft's -set file.
<consumables>
<fuel>
<tank n="0">
<name>Internal tank</name>
</tank>
<tank n="1">
<name>External left tank</name>
</tank>
<tank n="3">
<name>External central tank</name>
</tank>
<tank n="2">
<name>External right tank</name>
</tank>
</fuel>
</consumables>
The n=$ is based in the tanks order set in the FDM.