This simulation accompanies Chapter 2 of Vibe Coding for Engineers by Anil Bahuman
ACT 1: THE INVESTIGATION
1. The Bandra Substation Mystery
A traction power imbalance is detected in the Mumbai Metro Line. To prevent a cascade failure, we must find the current flowing through the far-right branch ($I_3$). Because the loops are coupled, a single KVL equation (Kirchhoff's Voltage Law) isn't enough.
Estimated I1?? A
Estimated I2?? A
Target I3?? A
2. The Reactance Transition
Watch how the grid stabilizes. At low inductance (left), the circuit is purely resistive ($R$), leading to thermal failure. As we increase the line's magnetic "inertia" ($L$), the Reactance triangle grows, choking the current to safe levels.
X_L (Reactance)0.000 Ω
Resulting I0 A
Grid StatusSTABLE
4. Interaction Singularity
When the coupling impedances ($R_2$ vs $R_3$) match perfectly, the system loses the ability to distinguish between sectors. This "Singularity" causes the GE solver to fail.
5. The Final Solve
[]
{I} =
[]
Sector A??
Sector B??
Metro I3??
Matrix ready. Isolating Metro current...
6. Engineering Takeaways
1Reactance is Protective: In 11kV grids, $X_L$ limits fault currents that would otherwise destroy $R$-dominant circuits.
2Condition Number: A stable grid must have distinct branch impedances. Symmetry leads to numerical (and physical) collapse.
3The Decoupling: GE allows us to see how much Sector A is "leaking" into the Metro line by zeroing out interaction terms.
4Accuracy: Scaling to realistic $\Omega$ values brings Metro currents into the 100-800A range.