A numerical simulation of Trichel-pulse formation in a negative corona