No residuals tracking but calculation keeps running

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Axel Cablé

Re: No residuals tracking but calculation keeps running

Post by Axel Cablé »

Thanks for the info, seems to be working now. However, when checking the listing file, I saw this:

 ** FORTRAN WORK ARRAYS MEMORY USED
     -------------------------------

       191164 INTEGERS NEEDED: MAXIMUM REACHED IN TRIDIM
     4576320 REALS    NEEDED: MAXIMUM REACHED IN MEMNAV

Where can I correct this? Thanks.
Alexandre Douce

Re: No residuals tracking but calculation keeps running

Post by Alexandre Douce »

It is an information, not something to be corrected.
If you wish to adjust the memory usage more precisely than the automatic procedure,  you have to use the GUI, heading "Memory Management".
James McNaughton

Re: No residuals tracking but calculation keeps running

Post by James McNaughton »

In a follow up to the residuals tracking I am trying to print these at each time step using the DERVAR array. DERVAR(3) - DERVAR(7) is listing the derived residual for u, v, w, k, e / w respectively but DERVAR(2) is not the pressure, although it is close to that in the listing. Is the pressure residual stored in a separate array or is it manipulated in a manner before being outputted to the listing file?
David Monfort

Re: No residuals tracking but calculation keeps running

Post by David Monfort »

Hello James,

Actually what we call "derive" in Code_Saturne in somewhat complicated... and may be a remaining of development verification.

For all the convected variables (so everything except pressure), the derive stands for the following expression and may be used as a criterion to see the convergence of a steady calculation (though a true residual would perhaps be better).
dervar(ipp) = || [u(n+1) - u(n)] / "time step" ||² / "total volume" with ||.|| being the L2 norm
On the contrary, for the pressure, the derive stands for a ratio between the divergence of "predicted velocity field + Rhie & Chow filter" and the divergence of "predicted velocity field". So, I strongly advise you to not take into account this number!
dervar(ipp) = || div(rho.u*) + RC ||² / || div(rho.u*) ||   with  ||.||  being the L2 norm and RC the Rhie & Chow filter
As you can see, this is completely different... and quite complex ;-)

Hope this helps !

David

ps : to understand the calculation of the derive, you can have a look at the ecrlis.f90 subroutine ("preduv.f90 + resolp.f90" for the pressure)
Axel Cablé

Re: No residuals tracking but calculation keeps running

Post by Axel Cablé »

Hi David,

Just for information, does the "derive" variable for Pressure have a physical meaning?

Thanks
David Monfort

Re: No residuals tracking but calculation keeps running

Post by David Monfort »

Hi Axel,

I would answer no. This is definitely numerical information that gives the "weighting" of the Rhie & Chow filter. It actually has nothing to do we a so-called "derive"; it's more something for developers...

David
Post Reply