Computation of power system transients