Skip to content
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

Add simple mission benchmarks #46

Merged
merged 16 commits into from
Jan 16, 2024

Conversation

johnjasa
Copy link
Member

@johnjasa johnjasa commented Jan 8, 2024

Summary

In preparation for combining the simple and FLOPS mission methods into one height_energy method, I've confirmed that the FLOPS swap benchmarks can be run in simple mission mode with these changes.

This PR adds two benchmarks that run the simple mission and checks against the same numbers as the FLOPS mission benchmarks.

I'll continue down this path and try to part out the changes into small PRs like this one.

Related Issues

  • Resolves #

Backwards incompatibilities

None

New Dependencies

None

README.md Outdated Show resolved Hide resolved
aviary/docs/getting_started/installation.md Show resolved Hide resolved
aviary/validation_cases/benchmark_tests/test_bench_GwFm.py Outdated Show resolved Hide resolved
aviary/validation_cases/benchmark_utils.py Show resolved Hide resolved
Copy link
Contributor

@jdgratz10 jdgratz10 left a comment

Choose a reason for hiding this comment

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

I had a few questions so I didn't approve or request changes yet, whether I have changes to request is TBD based on the answers :)

@@ -36,6 +36,7 @@
"fix_duration": False,
"initial_bounds": ((0.0, 0.0), "min"),
"duration_bounds": ((64.0, 192.0), "min"),
"add_initial_mass_constraint": False,
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are we making this false? If I remember correctly, this is the constraint that ensures the GTOW used in the pre-mission is the same as the initial mass? Seems important...

Copy link
Member Author

Choose a reason for hiding this comment

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

Close, maybe this could be better named. If it's False then the initial mass is directly connected from pre-mission to mission: https://github.com/OpenMDAO/om-Aviary/blob/main/aviary/interface/methods_for_level2.py#L2409

If True, then we use a constraint enforced at the optimizer level: https://github.com/OpenMDAO/om-Aviary/blob/main/aviary/mission/flops_based/phases/simple_energy_phase.py#L179

Either way the mass is matched up from pre-mission to mission

Copy link
Contributor

Choose a reason for hiding this comment

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

Ahh gotcha, that's what I get for remembering :)

Comment on lines +2371 to +2377
# TODO: connect this correctly
# mass is the most important to connect but these others should
# be connected as well
# self.model.connect(Mission.Takeoff.FINAL_VELOCITY,
# 'traj.climb.initial_states:mach')
# self.model.connect(Mission.Takeoff.FINAL_ALTITUDE,
# 'traj.climb.controls:altitude')
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like for this case we are losing those initial connections, why did we do that?

Copy link
Member Author

Choose a reason for hiding this comment

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

These connections remain for the FLOPS based mission. I've added commented out code here for the simple mission to show that we need to connect it later.

We cannot do these connections now because the simplified takeoff outputs velocity whereas the simple mission deals with Mach. We cannot do a direct connection but could do a constraint. Instead, I will make the simplified takeoff output Mach as well and connect that directly in a follow-on PR.

We do not lose any capability the changes in this PR; this is more of a note for the future.

Copy link
Contributor

Choose a reason for hiding this comment

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

Understood, thanks for the explanation!

aviary/interface/methods_for_level2.py Show resolved Hide resolved
@jdgratz10 jdgratz10 added this pull request to the merge queue Jan 16, 2024
Merged via the queue into OpenMDAO:main with commit 0d674b4 Jan 16, 2024
6 checks passed
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.

None yet

3 participants