# Electronic Circuit Simulator API/Libraries

Are there any Electronic circuit simulator libraries/API that I can use to construct virtual circuit simulators like SPICE etc? My main research area is not Electronic simulation since I'm a Computer science undergrad so I have to give priority to Software Engineering aspects.

thanks

-
Your main research area is "no thanks"??? –  AndrejaKo Sep 16 '11 at 8:08
sorry. :) didn't notice it. My main research area is not Electronic simulation since I'm a Computer science undergrad so I have to give priority to Software Engineering aspects. –  coder9 Sep 16 '11 at 11:44
I haven't seen an API for SPICE, but you might want to check out the source of ngspice and tclspice, or talk to their developers. –  Oli Glaser Sep 16 '11 at 14:48

ummm spice does not really need an api ..... spice simulation file looks something like this

LPFILTER.CIR - SIMPLE RC LOW-PASS FILTER
*
VS  1   0   AC  1   SIN(0VOFF 1VPEAK   2KHZ)
*
R1  1   2   1K
C1  2   0   0.032UF
*
* ANALYSIS
.AC     DEC     5 10 10MEG
.TRAN   5US  500US
*
* VIEW RESULTS
.PRINT  AC  VM(2) VP(2)
.PRINT  TRAN    V(1) V(2)
*
.PROBE
.END


everything is driven by text files in the background and these files are passed to a pspice exe that normally does the rest. The spice engine itself is available with a BSD license so you can tweak it yourself.

Most commercial offerings offer schematic entry, parts libraries and output plotting options.

You can do away with this be passing in a netlist file with the simulation details to an spice engine and get back a text file of results.

So no real apil just a command line driven app. Of course you can get the source code and compile it into you own application.

check out wikipedia for more details.

-
thanks for the reply. You mean that for instance, I can get potential difference automatically calculated between a particular device, after giving circuit setup structure details into the spice? –  coder9 Sep 17 '11 at 10:18
yes you can - but garbage in garbage out - you have to know the electronics circuits (or math representation) you are trying to calculate to write the netlist, and include the correct analysis - in this case dc bias, it should spit out the answer for you –  smashtastic Sep 17 '11 at 22:21
How can I get simulation results after writing the input text file? would you be interested in a related freelance project for android? –  simo Sep 10 at 14:29