PortHamiltonianBenchmarkSystems is a collection of port-Hamiltonian systems, that can be used as benchmarks for simulation, control, and model-order reduction algorithms. We feature constructors for a wide range of linear, nonlinear, ODE, and DAE systems, as well as several default parameter sets for each. Detailed descriptions and derivations of the featured systems can be found in the documentation.
If you want to take advantage of this benchmark collection programming languages other than julia, you can:
- Generate any desired system in Julia and save the matrices in a format of your choosing (see JuliaIO),
- Generate MAT-files for any default parameter set, using our Command-Line Interface.
To install PortHamiltonianBenchmarkSystems, run the following commands in the Julia REPL:
using Pkg
Pkg.add(url="https://github.com/Algopaul/PortHamiltonianBenchmarkSystems.jl/")
To generate one of the systems, e.g. a mass-spring-damper chain with the parameters from Gugercin2012, type:
using PortHamiltonianBenchmarkSystems
config = SingleMSDConfig("Gugercin")
J, R, Q, B = construct_system(config)
Naturally, we may also specify the parameters ourselves:
config = SingleMSDConfig(n_cells = 10, io_dim = 2, c = 1.0, m = 4.0, k = 5.0)
If you need the system matrices in standard port-Hamiltonian form, type:
system = PHSystem(config)
(; E, J, R, Q, G, P, S, N) = system
Docstrings for the types and methods shown above can be accessed in the Julia REPL by typing ?
and then name of the type or method.
This benchmark collection is driven by the active support of the port-Hamiltonian community. If your research has lead to port-Hamiltonian models that may be relevant for this collection, we would be happy to include them. If you wish to contribute to the project directly, please consult our Contribution page, fork our Git repository and issue a pull request. Alternatively, feel free to contact us via e-mail to discuss our potential collaboration. We are happy to receive reference implementations in other languages and reimplement them in Julia for this package.