fuel

see Predefined Fuel Types

Script Class: WsfFuel

fuel … end_fuel

# 1. Define a fuel type (occurs outside a platform or platform_type command)

fuel <new-type> <base-type>
   ... Platform Part Commands ...

   maximum_quantity ...
   initial_quantity ...
   reserve_quantity ...
   mode ...

   on_bingo ... end_on_bingo
   on_empty ... end_on_empty
   on_refuel ... end_on_refuel
   on_reserve ... end_on_reserve

   ... type-specific fuel commands ...
end_fuel

# 2. Instantiate a fuel object on a new platform type:

platform_type ...
   fuel <type>
        ... desired attributes and commands ...
   end_fuel
end_platform

# 3. Instantiate a (not previously existing) fuel object on a platform instance:

platform ...
   add fuel <type>
        ... desired attributes and commands ...
   end_fuel
end_platform

# 4. Modify a (previously existing) fuel object on a platform instance:

platform ...
   edit fuel
        ... additional/changed/overwritten attributes and commands ...
   end_fuel
end_platform

Overview

A fuel object defines the rate at which fuel is expended on the platform. For each platform, total mass is assumed to be the sum of empty mass, fuel mass, and payload mass. Empty mass is generally a fixed quantity, payload varies perhaps only at discrete events, but fuel quantities are consumed continuously. The fuel object is called whenever the platform moves and updates the amount of fuel expended. The resulting fuel amount is supplied back to the platform, so that total mass is readily available for Newtonian dynamics and other such calculations.

Note

If a platform does not have a fuel object, run-time fuel computations will not be performed, but a fixed fuel quantity may still be supplied as platform input.

Commands

maximum_quantity <mass-value>

Defines the maximum quantity of fuel that can be carried.

Default infinity

initial_quantity <mass-value>

Defines the initial quantity of fuel.

Default 0 kg

reserve_quantity <mass-value>

Defines the threshold such that when the quantity of fuel remaining falls below this value, the platform is considered to be operating on reserves. If an on_reserve block is defined, it will be executed when this state is reached.

Default 0 kg

bingo_quantity <mass-value>

Defines the threshold such that when the quantity of fuel remaining falls below this value, the platform is considered to in BINGO. If an on_bingo block is defined, it will be executed when this state is reached.

Default 0 kg

mode <mode-name>

Specifies the name of the mode to be used for fuel types that support modes.

Script Interface

In each of the following scripts, the following variables will be predefined:

  • WsfFuel this; // This fuel object

  • WsfPlatform PLATFORM; // The platform containing this fuel object

  • double TIME_NOW; // The current simulation time

on_bingo … <script-definition> … end_on_bingo

Defines a script to be executed when the quantity of fuel remaining falls below the threshold defined by bingo_quantity.

on_empty … <script-definition> … end_on_empty

Defines a script to be executed when all fuel has been expended.

on_reserve … <script-definition> … end_on_reserve

Defines a script to be executed when the quantity of fuel remaining falls below the threshold defined by reserve_quantity.

on_refuel … <script-definition> … end_on_refuel

Defines a script to be executed when a refueling operation has been completed.