Capacitor instantaneous short-circuit current calculation