# Patankar's algorithms for Numerical Heat Transfer and Fluid Flow

I am looking for the algorithm of Patankar (for example, SIMPLE, SIMPLER, SIMPLEC and PISO) written in Fortran for the simulation of heat transfer and fluid flow.

Probably the best thing is to use codes from a book by J.Ferziger and M. Peric "Computational Methods for Fluid Dynamics", available from Springer ftp site. site. There you will find F77 codes for 2D Navier-Stokes equations. I suggest starting from 2dc folder and pcol.f code which uses collocated variable arrangement, instead of staggered which was explained in Patankar's book.

Personally I think the Patankar's book appeared three years too early, and it therefore didn't include Finite Volume Method version using collocated variable arrangement enabled after introduction of Rhie-Chow interpolation in 1983. Also Patankar gives a sketch of what is vertex-based median-dual approach, also very important for unstructured meshes, and doesn't go into detail.

I think there is a need for a new book on FVM using general unstructured cells from the start and not using square cells that reduce calculations to something similar to finite differences.

My advice-learn from the codes above, and start reading papers as soon as possible. There are good papers explaining FVM for fluid flows in a comprehensive and modern way.

References that I recommend are:

1. S. Muzaferija and D. Gosman, Finite-Volume CFD Procedure and Adaptive Error Control Strategy for Grids of Arbitrary Topology, Journal of Computational Physics,138, pp.766-787 (1997) (discretization procedure, least-square cell-centered gradients, adaptive grids)

2. I.Demirdzic, S. Muzaferija, Numerical method for coupled fluid flow, heat transfer and stress analysis using unstructured moving meshes with cells of arbitrary topology, Comput. Methods Appl. Mech. Engrg, 125, pp.235-255 (1955) (both of these papers are written by CD-Adapco people)

3. D. Kim, H. Choi, A Second-Order Time-Accurate Finite Volume Method for Unsteady Incompressible Flow on Hybrid Unstructured Grids, JCP, 162, pp.411-428 (2000)

4. M.Darwish, I. Sraj, F. Moukalled, A coupled finite volume solver for the solution of incompressible flows on unstructured grids, JCP, 228, pp.180-201 (2009) (!!!)

5. F.-S. Lien, A pressure-based unstructured grid method for all-speed flows, Int. J. Numer. Meth. Fluids, 33, pp.355-374 (2000)

6. S.R. Mathur and J.Y.Murthy, A pressure-based method for unstructured meshes, Numerical Heat Transfer, Part B: Fundamentals, 31(2),pp.195-215 (1997) (Fluent people)

7. B. Basara, Employment of the second-moment turbulence closure on arbitrary unstructured grids, Int. J. Numer. Meth. Fluids, 44, pp. 377-407 (2004) (AVL-Fire\Swift developer)

8. H.Jasak, H.G.Weller and A.D.Gosman, High resolution NVD differencing scheme for arbitrary unstructured meshes, Int. J. Numer. Meth. Fluids, 31, pp. 431-449 (1999) (introducing Gamma differencing scheme for convection terms, OpenFOAM developers)

The list may extend to PhD theses. In OF community H. Jasak's PhD thesis is often cited and is a good reading.

• Any suggestions on good papers explaining FVM for fluid flows? Sep 4 '14 at 1:32
• I'll edit the answer to include some references. Sep 4 '14 at 6:47
• Thank you very much sir Johntra Volta for all the interest you have given to my question. I think that the book "Computational Methods for Fluid Dynamics" is very interesting for me. But, since I am a beginner in the field of simulation with Fortran 1990, what books can explain how to pass from the theory of FVM for fluid dynamics to the programmation in the Fortran and especially f90 ? Books in the kind of "Numerical Recipes in Fortran 90. The Art of Parallel Scientific Computing. by William H. Press, Saul A. Teukolsky, William T. Vetterling and Brian P. Flannery." Sep 5 '14 at 1:20

If you still need help, you can refer to this Github https://github.com/xuaoxiqi/Computational-Fluid-Dynamics

It has lid driven cavity flow solved using SIMPLE and is quite explanatory.