Abstract: A technique for setting boundary conditions on solid surfaces based on the method of near-wall functions is presented. The technique is based on solving the Reynolds-averaged Navier-Stokes equations with the Spalart-Allmaras (SA) closure model in the boundary layer approximation. The obtained solution is used to formulate flow boundary conditions that compensate the insufficient mesh resolution of the boundary layers. For a simplified system of equations, discretization is performed and a solution algorithm is constructed. A parallel software implementation of the method is carried out in a finite-volume computational code. Based on the test cases, which are canonical turbulent flows, a series of calculations are carried out to demonstrate the capabilities of the developed technique. Recommendations and limitations related to the practical application of the proposed technique are developed. © 2021, Pleiades Publishing, Ltd.