Abstract. Foams, gels, emulsions, polymer solutions, pastes and even cell assemblies display both liquid and solid mechanical properties. On a local scale, such "soft glassy" systems are disordered assemblies of deformable rearranging units, the complexity of which gives rise to their striking flow behaviour. On a global scale, experiments show that their mechanical behaviour depends on the orientation of their elastic deformation with respect to the flow direction, thus requiring a description by tensorial equations for continuous materials. However, due to their strong non-linearities, the numerous candidate models have not yet been solved in a general multi-dimensional geometry to provide stringent tests of their validity. We compute the first solutions of a continuous model for a discriminant benchmark, namely the flow around an obstacle. We compare it with experiments of a foam flow and find an excellent agreement with the spatial distribution of all important features: we accurately predict the experimental fields of velocity, elastic deformation, and plastic deformation rate in terms of magnitude, direction, and anisotropy. We analyse the role of each parameter, and demonstrate that the yield strain is the main dimensionless parameter required to characterize the materials. We evidence the dominant effect of elasticity, which explains why the stress does not depend simply on the shear rate. Our results demonstrate that the behaviour of soft glassy materials cannot be reduced to an intermediate between that of a solid and that of a liquid: the viscous, the elastic and the plastic contributions to the flow, as well as their couplings, must be treated simultaneously. Our approach opens the way to the realistic multi-dimensional prediction of complex flows encountered in geophysical, industrial and biological applications, and to the understanding of the link between structure and rheology of soft glassy systems.