A numerical study on the tidal residual flow