Skip to content

GASP mass fixed.py and fuel.py updates - #1228

Open
xjjiang wants to merge 14 commits into
OpenMDAO:mainfrom
xjjiang:GASP_smooth_not_smooth
Open

GASP mass fixed.py and fuel.py updates#1228
xjjiang wants to merge 14 commits into
OpenMDAO:mainfrom
xjjiang:GASP_smooth_not_smooth

Conversation

@xjjiang

@xjjiang xjjiang commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  1. Added non-smooth computation of c_eng_pos in MassParameters() in mass/gasp_based/fixed.py.
  2. Added non-smooth computation of max_wingfuel_wt in FuelComponents() in mass/gasp_based/fuel.py.
  3. Fixed a bug where there are mixed wing engines and fuselage engines.
  4. Added unit tests for the new implementation.
  5. Use Aircraft.Engine.NUM_WING_ENGINES directly in MassParameters() class.
  6. Do not set Aircraft.Engine.POSITION_FACTOR as multi-valued.

Related Issues

  • Resolves #

Backwards incompatibilities

None

AI Usage

None

@xjjiang xjjiang changed the title [Draft] GASP mass fixed.py and fuel.py updates GASP mass fixed.py and fuel.py updates Jul 10, 2026
@xjjiang
xjjiang marked this pull request as ready for review July 10, 2026 15:36
Comment thread aviary/subsystems/mass/gasp_based/fixed.py Outdated
Comment thread aviary/subsystems/mass/gasp_based/fixed.py Outdated

@jkirk5 jkirk5 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We can't remove the multiengine flag from any Aircraft.Engine variables or it could break aircraft with more than one engine type, I have some suggestions to fix

add_aviary_input(self, Aircraft.Wing.ULTIMATE_LOAD_FACTOR, units='unitless')
add_aviary_input(self, Aircraft.Wing.MASS_COEFFICIENT, units='unitless')
add_aviary_input(self, Aircraft.Wing.MATERIAL_FACTOR, units='unitless')
add_aviary_input(self, Aircraft.Engine.POSITION_FACTOR, shape=num_engine_type)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This breaks this component when multiple engines are used - this variable has to remain engine-specific. Instead we need to look for ways to update the component to support a vector of engine positions. In this case maybe we average the wing engine positions together? It is not clear to me what "position factor" actually represents in GASP, so I am not sure what the correct answer is yet. How did GASP handle 4-engine aircraft like the 747 with multiple engine positions on the wing?

@@ -57,7 +55,6 @@ def setup(self):
add_aviary_output(
self,
Aircraft.Engine.POSITION_FACTOR,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I already commented on wing.py about this variable change, my comment there applies here too! We need to update the component to work with a vector of engine positions instead of assuming engine position can never be a vector

c_eng_pos = 1.0 * sigmoidX(max_mach, 0.75, -1.0 / 320.0) + 1.05 * sigmoidX(
max_mach, 0.75, 1.0 / 320.0
)
# GASP code has an error. We changed to the following. If num_wing_engines = 3, then

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we extend this method to allow for more engines? Some ideas I have are having it handle odd or even engines instead of hardcoding 2 vs 3 vs 4 engines (which is what FLOPS does), or simply have the last c_eng_pos calculation apply for any number of engines >= 4?

units='unitless',
desc='engine position factor',
default_value=0,
multivalue=True,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We can't remove this flag - all engine variables need to use the multivalue flag so Aviary allows them to be vectors. I have some comments on the places in the code where this variable gets used with suggestions on how to update those components

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