About | Technologies | Requirements | Starting | License | Author
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.
The following tools were used in this project:
-
If you want to use the docker container, you need to install Docker and, optionally, Docker Compose in your machine.
-
If you decide to not use docker, you need to install PySpice. The version currently used is v1.5. 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.
# 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 <a href="https://github.com/Leandro-Bertoluzzi" target="_blank">Leandro Bertoluzzi</a>
 
<a href="#top">Back to top</a>