Realtime interactive simulator library

Thread Starter

ilit

Joined May 28, 2013
3
Hello.

I am a simple hobbyist open source coder asking for advice what simulation engine\library could I use for a toy program.

What I am trying to do:
Code a toy application simulating very basic circuits using external simulation engine with realtime interactive simulation flow, not precalculated. Like Falstad sim but without that many elements.

Application and engine simplifications:
) A toy only, not a tool for even basic circuit prototyping.
) Calculation accuracy is not a priority.
) Low element types count.

Requirements for simulation engine\lib:
) Realtime interactive simulation. Install and place elements on the fly while simulation proceeds.
) Atleast free for usage lisence. Open source is not required.
) API.
) Time scaling atleast somewhat near real world time. Like 100, 200 or more simulation milliseconds elapse for 1 real world second.*
* Falstad sim lags with this. Increasing "Time step size (s)" from 5u to something like 300u plus inreasing "Simulation Speed" scroll bar chokes performance with somewhat average sized simple circuits.

What I have tryed to do:
) Google a lot.
) Read shallow info about simulators i've stumpled upon. SPICE based mainly for sure.
) Refactor falstad sim. 3k code lines at CirSim class and 1k code lines at parent CircuitElm class is too time consuming to clean up.
) Cut out falstad sim GUI code. At that point I understood that its performance is not sufficient.

What i do not understand:
Simulation modes for SPICE. Its purposes and applicability for such a toy.
Is it appropriate to start some SPICE Trancient analisys for 100ms or so, process this information, maybe actively change circuit topology, simulate for another 100ms step and so on? I did no research about that.

What i can not do:
Code simple engine myself. I'm neither a mathematician nor a phisicist. That would be too time consuming, bugged and slow executing.

Similar programs:
) http://www.falstad.com/circuit/
Open sourced code with unknown lisence. Copyrighted. Unmaintainable unreadable codebase. Low performance.
) Proprietary EveryCircuit. Developed their own sim engine from scratch. Developers had experience in commercial simulators programming. Now porting app to other platforms plus new functionality.
https://play.google.com/store/apps/details?id=com.everycircuit.free
) Proprietary iCircuit. Could not get in contact. Somehow connected with Paul Falstad.
http://icircuitapp.com/

I'm not used to ask for advice. I prefer search and read. But now i'm kind of desperately stucked.
Any advices are okay. Most of you educated guys know much more about this than me for sure.

Back in 2011 there was great topic. Rapidcoder have been developing suitable simulation program. But there is no program name or company mentioning. I cant send PM for now due to something like insufficient forum priviligues or activation.
http://forum.allaboutcircuits.com/showthread.php?t=48686

Keywords: realtime interactive always running circuit engine library
 

MikeML

Joined Oct 2, 2009
5,444
Maybe you could put a second-layer interface shell around LTSpice, but you should talk to Mike Englehart at Linear.com before proceeding.
 
Top