I am interested in simulators, especially in simulators of analogue circuits. Do you have any recommendations on where to start reading about algorithms that lie at the core of simulators?
Also, how was the experience developing such product with JS?
From a software developer perspective: lots and lots and lots of automated tests, each of which builds a circuit, runs a simulation, and makes sure we don't see any behavior regression. More lines of code in tests than in the core simulation engine or device models!
I have been using the falstad sim for years in the developement of analog synthesizer stuff. There are some circuits that work in practise that do not work in practise (e.g. relaxation oscillators with a schmitt-trigger inverter). The model oscillates, but it is not really controlable.
Outside of that most simpler stuff (e.g. analog math using opamps, discrete stuff) works perfectly fine. I love it for education and quick "sanity check" simulations.
As /u/compumike mentioned the core spice algorithm is an LU decomposition and solve of a large matrix. Not sure what a good resource these days would be; it's been many years since I worked on this.
The JS experience wasn't great. We used emscripten and the tooling barely worked for the simulator core. The rest of the app wasn't bad, but we used polymer / webcomponents which was a big mistake IMO
Library curation is a massive amount of work. Pretty much the reason I end up using falstad instead of a SPICE is because I end up spending all day tracking down and debugging issues with simulation models.
It's a full SPICE based simulator done entirely clientside