ARTICLE AD BOX
I am building a browser-based electrical training simulator in JavaScript. The goal is to simulate industrial control circuits (contactors, overloads, push buttons, and three-phase motors) and allow users to interact with the circuit using tools like: Multimeter (voltage and resistance), Clamp meter (current measured on a specific wire), etc.
The user only sees graphical components and wires not a schematic or netlist.
I am unsure about the correct internal representation of the circuit in javascript. Most resources suggest modeling circuits as graphs:
Nodes = electrical nodes
Edges = components
However, in my application the user manipulates physical wires, and I need to know: where wires connect which wire a clamp meter is attached to current flowing through that specific wire
So I am trying to understand whether I should maintain: A visual graph representing wires and routing A separate electrical graph for simulation Or a unified structure
Is it correct that wires should collapse into a single electrical node during simulation (SPICE-style netlist generation)?
How do simulators typically map a physical wire in the UI to a measurable current if wires themselves are not elements?
Is Modified Nodal Analysis (MNA) the correct approach for AC three-phase motor circuits in a browser environment?
For clamp-meter behavior, is the correct approach to associate the wire with a branch current of a connected element rather than computing current in the wire itself?
Are there recommended architectures or open references for separating: visual wiring representation electrical solving model?

