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é

No residuals tracking but calculation keeps running

Post by Axel Cablé »

Hello,

I am importing my mesh in .neu format and trying to run a basic steady isothermal flow calculation on Code_Saturne 1.3.3. The preprocessor imports my mesh correctly but when I run the calculation and try to track the residuals by opening the listing file in the tmp_Saturne/ directory, all I see is this at end of the file:


MAIN CALCULATION
================

***************************************************************

***************************************************************

INSTANT 0.100000000E+01 TIME STEP NUMBER 1
=============================================================

--- Phase: 1
---------------------------------
Property Min. value Max. value
---------------------------------
Masse vo 0.1179E+01 0.1179E+01
Visc. la 0.1830E-04 0.1830E-04
visc. tu 0.8960E-01 0.8960E-01
---------------------------------
** INFORMATION ON BOUNDARY FACES TYPE
----------------------------------
Phase : 1
-------------------------------------------------------------------------
Boundary type Code Nb faces (tot/loc) Min index Max index
-------------------------------------------------------------------------
Entree 2 1178 663 1 663
Paroi lisse 5 6900 1636 664 2299
Paroi rugueuse 6 0 0 2300 2299
Symetrie 4 0 0 664 663
Sortie libre 3 1178 0 664 663
Indefini 1 0 0 1 0
-------------------------------------------------------------------------


However, I get no error message and the calculation keeps running (infinitely it seems). Would you know what could be the problem? Is there another way to track the residuals?

Thanks,

Axel Cablé
Jean Deschodt

Re: No residuals tracking but calculation keeps running

Post by Jean Deschodt »

The residuals are displayed in the listing, but your calculus stops before to  print them :|

Does your calculus run on several CPU ? Do you use user subroutines ?

Your Time step is set to 1 sec. It's big but it depends on your cell's size of course. Is it OK with this value and a reasonable CFL number ?
Axel Cablé

Re: No residuals tracking but calculation keeps running

Post by Axel Cablé »

Thanks for your answer Jean. I finally found the problem, I used to run my calculation on 2 nodes of 4 processors, I tried with 1 node and 8 processors and it works fine now.

About the time step, I'm running a steady-state calculation. So what does the "iterations number" entry mean? (in Steady Management folder). Should I just leave "1" here and it will run as many iterations as needed to obtain sufficiently small residuals?
Jean Deschodt

Re: No residuals tracking but calculation keeps running

Post by Jean Deschodt »

No, unfortunately Code_Saturne has no automatic stop when the residuals you want are reached in the frame of the steady state algorithm. So you have to set a number of iterations, and after the run, you have to check if the convergence is OK. If not the calculation must be restarted.

Warning: I am not sure, but I understand in the listing that "derive" means the variation of a variable between to iterations, and that "Norm. residual" is related to the convergence of the iterative solver. Therefore, in order to control if Code_Saturne has reached a steady state, I believe that one does check the "derive" in the listing.

Perhaps the development team can confirm (or not!) this affirmation?
David Monfort

Re: No residuals tracking but calculation keeps running

Post by David Monfort »

Jean is right, indeed!

You can consider the derive as the relative difference between two iterations, basically (not completely exact though...):
derive = |u(n+1)-u(n)|/|u(n)|
Axel Cablé

Re: No residuals tracking but calculation keeps running

Post by Axel Cablé »

Thanks, this is some very helpful information. What is the usual convergence criterion for "Norm. residual" and "derive"? Around 10-5, 10-6? (studied case deals with air diffusion in rooms)
Jean Deschodt

Re: No residuals tracking but calculation keeps running

Post by Jean Deschodt »

In the GUI there is a parameter "Solver precision" (heading Equation parameters). The solver has converged when "Norm. residual" < "Solver precision". By default the value of "Solver precision" is 10 -8 . I think it is to low. A more commonly used value is 10 -5 (for all variables) and calculus are faster.

See http://code-saturne.org/forum/viewtopic.php?f=9&t=670
 
For me the "derive" is not a convenient criterion to evaluate the convergence. I personally prefer to look at the evolution of monitoring points for both steady or unsteady algorithm.
Axel Cablé

Re: No residuals tracking but calculation keeps running

Post by Axel Cablé »

Ok. I'm trying to look at the evolution of the monitoring points but I only get the records for the 10 first time steps, then it stops, even though I chose "monitoring points files at each time step". Any idea how to change that?
Alexandre Douce

Re: No residuals tracking but calculation keeps running

Post by Alexandre Douce »

If it happens during the calculation, perhaps it is a buffering problem... At the end of your calculation could you check if you have all the iterations recorded in the monitoring probe files (suffix "hst") in the HIST.XXXXXXX directory in your RESU directory?
David Monfort

Re: No residuals tracking but calculation keeps running

Post by David Monfort »

Here are some complements on the probe values management ;-)

Probe values are stored in a temporary (binary) file called hist.tmp before being actually written in the different probes_VarName.dat. This behavior is intended to decrease the filesystem I/O activity.

However, you can use the nthsav variable to control when the values are written (see user manual, chap 7.1.3 "Chronological records", around page 119).
nthsav = 0 (default, 4 times in the calculation)
nthsav = -1 (only at the end of the calculation)
nthsav > 0 (every 'nthsav' time-step)
Post Reply