We present an efficient multimodal method to describe the acoustic propagation in the presence of a uniform flow in a waveguide with locally a wall impedance treatment. The method relies on a variational formulation of the problem, which allows to derive a multimodal formulation within a rigorous mathematical framework, notably to properly account for the boundary conditions on the walls (being locally the Myers condition and the Neumann condition otherwise). Also, the method uses an enriched basis with respect to the usual cosine basis, able to absorb the less converging part of the modal series and thus, to improve the convergence of the method. Using the cosine basis, the modal method has a low convergence, 1/N, with N the order of truncation. Using the enriched basis, the improvement in the convergence is shown to depend on the Mach number, from 1/N 5 to roughly 1/N 1.5 for M = 0 to M close to unity. The case of a continuously varying wall impedance is considered, and we discuss the limiting case of piecewise constant impedance, which defines pressure edge conditions at the impedance discontinuities.