View on GitHub

Circuit-solver

Imports a netlist, solves the circuit, and displays a circuit schematic

Circuit Solver

This is a web-based circuit simulator which reads a netlist as text (netlist.txt is a sample), solves the circuit for node voltages, and displays a schematic diagram for the circuit.
The nodes as mentioned in the netlist are shown as red circles. The voltage at a particular node is displayed when that node is clicked.

The circuit is solved using modified nodal analysis. The circuit may only contain ideal, independent, constant current and voltage sources, and resistors. I hope to include more features soon.

To run this circuit solver, click here. You may also download or copy-paste the contents of ckt_solver.html, save it with a .html extension, and open it in a web browser. You should see something like this-

drawing

Enter the netlist and click on the solve button. A circuit diagram is displayed. Now simply move the mouse pointer over the nodes and the voltages at those particular nodes will be displayed like so-

drawing

Refresh the page before trying again with a different netlist.


The arrangements of nodes is done in a circular manner, clockwise. This was chosen so that the number of crossing-overs would be minimized. However, this does not work satisfactorily when the number of nodes are large. Any other general configuration of nodes, on the other hand, would lead to a mess in the centre. Some smart way of arranging the nodes which takes into account the number of components attached to each node would be an improvement.