Formalizes electric systems as linear problems for temporal and frequency-domain studies.
Project description
ElecSolver
Overview
ElecSolver formalizes electric systems as linear problems, suitable for both temporal and frequency-domain studies. It focuses on constructing the linear system representation, leaving the actual numerical resolution to the user.
This repository is not a general-purpose electrical system solver. Instead, it acts as a bridge between:
- The graph-based description of an electric network
- The corresponding sparse linear system to solve
In a very simple way, ElecSolver takes as an input the Resistances $R$, Capacitances $C$, Inductances $L$, Mutuals $M$, Current sources $I$ and Voltage sources $V$ along with the connectivity graph $G$ of the system and outputs the linear system: matrix $S$ and vector $b$ to solve in order to get the solution of the electric problem.
$$f_{\text{ElecSolver}}(R,C,L,M,I,V,G) = (S,b)$$
It is then up to the user to choose the solver they want for solving the system $Sx=b$ and to manage the time iterations if needed for temporal problems.
The main goal of ElecSolver is to provide a friendly Python interface for simulating and optimizing analog electric systems. While suitable for small circuit simulations, its strength lies in its scalability: it is able to build linear systems with millions of nodes and components.
[!IMPORTANT] ElecSolver has been designed with the following specifications in mind:
- The time needed for building the linear system must be negligible compared to the time needed for solving it.
- Handle natively inductive mutuals and resistive mutuals (skin effects).
- Handle as many coupled electric systems as one wants.
- Deal with lonely nodes and lonely edges in the electric graph: the problem can be well-posed and thus solved.
- Allow backpropagation of gradients through the system for optimization purposes.
[!NOTE] Non-linear components are not supported. You must manage event detection and system updates yourself.
Documentation
The documentation is available in the docs folder and can be built using zensical. You can also view the documentation online at https://williampiat3.github.io/ElecSolver/.
How to install
Using pip
ElecSolver is distributed on PyPI and can be installed using pip or conda/mamba.
pip install ElecSolver
Using conda/mamba
ElecSolver is also available on conda-forge and can be installed using conda or mamba:
conda install elecsolver
For solving linear systems, we advise using MUMPS through python-mumps, available for Linux, macOS, and Windows. It can be installed via conda:
conda install python-mumps
From source
You can also install ElecSolver from source by cloning the repository and running:
pip install .
you will need to have numpy, scipy and networkx installed in your environment
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file elecsolver-2.1.0.tar.gz.
File metadata
- Download URL: elecsolver-2.1.0.tar.gz
- Upload date:
- Size: 219.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
17a33dd4d6f8551904baa55c840d561cff00dc046b4bf7e11bad7e69722c4faa
|
|
| MD5 |
79c8495e29e9bbe8ccb3b67567cde0ee
|
|
| BLAKE2b-256 |
8f18d0a0b933e130b498f20e8393d7efee26e7df59e100342e0ed734055c4921
|
Provenance
The following attestation bundles were made for elecsolver-2.1.0.tar.gz:
Publisher:
publish-pypi.yml on williampiat3/ElecSolver
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
elecsolver-2.1.0.tar.gz -
Subject digest:
17a33dd4d6f8551904baa55c840d561cff00dc046b4bf7e11bad7e69722c4faa - Sigstore transparency entry: 1823023722
- Sigstore integration time:
-
Permalink:
williampiat3/ElecSolver@b0a4516a2dba1cafed939dd8cb92f012102e6f1a -
Branch / Tag:
refs/tags/2.1.0 - Owner: https://github.com/williampiat3
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@b0a4516a2dba1cafed939dd8cb92f012102e6f1a -
Trigger Event:
release
-
Statement type:
File details
Details for the file elecsolver-2.1.0-py3-none-any.whl.
File metadata
- Download URL: elecsolver-2.1.0-py3-none-any.whl
- Upload date:
- Size: 25.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b7eee5b1d54a58050f62ac534c2491281be4897c1726ba28a1665cc0e8e70da
|
|
| MD5 |
915d9ba0ea270f1f3f3e47fc19369bb0
|
|
| BLAKE2b-256 |
3c303742d5fcc0aefeea69b9772bd449362ae96c981dbd2388a96b39a197da66
|
Provenance
The following attestation bundles were made for elecsolver-2.1.0-py3-none-any.whl:
Publisher:
publish-pypi.yml on williampiat3/ElecSolver
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
elecsolver-2.1.0-py3-none-any.whl -
Subject digest:
5b7eee5b1d54a58050f62ac534c2491281be4897c1726ba28a1665cc0e8e70da - Sigstore transparency entry: 1823023835
- Sigstore integration time:
-
Permalink:
williampiat3/ElecSolver@b0a4516a2dba1cafed939dd8cb92f012102e6f1a -
Branch / Tag:
refs/tags/2.1.0 - Owner: https://github.com/williampiat3
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@b0a4516a2dba1cafed939dd8cb92f012102e6f1a -
Trigger Event:
release
-
Statement type: