RCAIDE.Library.Methods.Powertrain.Sources.Fuel_Tanks.compute_fuel_mass.compute_fuel_mass#
- compute_fuel_mass(vehicle, update_fuel_mass=True, update_max_fuel_mass=True)[source]#
Computes the total fuel volume and mass for all fuel tanks in a vehicle.
This function iterates through all networks, fuel lines, and fuel tanks in the vehicle to calculate the total fuel volume and mass. It updates each fuel tank’s internal volume and sets the vehicle’s total fuel volume attribute.
- Parameters:
vehicle (Vehicle) –
- The vehicle object containing networks, wings, and fuselages
- networkslist
Collection of propulsion networks containing fuel lines
- wingslist
Collection of wing objects for volume calculations
- fuselageslist
Collection of fuselage objects for volume calculations
- Returns:
Function modifies the vehicle object in-place by setting total_fuel_volume
- Return type:
None
Notes
- This function performs the following operations:
Initializes total fuel volume and mass counters
Iterates through all propulsion networks in the vehicle
For each network, iterates through all fuel lines
For each fuel line, iterates through all fuel tanks
Resets each fuel tank’s internal volume to zero (This is updated by the compute fuel volume function)
Calls the fuel tank’s compute_volume method with wings and fuselages
Accumulates the volume and mass contributions
Sets the vehicle’s total_fuel_volume attribute
- Major Assumptions
All fuel tanks have a compute_volume method that accepts wings and fuselages
Fuel tanks have mass_properties.fuel attribute for fuel mass
Vehicle object has networks, wings, and fuselages attributes
Definitions
- ‘Fuel Line’
A collection of fuel tanks that are connected in series within a propulsion network
- ‘Fuel Tank’
A container that stores fuel and has methods to compute its volume based on vehicle geometry
- ‘Internal Volume’
The calculated volume of a fuel tank based on its geometry and position within the vehicle
See also
VehicleRCAIDE.Vehicle