I was checking the cs_user_extra_operations-energy_balance.f90 file and I noticed a problem in that file.
It is using the following code to compute reconstructed value in boundary cells.
Code: Select all
! - Compute reconstructed value in boundary cells
do ifac = 1, nfabor
iel = ifabor(ifac)
treco(ifac) = cvar_scal(iel) &
+ diipb(1,ifac)*grad(1,iel) &
+ diipb(2,ifac)*grad(2,iel) &
+ diipb(3,ifac)*grad(3,iel)
enddo
The problem is that why it uses treco(ifac) instead of treco(iel)?
The ifac is just a number from 1 to the number of selected faces and it does not specify the cell which the calculated variable belongs to.
But iel is the id of cell that specifies the exact cell which the calculated variable belongs to.
So in post processing, the computed parameters are on wrong cells.
Is there any reason or the written code is incorrect?
Regards,
Mohammad