Circuit-based Electromagnetic Transient Simulation