A simulation model for electromagnetic transients in lightning protection systems