A graphical tool for modeling and simulating multi-physical systems.
Project description
MuPhyN - Multi Physical Nexus
MatLab/Simulink is a very powerful tool that allows engineers to simulate complex multi-physical systems. Free and open-source tools exist such as Scilab + Xcos or Octave that tries to be compatible with MatLab/Simulink, but the approach of MuPhyN is to replicate the power and ease of use of the MatLab/Simulink combination by using (i)Python instead of MatLab combined with the MuPhyN graphical interface instead of Simulink.
Free libraries such as scipy and numpy offer numerical tools that can replicate most of MatLab toolboxes, and implementing them into new boxes in MuPhyN is trivial thanks to easily expandables libraries of boxes.
MuPhyn is capable of running into an iPython interactive shell while having access to the namespace of the shell. This means that python code can be run in the shell to dynamically generate modelisation parameters that can be directly used into the MuPhyN model of the simulated system.
MuPhyN is also intendend to be expandable to other simulation tools. A connection to OpenModelica is being developed to simulate different kinds of systems with lumped elements. Connection to open source finite element analysis softwares such as FEATools or field solver tools like openEMS or FEMM are also considered.
it is based on a Qt interface and uses a simulator core. It is fully written in Python and uses YAML as the descriptive language. The library feature proposed allows users to add as many boxes and schedulers as they want.
Summary
- Install
- Running in standalone mode
- Running in an iPython interactive shell
- Usage
- Developpement
- Publications
Install
Stable version (PIP)
The stable version of MuPhyN is available with pip.
Install using pip:
pip install muphyn
Development version (GIT)
The development version is only available on this repository.
Requirements
MuPhyN works with python and requires the following packages to work:
- packaging>=23.0
- ipython>=7.31.1
- Pillow>=9.2.0
- PyYAML>=6.0
- scipy>=1.10.0
- PyQt6>=6.4.2
- numexpr>=2.6.1
- numpy>=1.21.5
- matplotlib>=3.5.2
- opcua>=0.98.13
- OMPython>=3.4.0
- pandas>=1.4.4
The list is available in the requirements.txt file.
Download repository project
Install using git command:
git clone https://gitlab.com/CeREF/muphyn.git
Install requirements from file:
pip install -r requirements.txt
Running in standalone mode
Launch the software:
python3 -m muphyn
Note: If you installed the development version, you must be in the muphyn project folder
Running in an iPython interactive shell
MuPhyN can be run in a IPython environment. All the variables existing in this environment can be used for the simulations.
Start iPython:
iPython3
Then load the MuPhyN extension, and run the MuPhyN magic command
%load_ext muphyn
%muphyn
Note: If you installed the development version, you must be in the muphyn project folder
Usage
Drag & drop
You can easily drag / drop elements from the library. Once dropped, you can link the inputs and the outputs of the box. You can also edit the properties of the boxes in order to change their behaviours. Once everything is setted up, you only need to press the F5 key or click on the "Simulation > Lancer" menu.
Select libraries
Use the View > Libraries sub menus to add the libraries.
Default libraries are located as it :
- [MuPhyN_Folder]/libraries/box_library
- [MuPhyN_Folder]/libraries/scheduler_library
- [MuPhyN_Folder]/libraries/user_box
Developpement
Current Features
- Fixed-step simulation
- Basic boxes : Addition, Amplifier, Constant, Derivator, Graph, Integrator, Multiplier, Ramp, Sine, Square, Step
- Fixed-step simulation
- Basic boxes : Addition, Amplifier, Constant, Derivator, Graph, Integrator, Multiplier, Ramp, Sine, Square, Step
- Schedulers : Default
- Transfer Function box using scipy ODE solver
- Libraries management for both the boxes and the schedulers
- Draggable and droppable element from the library
- Properties panel for the dragged boxes
- Draggable links between the inputs and outputs of boxes
- Basic user interface:
- File drag / drop in the interface.
- Show recent files
- Undo / Redo
- Copy / Cut / Paste
- Transfer Function box using scipy ODE solver
- Libraries management for both the boxes and the schedulers
- Draggable and droppable element from the library
- Properties panel for the dragged boxes
- Draggable links between the inputs and outputs of boxes
- Basic user interface:
- File drag / drop in the interface.
- Show recent files
- Undo / Redo
- Copy / Cut / Paste
TODO
- Allow to edit the prompted text on the boxes.
- Add the box composite diagram editor.
- Allow to save composite boxes.
- Allow to open composite boxes.
- Allow to compile composite boxes.
- Show better visual feedback for the link creation.
- Add a progress bar for the simulation part.
- Add a logs manager to retrace what happen when an error occur.
- Add some popups to describes the errors currently rendered in the prompt.
- Add some popups menu when right click on elements.
- Add a library popup when drag / drop a link to show compatible box.
- Allows the user to pick from the library popup a compatible box, which will be added already connected to the diagram.
- Add some popups to tell the user when an action is correctly done.
- Add a dialog to edit the parameters of the software.
- Add a dialog to show an help to use the software.
- Add a dialog to show the informations about the softawre.
- Add theme manager.
- Finish the formula box
- Finish the reccurence box
- Add a vectorial / matrix simulation mode
- Add a mux box
- Add a demux box
- Allow to pause / restart / stop a heavy simulation.
- Add a debug mode to see what happens on the different link by adding a step by step simulation.
- Add openned matplotlib chart in the dialog manager.
- Add a wizard fot the schedulers creation.
- Add a code editor for the schedulers and the coded boxes.
- Add a language dialog to manage / create the software language.
- Allow to change the displayed language.
- Add a theme dialog to manage / create the software themes.
- Allow to change the displayed theme.
- Add a signal analysis library.
Known bugs
- When a text from an IO of a box is edited, it is not edited in the diagram.
- Some lags with the links rendering exists.
Publications
FOSDEM 2023
FOSDEM is an European event centered on free and open-source software development.
The project has been introduced with a presentation on 4th March 2023. The presentation can be watched with the following link:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file MuPhyN-0.1.1.post4.tar.gz
.
File metadata
- Download URL: MuPhyN-0.1.1.post4.tar.gz
- Upload date:
- Size: 385.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7eef376a32b4f4eeb0fb84799575a313f6728511ed91bbf5730bccc1ea235f31 |
|
MD5 | db47694371213bc867a6ea719f03c7f8 |
|
BLAKE2b-256 | a95169ba64671460c8cef8c8018a041616ae2afd282f75939ee6433e6b04fc41 |
File details
Details for the file MuPhyN-0.1.1.post4-py3-none-any.whl
.
File metadata
- Download URL: MuPhyN-0.1.1.post4-py3-none-any.whl
- Upload date:
- Size: 603.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ddbec90998c595bf385a8e48463ae1ea2decc9bab36816f62ae86882a33dc468 |
|
MD5 | c88afb132f2fdb91557a73c0fcfcfdb8 |
|
BLAKE2b-256 | 6a7c94dd2c82aa214872feef0b9360da88700c0fac2343b90ec1136d1ee69adb |