mirror of
https://git.code.sf.net/p/ngspice/ngspice
synced 2026-09-04 19:10:57 +02:00
running in parallel on a multi-core machine (12 min execution time on a i9 9900, ngspice compiled with gcc, debug mode enabled. Linux with Valgrind and Parallel are required.
21 lines
277 B
SourcePawn
21 lines
277 B
SourcePawn
* func_cap.sp
|
|
|
|
|
|
.func icap_calc(A,B,C,D) '2*A*sqrt(B*C*D)'
|
|
|
|
.param cap_val = 'max(icap_calc(1,2,3,4))'
|
|
VDD 1 0 DC 1
|
|
C1 1 0 'cap_val'
|
|
|
|
.measure tran capacitance param='cap_val'
|
|
.measure tran capac2 param='max(icap_calc(1,2,3,4))'
|
|
|
|
.tran 1ps 100ps
|
|
|
|
.control
|
|
run
|
|
quit
|
|
.endc
|
|
|
|
.end
|