Metadata-Version: 2.4
Name: MuPhyN
Version: 0.2.0
Summary: A graphical tool for modeling and simulating multi-physical systems.
Author-email: CeREF Technique <contact.tech@ceref.be>, Dylan Fievez <fievezd@ceref.be>, Francois Demoulin <francois.demoulin@outlook.be>, Thomas Herpoel <herpoelt@ceref.be>, Aymeline Giloteau <giloteaua@helha.be>
Project-URL: Homepage, https://gitlab.com/CeREF/muphyn
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9.13
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: PySide6
Requires-Dist: pyqtgraph
Requires-Dist: serializable-datastructure>=0.2.1
Requires-Dist: muphyn-core>=0.1.0
Dynamic: license-file

# 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 expandable libraries of boxes.

It is based on a PySide6 Qt interface and uses a simulator core, MuPhyN is fully written in Python and uses YAML as the descriptive language. The library feature allows users to easily add as many boxes and schedulers as they want.

## Summary
- [MuPhyN - Multi Physical Nexus](#muphyn---multi-physical-nexus)
  - [Summary](#summary)
- [Install](#install)
  - [Stable version (PIP)](#stable-version-pip)
  - [Running in standalone mode](#running-in-standalone-mode)
- [Usage](#usage)
  - [Create a new simulation](#create-a-new-simulation)
  - [Build simulation model](#build-simulation-model)
  - [Running the simulation](#running-the-simulation)
  - [Select libraries](#select-libraries)
- [Development](#development)
  - [Current Features](#current-features)
  - [Feature perspectives](#feature-perspectives)
  - [TODO](#todo)
  - [Known bugs](#known-bugs)
- [Publications](#publications)
  - [FOSDEM 2023](#fosdem-2023)
- [Development repository](#development-repository)

# Install

## Stable version (PIP)
The stable version of MuPhyN is available with pip.

Install using pip:
```bash
pip install muphyn
```

## Running in standalone mode

Launch the software:
```bash
python3 -m muphyn
```

# Usage

## Create a new simulation
To create a new simulation, you can use the "File > New > Simulation" menu. 

You can close the current simulation by using the "File > Close" menu or "Ctrl + W". 

You can also use the "File > Open" menu or "Ctrl + O" to open an existing simulation and the "File > Save" menu or "Ctrl + S" to save the current simulation.

![New simulation video](https://gitlab.com/-/project/33588006/uploads/238d55173a7986ccef5febf65145ab42/new_simulation.mp4){width=814 height=600}

## Build simulation model

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 behaviors.
Once everything is set up, you only need to press the F5 key or click on the "Simulation > Start simulation" menu.

![Build simulation model video](https://gitlab.com/-/project/33588006/uploads/a7a4139fe1138f73c5643a76254f2138/build_model.mp4){width=814 height=600}

## Running the simulation

Use the simulation toolbar to start or stop the simulation. You can also use the "Simulation" menu or F5 and F6 keys to do the same actions.

## Select libraries
Use the **View > Libraries** sub menus to add the libraries.

# Development

## Current Features 

- Fixed-step simulation
- Basic boxes : Addition, Amplifier, Constant, Derivate, 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

## Feature perspectives

MuPhyn should be capable of running into an iPython interactive shell while having access to the namespace of the shell. This means that python code could be run in the shell to dynamically generate parameters that can be directly used into the MuPhyN model of the simulated system.

MuPhyN is also intended 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.

## TODO

## Known bugs

- [ ] Slowdown of the interface when using a lot of boxes
- [ ] Bug in the inputs panel in box parameters sideview (requires to increase side panel width to see the inputs)

# 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:

[MuPhyN project at FOSDEM 2023](https://fosdem.org/2023/schedule/event/openresearch_muphyn/)

# Development repository
See the [MuPhyN Desktop Development](https://gitlab.com/muphyn/muphyn-developments/muphyn-desktop-dev) repository to efficiently develop for MuPhyN Desktop.
