A Graphical User Interface for the Python software PyPHS dedicated to the simulation of multi-physical Port-Hamiltonian Systems (PHS) described by graph structures.
PyPHS and the present graphical user interface are distributed under the french CeCILL-B licence.
The PyPHS package run on Python 2.7 and Python 3.5 or newer (3.4 is no longer tested), with the following packages installed:
Please refer to the requirements.txt file for the required versions and make sure that these modules are up to date.
The generated C++ sources build with CMake >= 3.1 (see Configuration below). The code relies on the Eigen library (not needed for pure Python usage).
The PyPHS package can automatically generate a LaTeX documentation file that compiles with the standard TeX distributions.
The easiest way to install the package is via pip from the PyPI (Python Package Index):
pip install pyphs_gui
This includes the latest code and should install all dependencies automatically. If it complains about some missing dependencies, install them the same way with pip beforehand.
You might need higher privileges (use su or sudo) to install the package globally. Alternatively you can install the package locally (i.e. only for you) by adding the --user argument:
pip install --user pyphs
After installation, it is recommended to configure the config.py to your needs. Particularly, this is where the local path to the CMake binary.
Your local config.py file is located at the root of the PyPHS package, which can be recovered in a Python interpreter with
from pyphs import path_to_configuration_file
print(path_to_configuration_file)
Most of the documentation can be found in the website.
The development of PyPHS started as an implementation of the methods proposed in the reference [GraphAnalysis2016], in which the port-Hamiltonian formalism, the graph analysis and the structure preserving numerical method are exposed. This is worth to read before using the package.
The package mailing list is at https://groups.google.com/forum/#!forum/pyphs.
The package comes with a set of tutorials for the use of the main functionalities (definition, evaluation, and simulation of a core PHS structure). More tutorials are to come. Additionally, you can see the examples scripts. Both the tutorials and the examples folders are located at your package root, which can be recovered in Python interpreter with
from pyphs import path_to_examples, path_to_tutorials
print(path_to_examples)
print(path_to_tutorials)
PyPHS is mainly developed by Antoine Falaize and Thomas Hélie, respectively in
- the Team M2N (Mathematical and Numerical Methods), LaSIE Research Lab (CNRS UMR 7356), hosted by the University of La Rochelle,
- the Team S3AM (Sound Systems and Signals: Audio/Acoustics, InstruMents) at STMS Research Lab (CNRS UMR 9912), hosted by IRCAM in Paris.
See the AUTHORS file for the complete list of authors.
[NumericalMethod2015] | Lopes, N., Hélie, T., & Falaize, A. (2015). Explicit second-order accurate method for the passive guaranteed simulation of port-Hamiltonian systems. IFAC-PapersOnLine, 48(13), 223-228. |
[GraphAnalysis2016] | Falaize, A., & Hélie, T. (2016). Passive Guaranteed Simulation of Analog Audio Circuits: A Port-Hamiltonian Approach. Applied Sciences, 6(10), 273. |