FGTank Class Reference

#include <FGTank.h>

Inherits FGJSBBase.

List of all members.


Detailed Description

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 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) which is not dumpable. Default standpipe level is zero, making all contents dumpable.

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.

Configuration File Format:

<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>

Definition of the tank configuration file parameters:

location:

drain_location:

Default values of the tank configuration file parameters:

Author:
Jon Berndt, Dave Culp
See also:
Akbar, Raza et al. "A Simple Analysis of Fuel Addition to the CWT of 747", California Institute of Technology, 1998, http://www.galcit.caltech.edu/EDL/projects/JetA/reports/lumped.pdf

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.

Constructor & Destructor Documentation

FGTank ( FGFDMExec exec,
Element el,
int  tank_number 
)

The constructor reads in the defining parameters from a configuration file.

Parameters:
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.


Member Function Documentation

double Calculate ( double  dt  ) 

This function calculates the temperature of the fuel in the tank.

Parameters:
dt the time step for this model.
Returns:
the current temperature in degrees Celsius.

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.

Parameters:
used the amount of fuel used in lbs.
Returns:
the remaining contents of the tank in lbs.

Definition at line 189 of file FGTank.cpp.

double GetCapacity ( void   )  [inline]

Returns:
the capacity of the tank in pounds.

Definition at line 224 of file FGTank.h.

double GetContents ( void   )  const [inline]

Returns:
the contents of the tank in pounds.

Definition at line 228 of file FGTank.h.

double GetPctFull ( void   )  [inline]

Returns:
the fill level in percent, from 0 to 100.

Definition at line 220 of file FGTank.h.

bool GetSelected ( void   )  [inline]

Returns:
true if this tank is feeding an engine.

Definition at line 216 of file FGTank.h.

double GetTemperature ( void   )  [inline]

The temperature of the fuel is calculated if an initial tempearture is given in the configuration file.

Returns:
the temperature of the fuel in degrees F IF an initial temperature is given, otherwise 32 degrees F is returned.

Definition at line 242 of file FGTank.h.

double GetTemperature_degC ( void   )  [inline]

The temperature of the fuel is calculated if an initial tempearture is given in the configuration file.

Returns:
the temperature of the fuel in degrees C IF an initial temperature is given, otherwise 0.0 C is returned.

Definition at line 235 of file FGTank.h.

int GetType ( void   )  [inline]

Returns:
the tank type, 0 for undefined, 1 for fuel, and 2 for oxidizer.

Definition at line 209 of file FGTank.h.


The documentation for this class was generated from the following files:

Generated on Tue May 26 00:55:13 2009 for JSBSim Flight Dynamics Model by  doxygen 1.5.5