Skip to content

Hamiltonian Operator Inference #45

@shanemcq18

Description

@shanemcq18

New feature: Hamiltonian Operator Inference from the paper Hamiltonian operator inference: Physics-preserving learning of reduced-order models for canonical Hamiltonian systems by Harsh Sharma (@harsh5332392), Zhu Wang, and Boris Kramer (@bokramer). The goal is to use Operator Inference for a canonical Hamiltonian system to learn a ROM that

  1. is a canonical Hamiltonian system;
  2. retains the physical interpretation of the state variables and preserves the coupling structure; and
  3. respects the symmetric property of structure-preserving space discretizations.

@harsh5332392 will take the lead on this. To begin, the main steps will be creating a SymplecticBasis class (cotangent lift algorithm) and a HamiltonianModel class that does the constrained optimization in fit() and symplectic integration in predict().

Suggested implementation steps:

Basis

  • Create a new file, /src/opinf/basis/_symplectic.py
  • Write a SymplecticBasis class that inherits from opinf.basis.LinearBasis and implement fit(). Or, you might be able to do this quickly by inheriting from the PODBasisMulti class, which represents a block diagonal POD (one POD for each variable).
  • Import the new class in /src/opinf/basis/__init__.py.
  • Write and run tests for the new classes in a new file /tests/basis/test_symplectic.py.
  • Compile the docs (make docs) and check that the automatically generated documentation page looks good.
  • If possible, write a short section about this class in docs/source/guides/reduction.md. We should probably turn this into a notebook that shows the different kinds of basis functions you get from POD and the symplectic approach.

Model Class

  • Create a new file, /src/opinf/models/multi/_hamiltonian.py.
  • Write a HamiltonianModel class in the new file.
    • The fit() method should take in the data matrices, do the constrained optimizations, and initialize the operators of the ROM.
    • Implement the predict() method with a symplectic integrator.
  • Write and run tests for the new class in a new file /tests/models/multi/test_hamiltonian.py
  • Compile the docs and check that the automatically generated documentation page looks good.
  • Write a tutorial as a new Jupyter Notebook, docs/source/tutorials/hamiltonian.ipynb with the linear wave equation example.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions