Skip to content

Multi fuel preparation part 2 - #1293

Open
jkirk5 wants to merge 26 commits into
OpenMDAO:mainfrom
jkirk5:multi_fuel
Open

jkirk5 wants to merge 26 commits into
OpenMDAO:mainfrom
jkirk5:multi_fuel

Conversation

@jkirk5

@jkirk5 jkirk5 commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This completely overhauls how fuel is calculated by Aviary and rips out many undesirable assumptions.

  • Moves GASP fuel capacity calcs from mass to energy subsystem
  • Update all fuel calculations to no longer assume mass delta = fuel burned (now fuel burn is integrated over the mission and summed in post-mission)
  • Fixes to fuel summation test - it was using the wrong inputs and therefore never testing the full fuel summation component.
  • Dynamic.Vehicle.Propulsion.FUEL_FLOW_MASS_RATE is now the main output from engines from which all other values are derived (Dynamic.Aircraft.Propulsion.FUEL_FLOW_MASS_RATE_TOTAL, and Dynamic.Aircraft.Propulsion.FUEL_FLOW_MASS_RATE_NEGATIVE_TOTAL). Dynamic.Vehicle.Propulsion.FUEL_FLOW_MASS_RATE_NEGATIVE has been removed as it is not necessary to track the inverse of per-engine fuel flow, and having essentially duplicate variables is unnecessary and confusing.

While updating tests and checking this conversion worked, I found several issues in the tests and updated them:

  • Reserve missions were not being fully tested - new benchmark added
    • Updated reserve missions to allow for discontinuous trajectories (mach & alt are not linked to the first reserve phase if user sets an initial value in phase_info for that variable), working for energy phase only right now
  • Streamlined how subsystems are loaded for tests by combining get_default_premission_subsystems, get_default_mission_subsystems, and get_geom_and_mass_subsystems into a single util function - this makes keeping tests on top of any additions/removals/changes to the core subsystem lineup much easier
  • Found some tests were not actually checking partials (comparing cs or fd with itself), fixed this and updated broken partials uncovered by this change. I suspect there are more tests in this situation we haven't caught yet

Backwards-incompatible changes

Mission.RESERVE_FUEL_MARGIN was changed to be specified as a direct multiplicative value to be applied, rather than as percentage points (e.g. 0.2 rather than 20). This was done for consistency, as every other Aviary variable that deals with fractions/percentages works this way. A deprecation check was added to the preprocessor to alert the user of this.

Removed Dynamic.Vehicle.Propulsion.FUEL_FLOW_MASS_RATE_NEGATIVE

@jkirk5
jkirk5 marked this pull request as ready for review October 13, 2026 17:25
Comment thread aviary/mission/base_ode.py Outdated
Comment thread aviary/validation_cases/benchmark_tests/test_bwb_FwFm.py Outdated
Comment thread aviary/subsystems/energy/test/test_fuel_summation.py
@jkirk5
jkirk5 requested a review from cmbenne3 October 14, 2026 19:18
Comment thread aviary/subsystems/geometry/flops_based/test/test_wing_detailed_bwb.py Outdated
val=np.zeros((nn, num_engine_type)),
units='lbf',
)
# self.add_input(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can remove this

from aviary.variable_info.variables import Mission


# @use_tempdirs

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you can do a quick search for all the commented out use_tempdirs and restore them, that would probably be best.

@Kenneth-T-Moore Kenneth-T-Moore left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A little cleanup to do, but ready.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants