EL-SPICE
Efficient Language - Simulation Program with Integrated Circuit Emphasis
pip install elspice
EL-Spice is efficient-language based analog electronic circuit simulator. The simulated circuit is created from an expression, then required mathematical operations are applied. Overall, simulation is done. The lingual expression is a geometric code, describes an edge connected to points, which component lies in the edge and what is SI unit magnitude associated with the component. For example:
(0,0) (0,1) R 5M;
This means that a 5 MΩ resistor is connected between points (0,0) and (0,1). Points are not necessarily 2D, it can be in any dimension. Each identifier follows each other by a space. Each component follows the other by a semicolon(;)
(0,0) (0,1) I 2m;(0,1) (1,1) R 1K;(1,1) (0,0) R 2K;
This time, a current source of 2mA is connected with two resistors; one them is 1KΩ, other is 2KΩ. Wires don't have any parameter.
(0,0) (0,1) -;
In summary, all components and usage scheme is listed below:
(0,0) (0,1) -;
(0,0) (0,1) V 5;
(0,0) (0,1) I 2.3m;
(0,0) (0,1) R 3.3M;
(0,0) (0,1) C 4.7p;
(0,0) (0,1) L 3.4u;
RLC Circuit(ω=107)
(1,0) (1,1) V 5;(1,1) (0,1) C 2n;
(0,1) (0,0) L 5u;(1,0) (0,0) R 5;
Usage
- Firstly define your circuit with
circ = elspice.Circuit(D)where D is number of dimensions. - Create a string of circuit expression with the efficient language and AC frequency. If the circuit is DC, then just write 0 or nothing, it is default to 0.
circ.decode(string_of_circuit, frequency) - Get node voltages by calling
circ.nodes() - You can export each node voltage
circ.node_voltages(). It returns an array and a dictionary describes that which index of array is which node.
Overall
import elspice
circ=circ = elspice.Circuit(D)
string_of_circuit="""(1,0) (1,1) V 5;(1,1) (0,1) C 2n;
(0,1) (0,0) L 5u;(1,0) (0,0) R 5;"""
circ.decode(string_of_circuit, 1591549.430)
circ.nodes()
Output
Node Voltages:
(1, 0): 0V 0°
(1, 1): 5.0 V -1.3232932312128532e-46 °
(0, 1): 50.24937807687795 V 84.28940752087149 °
(0, 0): 4.999999999999999 V 6.616466159068361e-07 °
Metadata
Release files for elspice 0.0.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 | Provenance | Actions |
|---|---|---|---|---|
| elspice-0.0.1.tar.gz | 4.4 kB | Without provenance | Details for elspice-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| elspice-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for elspice-0.0.1-py3-none-any.whl |
Total release size: 9.0 kB
Release files / elspice-0.0.1.tar.gz
| Download URL | elspice-0.0.1.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5a725ad877c1b5b787501650c1038932a55036cf9eeb1c6db4771556bffdb085
|
|
BLAKE2b-256 checksum How to use checksums |
632b528e25f0f92a13b407ffdd1ea87b1af9502340d85836c83dedd00dea0a3c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10
|
Release files / elspice-0.0.1-py3-none-any.whl
| Download URL | elspice-0.0.1-py3-none-any.whl |
|---|---|
| Size | 4.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4642a936d2c7e3092b4650e3d756c0bad0ca1c070693e18ac8b07d00c0712ee2
|
|
BLAKE2b-256 checksum How to use checksums |
a1d291a3f8470d3753e617da3592d7df8388890f9c80d497c8c7db6632097052
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10
|
Security for elspice 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.