-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Off Design Payload #623
Draft
cmbenne3
wants to merge
20
commits into
OpenMDAO:main
Choose a base branch
from
cmbenne3:off_des_payload3
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Off Design Payload #623
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…red to fix error with the aircraft design changing for off design missions
…num_passengers separately from as flown passengers
… of gasp based aviary missions
…ssumptions to command line
cmbenne3
changed the title
Off Design Payload and Payload-Range Diagram
Off Design Payload
Dec 10, 2024
Closed
…-> need to update other off design function for running alternate and fallout missions
…t error in test execution
…viary into off_des_payload3
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR has 2 parts:
Fixes the bug with GASP-based off design missions where variations in payload affect the design of the aircraft.
Enables GASP based missions to carry cargo whilst keeping backwards compatibility with the current Aviary functionality.
New cargo variables are created:
Aircraft.CrewPayload.Design.CARGO_MASS - this is similar to the design passenger number variables and refers to the cargo carried on the aircraft for the design mission.
Aircraft.CrewPayload.MAX_CARGO_MASS - this is the maximum cargo the aircraft is designed to be capable of carrying. It is used in sizing the fuselage fuel body tank.
Aircraft.CrewPayload.CARGO_MASS - this is the current variable and is now repurposed as the 'as-flown' cargo mass for GASP-Based missions. This variable is used as a summary variable for FLOPS-Based missions as the sum of wing_cargo + misc_cargo.
preprocessors.py has been updated with logic to detect which of the above variables has been input by the user. If only CARGO_MASS is specified by the user then the analysis is assumed to be legacy Aviary and for backwards compatibility it is assumed that the user intends to set MAX_CARGO_MASS with zero cargo flown on as-flown or design missions.
The cargo variables for FLOPS-based missions remain unchanged.
Comments from previous PR moved to here:
Chris:
Currently aviary only treats Aircraft.CrewPayload.CARGO_MASS as part of the design of the aircraft, and does not apply any of this mass to the gross mass of the aircraft when the mission is actually flown. If this is desired functionality then renaming this to 'Aircraft.CrewPayload.Design.CARGO_MASS' would seem sensible, but because this mass is not added to the aircraft for flight it would be different to the design passenger numbers (where that number of passengers is actually flown on the aircraft for that mission).
Eliot:
It looks like Aircraft.CrewPayload.CARGO_MASS has an effect on calculations for:
Aircraft.CrewPayload.CARGO_CONTAINER_MASS and payload_mass_max
Aircraft.CrewPayload.CARGO_CONTAINER_MASS goes into OperatingMass() to calculate Aircraft.Design.OPERATING_MASS. payload_mass_max is input to FuelMass() which outputs fuel_mass_min, which is then input to BodyTankCalculations() along with Aircraft.Design.OPERATING_MASS to calculatewingfuel_mass_min which is then input to FuelSysAndFullFuselageMass() to calculate fus_mass_full() which is input to FuselageAndStructureMass() to calculate Aircraft.Fuselage.MASS.
This large string of connections, and the resulting impact on Aircraft.Fuselage.MASS indicate that CARGO_MASS does have an impact on fuselage mass (at least in cases where fuel.py is used which I believe are GASP cases of mass-sizing). This would indicate that separating a design.CARGO_MASS and an as-flow cargo mass would be the correct approach.
Caution would need to be taken when importing GASP and FLOPS files if this change were implemented as the historical names which can be viewed in variable_meta_data.py for these values (i.e. INGASP.WCARGO) should be considered both the design values, with the as-flown values left blank. We could then assume that if as-flown is left blank, it indicates design is the same as as-flown. This is similar to how back-wards compatibility for design.passengers is handled as neither GASP nor FLOPS had concepts in their output files for the differentiation between as-flown and design passengers.
Chris:
I confirmed with @crecine that the current variable: Aircraft.CrewPayload.CARGO_MASS is implemented as a maximum cargo parameter, and this mass is NOT added to the aircraft gross mass for mission analysis. This copies one type of GASP analysis.
GASP does have the ability to fly missions with cargo, but this is not currently implemented in Aviary.
I plan to:
Carl:
Make sure that you have historical_name={"GASP": 'INGASP.WCARGO'} for the new design variable and historical_name={"GASP": None,} for the new as flown variable
I don't think you need to check that CARGO_MASS is less than Design.CARGO_MASS, I think it would be better to check that CARGO_MASS + PASSENGER_MASS is less than Design.CARGO_MASS + Design.PASSENGER_MASS, since it is possible to offload passengers in order to load more cargo