Skip to content

BWB FLOPS Fortran_to_Aviary#947

Merged
jkirk5 merged 118 commits intoOpenMDAO:mainfrom
xjjiang:BWB_FLOPS_F2A
Feb 19, 2026
Merged

BWB FLOPS Fortran_to_Aviary#947
jkirk5 merged 118 commits intoOpenMDAO:mainfrom
xjjiang:BWB_FLOPS_F2A

Conversation

@xjjiang
Copy link
Copy Markdown
Contributor

@xjjiang xjjiang commented Dec 25, 2025

Summary

This PR updates utility application fortran_to_aviary to include the features needed for FLOPS based BWB aircraft dataset.

Related Issues

  • Resolves #

Backwards incompatibilities

None

New Dependencies

None

xjjiang and others added 30 commits December 24, 2025 18:51
Merge branch 'BWB_FLOPS_premission' into BWB_FLOPS_F2A
Comment thread aviary/utils/fortran_to_aviary.py
Comment thread aviary/utils/fortran_to_aviary.py Outdated
Comment thread aviary/utils/fortran_to_aviary.py Outdated
Comment thread aviary/utils/fortran_to_aviary.py Outdated
Comment on lines -1041 to -1057
if Aircraft.CrewPayload.BAGGAGE_MASS_PER_PASSENGER not in input_values:
if Mission.Design.RANGE in input_values:
design_range = input_values.get_val(Mission.Design.RANGE, 'nmi')[0]
baggage_per_pax = 35.0
if design_range > 2900:
baggage_per_pax = 44.0
elif design_range > 900:
baggage_per_pax = 40.0
input_values.set_val(
Aircraft.CrewPayload.BAGGAGE_MASS_PER_PASSENGER, [baggage_per_pax], 'lbm'
)
if verbosity >= Verbosity.BRIEF:
print(
'Set Aircraft.CrewPayload.BAGGAGE_MASS_PER_PASSENGER to : '
f'FLOPS specific assumption {baggage_per_pax}'
)

Copy link
Copy Markdown
Contributor

@jkirk5 jkirk5 Feb 17, 2026

Choose a reason for hiding this comment

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

Why was this removed? It seemed fine to me, it matches the FLOPS behavior.

Although I think the initial setting of baggage_per_pax=35 needs to be moved between lines 1041 and 1042 (between the two "if" statements) so that variable is sure to always have a value for when you set it later

I see this got moved to the preprocessor. See my comments there instead!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

In preprocessor, I added a line baggage_mass_per_pax = 35.0 which means that Aircraft.CrewPayload.BAGGAGE_MASS_PER_PASSENGER has a default value of 35 lbm. I think the logic is complete and is consistent with FLOPS now.


if (
Aircraft.HorizontalTail.TAPER_RATIO not in input_values
or input_values.get_val(Aircraft.HorizontalTail.TAPER_RATIO)[0] < 0.0
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.

Another place I don't think this is FLOPS behavior (this goes for all of the "< 0.0" checks in this section)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

If TRHT does not exist in FLOPS input, we will get a runtime error when someone runs fortran_to_aviary. Are you sure you want to change it to if input_values.get_val(Aircraft.HorizontalTail.TAPER_RATIO)[0] < 0.0?

Comment thread aviary/utils/preprocessors.py Outdated
Comment on lines 458 to 477
if (
Aircraft.CrewPayload.BAGGAGE_MASS_PER_PASSENGER not in aviary_options
and Mission.Design.RANGE in aviary_options
or aviary_options.get_val(Mission.Design.RANGE, 'nmi') < 0.0
):
design_range = aviary_options.get_val(Mission.Design.RANGE, 'nmi')

if design_range <= 900.0:
baggage_mass_per_pax = 35.0
elif design_range <= 2900.0:
baggage_mass_per_pax = 40.0
else:
baggage_mass_per_pax = 44.0
baggage_mass_per_pax = 35.0
if Mission.Design.RANGE in aviary_options:
design_range = aviary_options.get_val(Mission.Design.RANGE, 'nmi')

if design_range <= 900.0:
baggage_mass_per_pax = 35.0
elif design_range <= 2900.0:
baggage_mass_per_pax = 40.0
else:
baggage_mass_per_pax = 44.0

aviary_options.set_val(
Aircraft.CrewPayload.BAGGAGE_MASS_PER_PASSENGER,
val=baggage_mass_per_pax,
units='lbm',
)
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.

Suggested change
if (
Aircraft.CrewPayload.BAGGAGE_MASS_PER_PASSENGER not in aviary_options
and Mission.Design.RANGE in aviary_options
or aviary_options.get_val(Mission.Design.RANGE, 'nmi') < 0.0
):
design_range = aviary_options.get_val(Mission.Design.RANGE, 'nmi')
if design_range <= 900.0:
baggage_mass_per_pax = 35.0
elif design_range <= 2900.0:
baggage_mass_per_pax = 40.0
else:
baggage_mass_per_pax = 44.0
baggage_mass_per_pax = 35.0
if Mission.Design.RANGE in aviary_options:
design_range = aviary_options.get_val(Mission.Design.RANGE, 'nmi')
if design_range <= 900.0:
baggage_mass_per_pax = 35.0
elif design_range <= 2900.0:
baggage_mass_per_pax = 40.0
else:
baggage_mass_per_pax = 44.0
aviary_options.set_val(
Aircraft.CrewPayload.BAGGAGE_MASS_PER_PASSENGER,
val=baggage_mass_per_pax,
units='lbm',
)
if (
Aircraft.CrewPayload.BAGGAGE_MASS_PER_PASSENGER not in aviary_options
):
if Mission.Design.RANGE in aviary_options:
design_range = aviary_options.get_val(Mission.Design.RANGE, 'nmi')
if design_range <= 900.0:
baggage_mass_per_pax = 35.0
elif design_range <= 2900.0:
baggage_mass_per_pax = 40.0
else:
baggage_mass_per_pax = 44.0
else:
baggage_mass_per_pax = 35.0
aviary_options.set_val(
Aircraft.CrewPayload.BAGGAGE_MASS_PER_PASSENGER,
val=baggage_mass_per_pax,
units='lbm',
)

I don't fully understand the proposed changes. Checking for design range < 0 doesn't change the logic branches at all, any value <= 900 will set the mass per pax to 35. I propose some code that cleans up the if statements and covers some edge cases the proposed code misses.

Comment thread aviary/utils/preprocessors.py Outdated
Comment thread aviary/variable_info/variable_meta_data.py Outdated
Comment thread aviary/variable_info/variable_meta_data.py Outdated
Comment thread aviary/variable_info/variable_meta_data.py
Comment thread aviary/subsystems/geometry/flops_based/fuselage.py Outdated
Comment thread aviary/subsystems/geometry/flops_based/fuselage.py Outdated
Comment thread aviary/subsystems/mass/flops_based/test/test_paint.py Outdated
Comment thread aviary/utils/fortran_to_aviary.py Outdated
Comment thread aviary/utils/fortran_to_aviary.py
Comment thread aviary/utils/preprocessors.py
Comment thread aviary/utils/preprocessors.py Outdated
Comment thread aviary/utils/preprocessors.py Outdated
Comment thread aviary/utils/preprocessors.py
@jkirk5 jkirk5 added this pull request to the merge queue Feb 19, 2026
Merged via the queue into OpenMDAO:main with commit c0e3025 Feb 19, 2026
6 checks passed
@xjjiang xjjiang deleted the BWB_FLOPS_F2A branch February 23, 2026 16:03
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.

3 participants