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:
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)
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)
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)
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) (!!!)
F.-S. Lien, A pressure-based unstructured grid method for all-speed flows, Int. J. Numer. Meth. Fluids, 33, pp.355-374 (2000)
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)
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)
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.
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.