Numerical study on natural convection in three-dimensional rectangular enclosures