Non-expert summaryThe use of a gas to purge a viscous liquid from a straight cylindrical pipe of finite length is investigated for the case where the liquid is viscoelastic. The rheology of the liquid is described using the Giesekus and the Phan-Thien-Tanner (PTT) models. The focus of the work is on the numerical aspects of the simulations. A parametric analysis is made in order to determine the effects of elastic and inertial forces, and the Newtonian viscosity, on the process.