GSEIM (General-purpose Simulator with Explicit and Implicit Methods) is meant for simulation of electrical circuits, especially power electronic circuits, and also for numerical solution of ordinary differential equations (ODEs). In terms of basic functionality, GSEIM is similar to commercial packages such as Simulink, Simscape, PSIM, and PLECS. However, at this stage, GSEIM does not handle real-time simulation.
GSEIM includes a schematic entry GUI (python) adapted from the GNU Radio package, a C++ solver, a Qt-python plotting GUI, and a few additional python programs.
Pre-compiled images are available on GitHub. To install the latest image, download the Python wheel image from the latest GitHub CI run.
- GitHub Actions for GSEIM project
- Click on latest passing (green) CI run
- Download
gseim-wheel
package at the bottom of the page, which will expand to a.whl
file. - Run
pip3 install ~/Downloads/gseim*.whl
. (You may want to do this in a virtual environment.) - To run the GUI, it is also necessary to install PyQt5 or PyQt6
(
pip3 install pyqt5
orpip3 install pyqt6
, depending on your system).
Once installed, the GUI can be launched with gseim-gui
.
GSEIM is built using Bazel, so it must be installed prior to attempting to build the source. Gtk and Qt are also both required for the GUI.
- If you do not already have Bazel installed, install it.
- On Linux, you can follow the instructions provided by Bazel.
The simplest method might be installing Bazelisk through
npm
:sudo apt install npm npm i @bazel/bazelisk
- On Mac, the easiest way is Homebrew:
brew install bazelisk
- On Linux, you can follow the instructions provided by Bazel.
The simplest method might be installing Bazelisk through
- Navigate to the source directory
cd gseim_grc/src/
- Install PyQT5 or PyQT6. This must be done manually (the package does not
directly depend on these) because the required package varies by OS.
- For Ubuntu prior to 22.04:
pip3 install pyqt5
- For Mac or Ubuntu 22.04 and newer:
pip3 install pyqt6
- For Ubuntu prior to 22.04:
You're now ready to run GSEIM directly, or build a distributable wheel package.
bazel run //grc:gseim_gui
If you want to run GSEIM locally (without internet), first find your bazel version using
bazel --version
As an example, suppose the version number is 5.3.0. In that case, use
USE_BAZEL_VERSION=5.3.0 bazel run //grc:gseim_gui
The GSEIM GUI should show up. Follow instructions in the Getting started page of the GSEIM manual.
bazel build //:gseim_wheel
The wheel will be located in bazel-bin/gseim-*.whl
.
In order to generate hierarchical blocks, it's necessary to set the
environment variable HIER_BLOCK_USER_DIR
to a folder where the generated
outputs are saved.
This can be done by adding the following line to your .bashrc
/.zshrc
/etc.
setup file:
export HIER_BLOCK_USER_DIR=/home/$USER/user_folder/
or by running the GUI with the environment variable specified, such as:
HIER_BLOCK_USER_DIR=/home/$USER/user_folder/ gseim-gui
when running an installed package, or
HIER_BLOCK_USER_DIR=/home/$USER/user_folder/ bazel run ...
when running from source.
The GSEIM documentation can be accessed online (https://gseim.github.io).
The use and redistribution of GSEIM is governed by GPLv3.
- enhancement of element library
- additional power electronics examples
- development of GSEIM-based educational material for power electronics courses