COnvrg sub.f90 - calculationg
From CFD-Wiki
Subroutine Convergence_Criteria(NF)
include 'icomm_1.f90'
Dimension Res(nx,ny)
res = 0.
Res_Sum = 0.
Res_vol = 0.
Do 20 I=2,NXmaxP-1
Do 20 J=2,NYmaxP-1
Res_vol = Ap(i,j) * F(i ,j ,nf) - &
( As(i,j) * F(i ,j-1,nf) + &
An(i,j) * F(i ,j+1,nf) + &
Aw(i,j) * F(i-1,j ,nf) + &
Ae(i,j) * F(i+1,j ,nf) ) & - Sp(i,j)
res(i,j) = Res_vol
Res_Sum = Res_Sum + Res_vol
20 continue
write(*,*)Res_Sum
Return
End