cimulate
cimulate is a Rust crate for modeling electrical components and circuits,
featuring Python bindings for easy integration. Combine components to create
complex circuits and perform simulations with built-in electrical elements.
Installation
Install the Python package via pip:
$ pip install cimulate
For Rust usage, include it in your Cargo.toml:
[dependencies]
cimulate = "0.2" # Replace with the current version
Example
from cimulate import Resistor, Capacitor, Inductor
import numpy as np
# Create components
r = Resistor(100) # 100 Ohms
c = Capacitor(1e-6) # 1 µF
l = Inductor(1e-3) # 1 mH
# Combine components in series (+) and parallel (/)
circuit = r + c / l
# You can calculate the impedance (remember to use angular frequency)
frequency = np.geomspace(0.001, 1000, 1000) # 1 mHz to 1 kHz
omega = 2 * np.pi * frequency
impedance = [circuit.impedance(w) for w in omega]
# You can even simulate voltages with a driving current
time = np.linspace(0, 60, 1000)
current = time / 6
voltage = circuit.voltage(current)
Release files for cimulate 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cimulate-0.2.1.tar.gz | 49.1 kB | Details |
Release files / cimulate-0.2.1.tar.gz
| Download URL | cimulate-0.2.1.tar.gz |
|---|---|
| Size | 49.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2e8efd80b088185e37d5d070814d34a2aca82569c0ffac68609a39b41895521b
|
|
BLAKE2b-256 checksum How to use checksums |
9a30bb0047936f434928ac1480541e6aee4f0a3504c0948dd0d8a2a1d2d527c3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.6
|