A numerical method for calculation of internal flow in turbomachinery was developed. Firstly, the sub-block unstructured grid generation method was proposed. The complex multiple-connected flow domain was divided into several simple single-connected sub-blocks, and then each sub-block was discretized into body-fitting meshes, finally, each sub-block grid was united to form a whole grid, whose topological connection information was saved by unstructured grid manner. The sub-block unstructured grid not only has the advantage of unstructured grid in dealing with the complex domain, but also avoids the disadvantage of multi-block grid in treating the complicated flow field variable transfer on the interface between sub-blocks. Secondly, a three-dimensional compressible semi-implicit method for pressure linked equation (SIMPLE) algorithm on sub-block unstructured grid was developed by introducing the density correction term in the pressure correction equation. Finally, the proposed methods were used to numerically solve the flow fields around an isolated airfoil and in a turbine cascade. The accuracy of the method was validated by the good agreement between the numerical results and the experimental data. This work is of theoretical significance and applicable value to develop the numerical method for solving the complicated internal flow in turbomachinery.