Abstract: It is well known that any viscous fluid flow near a corner consists of infinite series of eddies with decreasing size and intensity, unless the angle is larger than a certain critical angle [H. K. Moffat, J. Fluid Mech., 18 (1964), pp. 1-18]. The objective of the current work is to simulate such infinite series of eddies occurring in steady flows in domains with corners. The problem is approached by high-order finite element method with exponential mesh refinement near the corners, coupled with analytical asymptotics of the flow near the corners. Such approach allows one to compute position and intensity of the eddies near the corners in addition to the other main features of the flow. The method was tested on the problem of the lid-driven cavity flow as well as on the problem of the backward-facing step flow. The results of computations of the lid-driven cavity problem show that the proposed method computes the central eddy with accuracy comparable to the best of existing methods and is more accurate for computing the corner eddies than the existing methods. The results also indicate that the relative error of finding the eddies' intensity and position decreases uniformly for all the eddies as the mesh is refined (i.e., the relative error in computation of different eddies does not depend on their size).