Skip to content
Snippets Groups Projects

Fix unused tanks

Merged Timeea requested to merge fix/wb_fuel_unused_tanks into main

Description

Fixed bug and updated logic so that tanks are only filled if their used_tank flag is True, otherwise they are filled with 0 kg. (e.g. if a tank is available but not used during mission).

Related Issue(s)

#198 rce-workflow#22

Other Changes

  • Refactored the refueling and defueling functions to delete double entries and simplify the code.

Screenshots/Logs

Testing Instructions

  1. Download this branch. Execute weight_and_balance module to the project provided in #198.
  2. An error is expected now in the calculate_fuel_mass_properties and not during defueling anymore, as the used_tank flag for the wing center tank is False and the fuel mass to be filled up exceeds the total capacity of the available tanks.
  3. Change in component_design/specific/tank ID = "4" (the wing center tank) the maximum_energy_capacity to a meaningful value and the energy_capacity_required_for_mission to true and execute w&b again.

Developer Checklist

  • Code has been tested locally.

Additional Notes

At the moment the used_tank flag is set by tank_design. W&b throws an error after the third iteration loop for kerosene if there is still remaining fuel to be refilled, but not enough capacity in the tanks. W&B is not responsabile for resizing the tanks, it only checks if the mission fuel fits in the available tanks.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading