#include <FGTank.h>
Inherits FGJSBBase.
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 dumping is handled by the FGPropulsion class. A standpipe can be defined here for each tank which sets the level of contents (in pounds) which is not dumpable. Default standpipe level is zero, making all contents dumpable.
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.
<tank type="{FUEL | OXIDIZER}"> <grain_config type="{CYLINDRICAL | ENDBURNING}"> <length unit="{IN | FT | M}"> {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="{IN | FT | M}"> {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> </tank>
location:
drain_location:
Definition at line 178 of file FGTank.h.
Public Types | |
| enum | GrainType { gtUNKNOWN, gtCYLINDRICAL, gtENDBURNING } |
| enum | TankType { ttUNKNOWN, ttFUEL, ttOXIDIZER } |
Public Member Functions | |
| double | Calculate (double dt) |
| Performs local, tanks-specific calculations, such as fuel temperature. | |
| double | Drain (double used) |
| Removes fuel from the tank. | |
| FGTank (FGFDMExec *exec, Element *el, int tank_number) | |
| Constructor. | |
| double | Fill (double amount) |
| double | GetCapacity (void) |
| Gets the capacity of the tank. | |
| double | GetContents (void) const |
| Gets the contents of the tank. | |
| double | GetIxx (void) |
| double | GetIyy (void) |
| double | GetIzz (void) |
| double | GetPctFull (void) |
| Gets the tank fill level. | |
| bool | GetSelected (void) |
| If the tank is supplying fuel, this function returns true. | |
| double | GetStandpipe (void) |
| double | GetTemperature (void) |
| Gets the temperature of the fuel. | |
| double | GetTemperature_degC (void) |
| Gets the temperature of the fuel. | |
| int | GetType (void) |
| Retrieves the type of tank: Fuel or Oxidizer. | |
| const double | GetXYZ (int idx) |
| const FGColumnVector3 | GetXYZ (void) |
| void | ResetToIC (void) |
| Resets the tank parameters to the initial conditions. | |
| void | SetContents (double amount) |
| void | SetStandpipe (double amount) |
| void | SetTemperature (double temp) |
| ~FGTank () | |
| Destructor. | |
The constructor reads in the defining parameters from a configuration file.
| exec | a pointer to the base FGFDMExec instance. | |
| el | a pointer to the Tank element. | |
| tank_number | the tank number (zero based). |
Definition at line 55 of file FGTank.cpp.
| double Calculate | ( | double | dt | ) |
This function calculates the temperature of the fuel in the tank.
| dt | the time step for this model. |
Definition at line 243 of file FGTank.cpp.
| double Drain | ( | double | used | ) |
This function removes fuel from a tank. If the tank empties, it is deselected.
| used | the amount of fuel used in lbs. |
Definition at line 189 of file FGTank.cpp.
| double GetCapacity | ( | void | ) | [inline] |
| double GetContents | ( | void | ) | const [inline] |
| double GetPctFull | ( | void | ) | [inline] |
| bool GetSelected | ( | void | ) | [inline] |
| double GetTemperature | ( | void | ) | [inline] |
| double GetTemperature_degC | ( | void | ) | [inline] |
| int GetType | ( | void | ) | [inline] |
1.5.5