pfalstad / circuitjs1

Electronic Circuit Simulator in the Browser
GNU General Public License v2.0
1.65k stars 280 forks source link

Some additions to INTERNALS, expanding on core concepts. #19

Closed Mervill closed 2 years ago

Mervill commented 2 years ago

I've been following this project for a number of years, and I thought I'd finally start contributing by first expanding on the INTERNALS doc.

The first addition adds a forward that fully cites Pillage, et al as the original source material for the simulation. The book is difficult to come by easily, so I've also called out an introduction to Modified Nodal Analysis that I found freely on the internet here.

The beginning of the Internals section is now a breakdown of the core matrix equation and its elements. I know this equation is more correctly expressed as Ax=B but I chose to write it in the form X = A⁻¹B since it describes the process the code actually uses.

The second major addition is the Program Loop section, which is a first stab at sketching out the most important functions and the relationships between them. The main file is pretty large and I think calling out the main functions in this doc will help newcomers orient themselves inside the source code. This section copies some text from the earlier sections where relevant.

Going forward I'd like to add more to the Program Loop section, as well as clarify and expand on the existing text.

pfalstad commented 2 years ago

Thanks!