Fix cargo_container mass for flops based off design missions - #1254
Fix cargo_container mass for flops based off design missions#1254cmbenne3 wants to merge 5 commits into
Conversation
| inputs.set_val(Aircraft.CrewPayload.CARGO_CONTAINER_MASS, cargo_container_mass, 'lbm') | ||
| if verbosity >= Verbosity.BRIEF: | ||
| warnings.warn( | ||
| f'Setting CARGO_CONTAINER_MASS for off design mission equal to design mission = {cargo_container_mass} lbm' |
There was a problem hiding this comment.
Probably should test this, maybe could piggyback on the existing off design tests, if the cargo container mass recomputes on them.
There was a problem hiding this comment.
I think the cargo container mass is fixed to zero for those tests so this would involve adding a new test I think.
|
@cmbenne3 there is one benchmark test that is failing which is why this was kicked out of merge queue: The following tests failed: File "/home/runner/work/Aviary/Aviary/aviary/validation_cases/benchmark_tests/test_bench_off_design.py", line 206, in test_off_design_min_fuel_mission_changed File "/home/runner/work/Aviary/Aviary/aviary/validation_cases/benchmark_tests/test_bench_off_design.py", line 115, in test_off_design_max_range_mission_changed File "/home/runner/work/Aviary/Aviary/aviary/validation_cases/benchmark_tests/test_bench_off_design.py", line 534, in test_payload_range |
Summary
Quick change to fix cargo_container_mass for off design FLOPS missions.
Aircraft.CrewPayload.CARGO_CONTAINER_MASS is summed into Mission.OPERATING_ITEMS_MASS, which is in turn part of Mission.OPERATING_MASS.
If the cargo load or baggage load (e.g. num passengers) changes between design and off_design then the number of cargo containers will recalculate and change the OPERATING_MASS
It is confusing if this changes between a design and off design mission.
This PR now checks the value from design mission and adds an override for this value in the off_design problem so that it doesn't change.
This is similar to the FLOPS behavior when mywts = 1 is set in a rerun namelist. (it's not identical as FLOPS actually carries the operating empty weight (dowe) across directly (or overwrites with user value) when mywts=1.)
With this change Mission.OPERATING_MASS could now be updated to Aircraft.Design.OPERATING_MASS as I don't think it will ever change between design and off design.
Related Issues
Backwards incompatibilities
None
AI Usage
Disclose any AI usage in this PR, including models used and files affected.