In order to develop a wall function boundary condition for high-speed flows so as to reduce the grid-dependence of the simulation for the skin friction and heat flux,a research was performed to improve the compressible wall function boundary condition proposed by Nichols.Values of parameters in the velocity law-of-the-wall were revised according to numerical experiments and the expression of temperature law-of-the-wall was modified based on theoretical analysis and numerical simulation.Besides,the formula of the heat conduction term in near-wall region was derived so that the coupling between the wall function boundary condition and CFD code was realized more accurately.Whereafter,the application study of the modified wall function was carried out.The numerical case of supersonic turbulent boundary layer on a flat plate illustrated that the modified wall function produces reasonable results of skin friction and heat flux,and profiles of velocity,temperature and turbulent eddy viscosity for coarse grids with the initial wall spacing of y+<400,and that the modifications to the original wall function can obviously improve the simulation precision.As for the application of separation flows,it was found from the numerical cases of supersonic cavity flow and hypersonic axisymmetric compression corner that the compressible velocity law-of-the-wall originally established based on the fully-developed attached turbulent boundary layer approximately holds in the near-wall region inside the separation flows,which ensures that reliable skin friction and heat flux can be given by the wall function inside the separation flows,while for the region near separation and reattachment points,the wall function gives results with a relatively large error,because the velocity law-of-the-wall used in the wall function takes on obvious deviation from the real velocity profiles near the separation and reattachment points.