In this paper we present numerical work we have done in electron beam transport and in free-electron-laser (FEL) simulation. We refer to the ONDINE1 experiment at Centre dEtudes Scientifiques et Techniques dAquitaine, where we used a helical wiggler, a guiding magnetic field, and a low-energy high-current electron beam (2 MeV, 1 kA). A brief description of the codes we have developed is given. Afterwards, we emphasize the effects of electron beam quality and space charge on FEL efficiency. The combined use of an electron beam transport code and a FEL code is a unique way to understand the difficulties encountered in such experiments, where the cathode was not immersed in the guiding field. Very good agreement has been found between experimental results and simulations. © 1994 The American Physical Society.