Numerical simulation of the residual charge of vacuum interrupters