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

Initial Implementation of Height Energy in SGM #97

Merged
merged 45 commits into from
Feb 20, 2024

Conversation

crecine
Copy link
Contributor

@crecine crecine commented Jan 24, 2024

Summary

Creation of SGM phases for HeightEnergy, DetailedTakeoff, and DetailedLanding

Related Issues

  • Resolves #

Backwards incompatibilities

None

New Dependencies

None

crecine and others added 30 commits December 28, 2023 16:31
…ded required premission susbsytems for testing
This reverts commit 5fc9c65.
Also added some error checking to automatic state detections
also added example of customizing an event function
Included example of changing trigger value after creation
@crecine crecine marked this pull request as ready for review February 14, 2024 17:40
Copy link
Member

@johnjasa johnjasa left a comment

Choose a reason for hiding this comment

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

Good stuff Carl, thanks for this!

Do you plan to add HeightEnergy based tests as part of this PR or a follow-on PR?

aviary/mission/flops_based/ode/mission_ODE.py Outdated Show resolved Hide resolved
@crecine
Copy link
Contributor Author

crecine commented Feb 16, 2024

Good stuff Carl, thanks for this!

Do you plan to add HeightEnergy based tests as part of this PR or a follow-on PR?

I can move the unofficial example from the bottom of flops_based/phases/time_integration_phases.py to an official test.

@johnjasa
Copy link
Member

Good stuff Carl, thanks for this!
Do you plan to add HeightEnergy based tests as part of this PR or a follow-on PR?

I can move the unofficial example from the bottom of flops_based/phases/time_integration_phases.py to an official test.

Awesome, please do that!

}
add_SGM_required_outputs(self, SGM_required_outputs)

print_level = 0 if analysis_scheme is AnalysisScheme.SHOOTING else 2
Copy link
Member

Choose a reason for hiding this comment

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

Kind of wonder why the default is 2 for colocation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

that's what it was on line 208, so I didn't want to change it.



def add_SGM_required_inputs(group: om.Group, inputs_to_add: dict):
blank_execcomp = om.ExecComp()
Copy link
Member

Choose a reason for hiding this comment

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

What is the ultimate purpose of creating a "sink" component for these vars?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the simupy integrator expects that all states be an input to the ODE and all state rates be an output from the ODE. If a state is not directly used in the EOM calculations, this lets you add it without changing the EOM.

iv_comp = om.IndepVarComp()
for output, details in outputs_to_add.items():
iv_comp.add_output(output, **details)
group.add_subsystem('SGM_required_outputs',
Copy link
Member

Choose a reason for hiding this comment

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

Similar question for this source indepvarcomp.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

same as above, but for the state rates that are not directly calculated by the EOM

@crecine crecine enabled auto-merge February 20, 2024 22:23
@crecine crecine added this pull request to the merge queue Feb 20, 2024
Merged via the queue into OpenMDAO:main with commit 5e74b55 Feb 20, 2024
7 checks passed
@crecine crecine deleted the flops_sgm branch March 7, 2024 20:28
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.

3 participants