Skip to content

afalaize/pyphs_gui

 
 

Repository files navigation

PyPHS_GUI

pypi version Licence badge python versions Website badge

A Graphical User Interface for the Python software PyPHS dedicated to the simulation of multi-physical Port-Hamiltonian Systems (PHS) described by graph structures.

Licence

PyPHS and the present graphical user interface are distributed under the french CeCILL-B licence.

Installation

Python prerequisites

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.

C++ prerequisites

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).

LaTeX prerequisites

The PyPHS package can automatically generate a LaTeX documentation file that compiles with the standard TeX distributions.

Install from package

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

Configuration

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)

Documentation

Most of the documentation can be found in the website.

Theoretical overview

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.

Q&A Mailing list

The package mailing list is at https://groups.google.com/forum/#!forum/pyphs.

Tutorials and examples

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)

Authors and Affiliations

PyPHS is mainly developed by Antoine Falaize and Thomas Hélie, respectively in

See the AUTHORS file for the complete list of authors.

References

GraphAnalysis2016

Falaize, A., & Hélie, T. (2016). Passive Guaranteed Simulation of Analog Audio Circuits: A Port-Hamiltonian Approach. Applied Sciences, 6(10), 273.

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.

About

A GUI for PyPHS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.9%
  • Shell 0.1%