Simulation of pseudospark discharge and the transportation of the generated electron beam