In this paper, cavity flow is simulated numerically. Forced convection in different Reynolds numbers between 100 and 5000 is simulated. Different and complex thermal boundary conditions are applied and various parameters are calculated numerically. Up and down walls are in constant temperature and left and right walls are thermal insulation in the first thermal boundary condition. The Left and the down walls are in constant temperature and the temperature of the up and the right walls changes linearly in the second thermal boundary condition. For the third thermal boundary condition, the left and the down walls are in constant temperature and the temperature of the up and the right walls changes sinusoidally. For this purpose, a code is written in the FORTRAN software. Streamlines, isotherms, local and mean Nusselt number are obtained and shown in different figures and one table. Grid independence is surveyed and some obtained results are validated with other researchers' work. In these simulations, the Prandtl number is considered to be 0.71 because of the air's Prandtl number. For time discretization, a fifth-order Runge-Kutta is used and for convective fluxes, the averaging scheme with fourth-order damping term is used.