Numerical investigation of flow structure and temperature distribution of cavities with different shapes