The paper is devoted to the mathematical modelling of a beam injected into an open magnetic trap in the diamagnetic mode. The two-dimensional axially symmetric hybrid numerical model with the kinetic approximation for the ion component of the plasma and the MHD approximation for magnetized electrons is used. In the numerical experiments, the possibility of formation of the cavity in the magnetic field was shown. A detailed study of the evolution of the ion beam continuously injected into the trap is done, the dependencies on time, moment of injection and beam temperature are presented. The obtained results may be used for the data analysis of the laboratory experiments in open magnetic systems.