A Spice implementation of lightning induced overvoltages on power systems