We investigated the asymptotics of two-dimensional steady solutions simulating the energy-conserving flow in a horizontal duct of finite depth in situations where the flow contains a region spanning the depth of the duct, and a region in which the fluid surface detaches from the ceiling of the duct as a free surface. These asymptotics are constructed using the local hydrostatic approximation, which generalizes the classical long-wave approximation. The initial (zero-order) asymptotics leading to the piecewise constant solutions are obtained from the mass, momentum, and energy conservation laws of the first approximation of shallow water theory. The first-order asymptotics for the liquid depth are constructed using the momentum conservation law of the Green–Nagdi model representing the second approximation of shallow water theory. It is shown that the continuous solution obtained from this asymptotics is in good agreement with the Wilkinson laboratory experiment [D. L. Wilkinson, “Motion of air cavities in long horizontal ducts,” J. Fluid Mech. 118, 109 (1982)] on modeling the energy-conserving steady flow predicted by the classical piecewise constant Benjamin solution [T. B. Benjamin, “Gravity currents and related phenomena,” J. Fluid Mech. 31, 209 (1968)].