Home SPICE
Post
Cancel

SPICE

1
2
3
4
5
6
7
8
9
10
BRIDGE-T CIRCUIT
*
VBIAS 1 0 12
R1 1 2 10
R2 2 0 10
R3 2 3 5
R4 1 3 5
*
.OP
.END
1
2
3
4
5
6
7
ngspice
source bridge.ckt
listing
op
print v(1)
print all
quit

by default the current flowing from the positive terminal to negative terminal is positive current.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
SPICE title card
x1 1 2 pvcell
x2 2 0 pvcell
x3 1 3 pvcell
x4 3 0 pvcell
iload 1 0
.subckt pvcell 1 3
rs 1 2 0.01
isc 3 2 1.5
d1 2 3 pnjunc
rp 2 3 5
.model pnjunc d is=1e-9 vj=0.65
.ends pvcell

.dc iload 0 3 0.01

.control
run
plot v(1)
.endc

.end
1
2
ngspice
source 1.ckt

TED

1
2
3
4
5
6
7
8
9
10
11
# run a specific test
pytest -s -vv some_file.py::test1

# run all tests in a file
pytest -s -vv some_file.py

# run all tests inside a directory
pytest -s -vv some_dir

# run in parallel
pytest -n 5 -s -vv some_dir
This post is licensed under CC BY 4.0 by the author.