An open API service indexing awesome lists of open source software.

https://github.com/leandro-bertoluzzi/pyspice-power-electronics

Power electronics simulations using the PySpice Python module
https://github.com/leandro-bertoluzzi/pyspice-power-electronics

electronics power-electronics pyspice python

Last synced: over 1 year ago
JSON representation

Power electronics simulations using the PySpice Python module

Awesome Lists containing this project

README

          

Pyspice Power Electronics


Github top language

Github language count

Repository size

License



About   |  
Technologies   |  
Requirements   |  
Starting   |  
License   |  
Author


## :dart: About ##

Collection of scripts with the definition and simulation of circuits used in power electronics, written in Python using the module PySpice to interact with NgSpice and Matplotlib to graph the results from the simulations.

## :rocket: Technologies ##

The following tools were used in this project:

- [PySpice](https://pyspice.fabrice-salvaire.fr/)
- [NgSpice](http://ngspice.sourceforge.net/)
- [Matplotlib](https://matplotlib.org/)
- [Numpy](https://numpy.org/)
- [Docker](https://www.docker.com/)

## :white_check_mark: Requirements ##

- If you want to use the docker container, you need to [install Docker](https://www.docker.com/get-started) and, optionally, [Docker Compose](https://docs.docker.com/compose/install/) in your machine.

- If you decide to not use docker, you need to install [PySpice](https://pyspice.fabrice-salvaire.fr/). The version currently used is [v1.5](https://pyspice.fabrice-salvaire.fr/releases/v1.5/installation.html). In the same docs you are taught how to install NgSpice.

If you choose the second option, local setup, and you are a Windows user, I highly recommend installing it via Anaconda or Miniconda.

## :checkered_flag: Starting ##

```bash
# Clone this project
$ git clone https://github.com/Leandro-Bertoluzzi/pyspice-power-electronics

# Access the project folder
$ cd pyspice-power-electronics

# Option 1: Using Docker container through docker-compose
docker-compose run --rm pyspice the_folder/the_file.py

# Option 2: Using Docker container without docker-compose
## Before running it for the first time and every time you modify the scripts, build the docker container
docker build -t pyspice .
## Run the Docker container with the script as a parameter
docker run --rm -v %cd%/results:/root/results pyspice the_folder/the_file.py

# Option 3: Installing PySpice in local machine
## Enter any of the folders and run a script
$ cd the_folder
$ python the_file.py
```

**Note:** If you chose option 2, to get the current directory you must use:
- Windows (cmd): %cd%
- Windows (PowerShell): ${PWD}
- Linux: $(pwd)
```

## :memo: License ##

This project is under license from MIT. For more details, see the [LICENSE](LICENSE.md) file.

Made with :heart: by Leandro Bertoluzzi

 

Back to top