Mathematical simulation of the influence of ion-compensation, self-magnetic field and scattering on an electron beam during welding