Operator inference for data-driven, non-intrusive model reduction of dynamical systems.

# Operator Inference in Python

This is a Python implementation of Operator Inference for learning projection-based polynomial reduced-order models of dynamical systems. The procedure is data-driven and non-intrusive, making it a viable candidate for model reduction of "glass-box" systems. The methodology was introduced in [1].

See the Wiki for mathematical details and API documentation. See this repository for a MATLAB implementation.

## Quick Start

### Installation

Install the package from the command line with the following single command (requires `pip`).

```\$ python3 -m pip install --user rom-operator-inference
```

See the wiki for other installation options.

### Usage

Given a basis matrix `Vr`, snapshot data `X`, and snapshot time derivatives `Xdot`, the following code learns a reduced model for a problem of the form dx / dt = c + Ax(t), then solves the reduced system for 0 ≤ t ≤ 1.

```import numpy as np
import rom_operator_inference as roi

# Define a model of the form  dx / dt = c + Ax(t).
>>> model = roi.InferredContinuousROM(modelform="cA")

# Fit the model to snapshot data X, the time derivatives Xdot,
# and the linear basis Vr by solving for the operators c_ and A_.
>>> model.fit(Vr, X, Xdot)

# Simulate the learned model over the time domain [0,1] with 100 timesteps.
>>> t = np.linspace(0, 1, 100)
>>> x_ROM = model.predict(X[:,0], t)
```

## Examples

The `examples/` folder contains scripts and notebooks that set up and run several examples:

Contributors: Renee Swischuk, Shane McQuarrie, Elizabeth Qian, Boris Kramer, Karen Willcox.

## References

These publications introduce, build on, or use Operator Inference. Entries are listed chronologically.

• [1] Peherstorfer, B. and Willcox, K., Data-driven operator inference for non-intrusive projection-based model reduction. Computer Methods in Applied Mechanics and Engineering, Vol. 306, pp. 196-215, 2016. (Download)

BibTeX
```@article{PW2016OperatorInference,
title     = {Data-driven operator inference for nonintrusive projection-based model reduction},
author    = {Peherstorfer, B. and Willcox, K.},
journal   = {Computer Methods in Applied Mechanics and Engineering},
volume    = {306},
pages     = {196--215},
year      = {2016},
publisher = {Elsevier}
}```

• [2] Qian, E., Kramer, B., Marques, A., and Willcox, K., Transform & Learn: A data-driven approach to nonlinear model reduction. In the AIAA Aviation 2019 Forum & Exhibition, Dallas, TX, June 2019. Paper AIAA-2019-3707. (Download)

BibTeX
```@inbook{QKMW2019TransformAndLearn,
title     = {Transform \& Learn: A data-driven approach to nonlinear model reduction},
author    = {Qian, E. and Kramer, B. and Marques, A. N. and Willcox, K. E.},
booktitle = {AIAA Aviation 2019 Forum},
year      = {2018},
note      = {Paper AIAA-2019-3707},
doi       = {10.2514/6.2019-3707},
URL       = {https://arc.aiaa.org/doi/abs/10.2514/6.2019-3707},
eprint    = {https://arc.aiaa.org/doi/pdf/10.2514/6.2019-3707}
}```

• [3] Swischuk, R., Mainini, L., Peherstorfer, B., and Willcox, K., Projection-based model reduction: Formulations for physics-based machine learning. Computers & Fluids, Vol. 179, pp. 704-717, 2019. (Download)

BibTeX
```@article{SMPW2019PhysicsbasedML,
title     = {Projection-based model reduction: Formulations for physics-based machine learning},
author    = {Swischuk, R. and Mainini, L. and Peherstorfer, B. and Willcox, K.},
journal   = {Computers \& Fluids},
volume    = {179},
pages     = {704--717},
year      = {2019},
publisher = {Elsevier}
}```

• [4] Swischuk, R., Physics-based machine learning and data-driven reduced-order modeling. Master's thesis, Massachusetts Institute of Technology, 2019. (Download)

BibTeX
```@phdthesis{swischuk2019MLandDDROM,
title  = {Physics-based machine learning and data-driven reduced-order modeling},
author = {Swischuk, Renee},
year   = {2019},
school = {Massachusetts Institute of Technology}
}```

• BibTeX
```@article{peherstorfer2019samplingMarkovian,
title   = {Sampling low-dimensional Markovian dynamics for pre-asymptotically recovering reduced models from data with operator inference},
author  = {Peherstorfer, Benjamin},
journal = {arXiv preprint arXiv:1908.11233},
year    = {2019}
}```

• [6] Swischuk, R., Kramer, B., Huang, C., and Willcox, K., Learning physics-based reduced-order models for a single-injector combustion process. AIAA Journal, Vol. 58:6, pp. 2658-2672, 2020. Also in Proceedings of 2020 AIAA SciTech Forum & Exhibition, Orlando FL, January, 2020. Paper AIAA-2020-1411. Also Oden Institute Report 19-13. (Download)

BibTeX
```@article{SKHW2020ROMCombustion,
title     = {Learning physics-based reduced-order models for a single-injector combustion process},
author    = {Swischuk, R. and Kramer, B. and Huang, C. and Willcox, K.},
journal   = {AIAA Journal},
volume    = {58},
number    = {6},
pages     = {2658--2672},
year      = {2020},
publisher = {American Institute of Aeronautics and Astronautics}
}```

• [7] Qian, E., Kramer, B., Peherstorfer, B., and Willcox, K., Lift & Learn: Physics-informed machine learning for large-scale nonlinear dynamical systems. Physica D: Nonlinear Phenomena, Vol. 406, May 2020, 132401. (Download)

BibTeX
```@article{QKPW2020LiftAndLearn,
title   = {Lift \& Learn: Physics-informed machine learning for large-scale nonlinear dynamical systems.},
author  = {Qian, E. and Kramer, B. and Peherstorfer, B. and Willcox, K.},
journal = {Physica {D}: {N}onlinear {P}henomena},
volume  = {406},
pages   = {132401},
url     = {https://doi.org/10.1016/j.physd.2020.132401},
year    = {2020}
}```

• [8] Benner, P., Goyal, P., Kramer, B., Peherstorfer, B., and Willcox, K., Operator inference for non-intrusive model reduction of systems with non-polynomial nonlinear terms. arXiv:2002.09726. Also Oden Institute Report 20-04. (Download)

BibTeX
```@article{BGKPW2020OpInfNonPoly,
title   = {Operator inference for non-intrusive model reduction of systems with non-polynomial nonlinear terms},
author  = {Benner, P. and Goyal, P. and Kramer, B. and Peherstorfer, B. and Willcox, K.},
journal = {arXiv preprint arXiv:2002.09726},
year    = {2020}
}```

• BibTeX
```@article{SGBK2020OpInfAffine,
title   = {Data-Driven Learning of Reduced-order Dynamics for a Parametrized Shallow Water Equation},
author  = {Y{\i}ld{\i}z, S. and Goyal, P. and Benner, P. and Karas{\"o}zen, B.},
journal = {arXiv preprint arXiv:2007.14079},
year    = {2020}
}```

• BibTeX
```@article{MHW2020regOpInfCombustion,
title   = {Data-driven reduced-order models via regularized operator inference for a single-injector combustion process},
author  = {McQuarrie, S. A. and Huang, C. and Willcox, K.},
journal = {arXiv preprint arXiv:2008.02862},
year    = {2020}
}```

## Project details

Uploaded `source`
Uploaded `py3`