The paper considers the method of averaging over a movable liquid control volume for some problems of fluid mechanics. The authors study the process of obtaining a solution for the problem of fluid flow with different configurations along the cross section of a pipe with a filled porous medium, as well as flow in an open-flow channel. Obtaining an approximate analytical solution based on a movable control volume is described. The well-known control volume method used in numerical analysis is used considering its displacement. The method of displacement makes it possible to obtain an analytical representation of the solution of the problem under consideration. At the same time, obtaining an analytical solution method is achieved by averaging the equation describing the flows over the control volume. Based on the obtained solution in the limit, we obtain solutions to the problem without considering porous media, and with different pipe cross-sections (flat, round, ellipsoidal and rectangular). With certain configurations of the pipe section, an exact solution is obtained.