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

Rework of cannonball example. #545

Merged
merged 8 commits into from
Feb 18, 2021
Merged

Conversation

robfalck
Copy link
Contributor

@robfalck robfalck commented Feb 17, 2021

Summary

Makes the cannonball example simpler.
Makes necessary changes to water rocket example due to changes in cannonball.
Fixed a missing minus sign in brachistochrone docs.

This PR includes changes from #544

Related Issues

None

Status

  • Ready for merge

Backwards incompatibilities

None

New Dependencies

None

JustinSGray and others added 4 commits February 11, 2021 09:03
Fixed WaterRocket example since CannonballPhase no longer exists.
Fixed a missing minus sign in brachistochrone docs.
@coveralls
Copy link

coveralls commented Feb 17, 2021

Coverage Status

Coverage decreased (-0.006%) to 96.667% when pulling fdb8dcf on robfalck:justin_cb_example into c7cc330 on OpenMDAO:master.

# Ask OpenMDAO to compute the partial derivatives using complex-step
# with a partial coloring algorithm for improved performance
self.declare_partials('*', '*', method='cs')
self.declare_coloring(wrt='*', method='cs')
Copy link
Member

Choose a reason for hiding this comment

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

Don't need the declare_partials if we have declare_coloring

descent.add_state('v', fix_initial=False, fix_final=False)
descent.add_state('r', units='m', rate_source='r_dot')
descent.add_state('h', fix_initial=False, fix_final=True,
units='m', rate_source='h_dot')
Copy link
Member

Choose a reason for hiding this comment

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

I guess in this example, we are being explicit about rate_source and units (because it is a more advanced feature to let dymos figure them out for you)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point, since we define the ODE in that same example we should probably just tag the state rates.

@@ -82,7 +82,8 @@ that provides the maximum range cannonball.

## Building and running the problem

The following code instantiates our problem, our trajectory, two phases,
The following code instantiates our defines the components for the physical
Copy link
Member

Choose a reason for hiding this comment

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

Something got lost here. Probably need to remove the words "instantiates our".

subsys=USatm1976Comp(num_nodes=nn))
# Ask OpenMDAO to compute the partial derivatives using complex-step
# with a partial coloring algorithm for improved performance
self.declare_partials('*', '*', method='cs')
Copy link
Member

Choose a reason for hiding this comment

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

Here too, don't need declare partials.

@robfalck robfalck merged commit f4f8fa1 into OpenMDAO:master Feb 18, 2021
@robfalck robfalck deleted the justin_cb_example branch August 25, 2022 15:51
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.

4 participants