The numerical simulation of the dynamics of a liquid with solute of high concentration in two horizontal layers of a porous medium with different permeability coefficients is carried out. The dynamics of the solute is modeled within the framework of a nonlinear MIM model that takes into account the adhesion and separation process at the skeleton of a porous medium. The modeling was carried out in a two-dimensional setting. The mobile (moving together with the carrier fluid) and immobile (deposited on the skeleton) phases are modeled by the finite volume method with adaptive mesh refinement algorithm. At each point in space, functions of volumetric saturation are set, and a kinematic equation is solved that describes the dynamics of adhesion and separation. The effective permeability of a porous medium depends on the saturation function of the immobile phase and is calculated using the Kozeny-Karman formula. The obtained numerical data are compared with the results of a linear analysis of stability, and the nonlinear regimes of concentration convection and the distribution of impurities at high supercriticalities are studied. In the case of high ratio of permeability coefficients of upper and lower layers, convection occurs locally in a more permeable sublayer, even with a decrease in its thickness. With an increase in supercriticality the penetration of the convective flow into the poorly permeable sublayer and the transition from local convection to large-scale convection are observed.