Skip to content

Phase linking overhaul.#1203

Open
Kenneth-T-Moore wants to merge 46 commits into
OpenMDAO:mainfrom
Kenneth-T-Moore:link_phases
Open

Phase linking overhaul.#1203
Kenneth-T-Moore wants to merge 46 commits into
OpenMDAO:mainfrom
Kenneth-T-Moore:link_phases

Conversation

@Kenneth-T-Moore

@Kenneth-T-Moore Kenneth-T-Moore commented Jun 24, 2026

Copy link
Copy Markdown
Member

Summary

Prior to this refactor, all of the phase linkages were added by custom code written independently for each problem origin (gasp, flops, solved twodof) and encapsulated in the configurators. This PR implements a general phase-linking that replaces all of these, and paves the way for a future capability of selecting the ODE individually in each phase.

  1. General phase linking capability implemented in aviary_group.
  2. The get_linked_variables method has been added to the phase builder base class. This method allows phases to define which variables should be linked.
  3. For analytic phases that need an initial parameter connected upstream, the phase linking supports this. For a variable like "mass"
  • The input should be called "initial_mass"
  • The get_linked_variables should contain "initial_mass" instead of "mass".
  1. The phase_info has been updated to provide a new key for time/states/controls that gives the user control over whether the link is via a direct connection or a constraint. For a variable like mass, this key is called mass_direct_link.
  • Default values for these are specified in the default keys for each phase. Some linkages were handled differently between the problem types, and that custom code has been replaced by these default values.
  1. The former link_phases method on the problem configurators has been renamed to link_trajectory. This method now just performs any problem-specific linkage with components external to the trajectory.
  2. When linkage constraints are created, the ref and ref0 now come from the ref/ref0 defined in the upstream or downstream phase. Formerly, they came from initial conditions or hardcoded values.
  3. The new phase linking no longer creates a constraint between two ends that are already constrained by initial_ and final_.

Related Issues

  • Resolves #

Backwards incompatibilities

There is a possibility that your model may run a bit differently due to some scaling changes and some small differences in the resulting linkages (particularly downstream of a Breguet range phase). The new phase keys should restore some of this.

New Dependencies

None

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.

1 participant