The numerical simulation of fluid flow around the cylinders in in-line square configuration is done by using the overset grids method. In addition, the heat transfer between the cylinders and fluid is investigated.The effects of specific parameters including the spacing ratio and the mean Nusselt and strouhal numbers on flow pattern and the rate of heat transfer are investigated. Also, the critical spacing ratio which flow pattern transition occurs, is specified.The flow regime is laminar and the fluid is incompressible. The Reynolds number is 100 and 200 and the Prandtl number is 0.7 and 7. The obtained results show that the flow structure is strictly affected by the spacing ratio. The spacing ratio of L/D=3.5 is considered as critical spacing ratio. By comparison of vorticity and isotherm contours, it is observed that the isotherm contours follow the flow structure. In addition, the analysis of the Nusselt numbers at different spacing ratio reveals that the heat transfer rate from the cylinders increases by increasing the spacing ratio especially for the downstream cylinders. In the case of two dimensional modeling, an increase in the Reynolds number from 100 to 200 leads to an increase between 35% and 100% in the heat transfer rate. By increasing the Prandtl number from 0.7 to 7.0, the heat transfer rate increases between 130% and 220%. The difference between the maximum and minimum Nusselt numbers due to change the spacing ratio is between 2% and 5% for the upstream cylinders and between 30% and 40% for the downstream cylinders.In the case of three dimensional simulation, the effect of cylinder height on the flow pattern and heat transfer rate is investigated. Overall trend of variation of force coefficients and Strouhal and Nusselt numbers according to mentioned parameters is almost similar for two and three dimensional simulations. But the noticeable quantitative difference is observed between the results of 2D and 3D modeling. In order to study three dimensional effects, three dimensional results are compared with two dimensional results. It is observed that the drag coefficients change about 20% in some cases. Also comparing the Strouhal numbers in 2D and 3D modeling shows that the Strouhal numbers can change about 5% because of three dimensional effects. For mean Nusselt numbers, the variation for 2D and 3D modeling especially at Pr=0.7 is slight. Therefore, it can be concluded that for Reynolds number of 200 and higher, 2D modeling of fluid flow around circular cylinders is not efficient and 3D modeling is needed. For computing the heat transfer rate at low Prandtl numbers, applying 2D modeling is justified but at high prandtl numbers because of increasing three dimensional effects, 2D modeling is not justified. Keywords: drag and lift coefficients, forced convection heat transfer, Nusselt and Strouhal numbers, Vortex shedding frequency.