Skip to content

Update fortran_to_aviary for BWB model#834

Merged
jkirk5 merged 34 commits intoOpenMDAO:mainfrom
xjjiang:BWB_fortran_to_aviary
Sep 16, 2025
Merged

Update fortran_to_aviary for BWB model#834
jkirk5 merged 34 commits intoOpenMDAO:mainfrom
xjjiang:BWB_fortran_to_aviary

Conversation

@xjjiang
Copy link
Copy Markdown
Contributor

@xjjiang xjjiang commented Aug 2, 2025

Summary

Update the settings of Aviary variables to match with GASP descriptions and default values.

Related Issues

  • Resolves #

Backwards incompatibilities

None

New Dependencies

None

@xjjiang xjjiang changed the title [Draft] Update fortran_to_aviary for BWB model Update fortran_to_aviary for BWB model Aug 4, 2025
@xjjiang xjjiang marked this pull request as ready for review August 4, 2025 20:55
Comment thread aviary/utils/fortran_to_aviary.py Outdated
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
@xjjiang xjjiang requested a review from jkirk5 August 12, 2025 22:29
@xjjiang
Copy link
Copy Markdown
Contributor Author

xjjiang commented Aug 13, 2025

@jkirk5 @Kenneth-T-Moore , One thing that I am concerned but not touched is the size of aviary/utils/legacy_code_data/gasp_defaults.py. There are more than 150 default values. It means that Aviary adds those variables to user's model but they may not even notice them.

@Kenneth-T-Moore
Copy link
Copy Markdown
Member

@jkirk5 @Kenneth-T-Moore , One thing that I am concerned but not touched is the size of aviary/utils/legacy_code_data/gasp_defaults.py. There are more than 150 default values. It means that Aviary adds those variables to user's model but they may not even notice them.

Does the Fortran version of Gasp also have all of these built-in defaults?

I agree that we should migrate whatever we can into the gasp aircraft input files.

@xjjiang
Copy link
Copy Markdown
Contributor Author

xjjiang commented Aug 13, 2025

@jkirk5 @Kenneth-T-Moore , One thing that I am concerned but not touched is the size of aviary/utils/legacy_code_data/gasp_defaults.py. There are more than 150 default values. It means that Aviary adds those variables to user's model but they may not even notice them.

Does the Fortran version of Gasp also have all of these built-in defaults?

I agree that we should migrate whatever we can into the gasp aircraft input files.

Some of them have defaults in GASP. Even if the defaults are the same as in GASP, it may not be true because GASP documented defaults may not be the same as in the code. I will take a look and see if I can do something.

@xjjiang xjjiang marked this pull request as draft August 14, 2025 19:13
@xjjiang xjjiang marked this pull request as ready for review August 15, 2025 16:26
Comment thread aviary/utils/fortran_to_aviary.py
@jkirk5 jkirk5 added this pull request to the merge queue Sep 11, 2025
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Sep 11, 2025
@jkirk5 jkirk5 added this pull request to the merge queue Sep 15, 2025
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 15, 2025
@xjjiang
Copy link
Copy Markdown
Contributor Author

xjjiang commented Sep 15, 2025

@jkirk5 @Kenneth-T-Moore : I removed the line aircraft:engine:scale_factor,0.6824747298710352,unitless in aviary/models/aircraft/blended_wing_body/generic_BWB_GASP.csv in order that the bench test for BWB passes. It was added by fortran_to_aviary.py. I am not sure why it causes problem for test_bwb_GwGm.py to run. Do you know why?

@jkirk5
Copy link
Copy Markdown
Contributor

jkirk5 commented Sep 15, 2025

@jkirk5 @Kenneth-T-Moore : I removed the line aircraft:engine:scale_factor,0.6824747298710352,unitless in aviary/models/aircraft/blended_wing_body/generic_BWB_GASP.csv in order that the bench test for BWB passes. It was added by fortran_to_aviary.py. I am not sure why it causes problem for test_bwb_GwGm.py to run. Do you know why?

I figured out why this is happening - in the gasp_defaults.py file INGASP.FN_REF has a value of 28690 lbf (which seems to be completely made up, since a comment mentions that variable may not even exist in GASP). The converter then sees that values for both scaled thrust and reference thrust exists, so it calculates the scale factor needed. That scale factor is based on the fake default value so it just screws the model up.

Both the fake GASP default, and the entire part of fortran_to_aviary.py that computes the scale factor (update_aviary_options()) should get removed. The preprocessors already do the scale factor calculation.

@jkirk5 jkirk5 enabled auto-merge September 16, 2025 16:01
@jkirk5 jkirk5 added this pull request to the merge queue Sep 16, 2025
Merged via the queue into OpenMDAO:main with commit 6006481 Sep 16, 2025
6 checks passed
@xjjiang xjjiang deleted the BWB_fortran_to_aviary branch September 19, 2025 15:06
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.

4 participants