Modelling of a two-dimensional magnetohydrodynamic problem