Simulation of transient phenomena in power systems, including switching and lightning surge analysis, and insulation coordination