PyPK is a collection of p-k methods for solving the flutter equation.
## Install and run
If you only want to use PyPK, you can install it using
```bash
python3 -m pip install.[--user]
```
and then run a case using
```bash
python3 path/to/case.py
```
If you need to develop in PyPK before using it, you do not need to install anything, and you can just run your case from the repo folder using
```bash
python3 run.py path/to/case.py
```
## Use
PyPK is initialized through its API `init_pypk`. Examples can be found under the tests directory. A case file typically contains the following lines
```python
frompypkimportinit_pypk
cfg={...}
solver=init_pypk(cfg)
solver.set_matrices(m,k,q)
solver.compute()
solver.find_flutter()
solver.save(case_name)
solver.plot(case_name,show=True,format=fmt)
```
where `cfg` is a `dict` defining the configuration of the solution method, `m`, `k` and `q` are the mass, stiffness and aerodynamic force matrices provided as `numpy array`, and `case_name` and `fmt` are `str`.
PyPK has also been interfaced with OpenMDAO for performing flutter-constrained optimization, see [OMFlut](https://gitlab.uliege.be/am-dept/omflut). Within that context, its builder must be imported using `from pypk.api_om import PypkBuilder`, then initialized with a configuration dictionary and provided to an OMFLut FlutterGroup as `FlutterGroup(..., flutter=PypkBuilder(cfg))`.
The configuration dictionary contains the following entries