Skip to content

Conversation

@xjjiang
Copy link
Contributor

@xjjiang xjjiang commented Nov 25, 2025

Summary

This PR adds a unit test for FLOPS based subsystems with BWB configuration (see BWBPreMissionGroupTest class in test_flops_based_premission.py). This PR assumes that geometry and mass subsystems are already implemented using BWB using FLOPS code. Since there is no specific code in FLOPS for BWB, this unit test covers all four basic subsystems: propulsion, geometry, aerodynamics and mass.

As in PR #889 for mass subsystem, we prepare two cases for the testing: Case 1 with simple fuselage layout and simple wing layout (see bwb_simple_FLOPS_data.py) and case 2 with detailed fuselage layout and detailed wing layout (see bwb_detailed_FLOPS_data.py) in aircraft model directory.

Almost all results match with FLOPS outputs. But the computation algorithm of bending material factor is a little bit different in the second case. As a result, wing mass and structure mass are a little different too. The comparison is as follows:

Aviary Variable Name Value FLOPS Variable Name Value
Aircraft.Wing.BENDING_MATERIAL_FACTOR 3.93743732 BT 3.972479625
Aircraft.Wing.MASS 68922.20579045 WWING 68995.460470895763
Aircraft.Design.STRUCTURE_MASS 240915.88664709 WSTRCT 240989.14132753

CSV data input based unit tests are added. This is the first time that we use CSV input deck for premission unit test in test_flops_based_premission.py.

Related Issues

  • Resolves #

Backwards incompatibilities

None

New Dependencies

None

xjjiang and others added 30 commits September 23, 2025 12:04
…ASS, set 'WTIN.NPT' for FLOPS for Aircraft.CrewPayload.Design.NUM_TOURIST_CLASS. In this way, fortran_to_aviary can read in NPF and NPT.
xjjiang and others added 29 commits December 26, 2025 21:17
# Temporarily add extra stuff here, probably patched soon
if mission_method is HEIGHT_ENERGY:
# add a check for traj using hasattr for pre-mission tests.
if mission_method is HEIGHT_ENERGY and hasattr(self, 'traj'):
Copy link
Contributor

Choose a reason for hiding this comment

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

What scenario did the AviaryGroup not have 'traj'? That seems like a serious bug that needs to get fixed!!

inputs.set_val(Aircraft.Engine.DATA_FILE, filename)
inputs.set_val(Aircraft.Engine.MASS, 6293.8, 'lbm')
inputs.set_val(Aircraft.Engine.REFERENCE_MASS, 6293.8, 'lbm')
inputs.set_val(Aircraft.Engine.REFERENCE_MASS, np.array([6293.8]), 'lbm')
Copy link
Contributor

Choose a reason for hiding this comment

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

Do your tests & benchmarks work without these changes? If they do not, then we need to fix those - I can help

@@ -0,0 +1,654 @@
# created 10/08/25 at 13:25 by xjiang
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# created 10/08/25 at 13:25 by xjiang
# created 10/08/25

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