Numerical simulation of compressible viscous flow through cascades of profiles