CLOSED — charging
Moving charge (current) Magnetic field lines

RL Circuit: Self-Inductance & Current Transients (2D)

Every real coil — a motor winding, a relay, a transformer, a solenoid — resists sudden changes in current because of its own self-inductance. This 2D circuit-diagram simulator numerically integrates the RL transient frame-by-frame: close the switch and the current climbs toward V/R along the exponential curve I(t) = (V/R)(1 − e^(−tR/L)); open it and the coil's collapsing magnetic field drives the same current back down to zero. Tune the voltage, resistance and inductance to see the time constant τ = L/R stretch or compress the transient live, watch charge markers move around the loop at a rate proportional to the instantaneous current, watch the field lines around the coil grow and collapse with it, and read the inductor voltage V_L = L·dI/dt and stored energy U = ½LI² update in real time — exactly the physics behind why switching off an inductive load without a flyback diode can spike the voltage.