Wall functions are extensively applied in engineering simulations with turbulence. They facilitate a significant increase in the scale of the grids next to the wall, which in turn reduces the total number of grids needed. This optimization enhances computational efficiency, making the simulation process more effective and streamlined. However, the current commonly used wall functions, such as the Spalding wall function, are an implicit expression that needs to be solved iteratively, which affects the computational efficiency, and the multilayer segmented wall function is not smoothly articulated, which affects the fidelity. In this study, based on flat plate direct numerical simulation (DNS) data, combined with structural ensemble dynamics theory, the de-thresholding Douglas–Peucker algorithm is introduced to construct an explicit wall function expression in the form of multilevel power exponential concatenated multiplication. The comparison of the new wall function against DNS data reveals that it demonstrates superior fitting accuracy in contrast to the traditional ones, and eliminates the need for manual calibration, reduces subjective influence, and enhances reliability. The numerical simulation outcomes for the flat plate boundary layer and a series of airfoils showcase the new wall function's exceptional accuracy, which not only meets but also surpasses the demanding standards of engineering practice.