We present a numerical study of a quasistatic evolution problem for a system of partial differential equations modelling the thermomechanical behaviour of a direct chill (DC) or electromagnetic (EMC) casting of aluminium. It is a quasistatic evolution problem of a three-dimensional elastic-viscoplastic solid with contact. This model can be used to predict and assess the most fundamental variables in the casting process: casting speed, alloy composition, cooling conditions, mould shape, ... To solve the discrete problem at each time step, we propose a discretization by a tetrahedral finite element method and an iterative algorithm. At each iteration, one must solve a linear elasticity problem. To validate the proposed algorithm it has been applied to some test examples with known analytical solutions. Finally, we present the results of calculations corresponding to a real industrial casting process.