Modelling of the Transient Diffusion of Current and Heat in Railguns via an Equivalent Network