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

Hamiltonian Operator Inference #45

Open
13 tasks
shanemcq18 opened this issue Aug 23, 2023 · 0 comments
Open
13 tasks

Hamiltonian Operator Inference #45

shanemcq18 opened this issue Aug 23, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@shanemcq18
Copy link
Member

shanemcq18 commented Aug 23, 2023

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.
@shanemcq18 shanemcq18 added the enhancement New feature or request label Aug 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

1 participant