Problem about 'Residual', 'Drift', 'CFL number'.

Hello,

This time I simulate the total nozzle, all the boundary conditions are reasonable, and I calculated it with CS 5.0.1 with Windows.

Here is my problem, because the new version has the file ‘residual.csv’ in the directory ‘RESU’, so I opened it with ParaVis:


It seems very stable, then I zoom in it:

It’s very stable, but why the residual of ‘k’ is 62, ‘velocity’ is 40, ‘pressure’ is 16, are they too large as residuals?

At the same time, I saw the file ‘listing’:


Residuals are 10E-04, E-05 or E-06, why they are not corresponding with the ‘residual.csv’

And what’s the ‘Drift’? Is it ‘Derive’?

Is it convergent or not?

Best Regards

XING Jian

And for ‘CFL number’, it is ‘Courant number’?

CFL=UDt/Dx with U is with U is characteristic velocity, Dx is characteristic length.
Fo=v
Dt/Dx^2 with v is viscosity, Dx is characteristic length.

I want to obtain the maximum CFL and Fourier, I chose the fastest, and the mesh is the finest area. Dx=0.0008, U=23, v=2*10^5.

So CFL=2.810^4Dt

So Fo=31.25*Dt

For most case, CFL number is around 1 ~ 5, so I chose Dt = 1*10^-5, CFL =0.28, Fo=0.0003125. So I take Max CFL=1, Max Fo=1.

Here is results:
Fourier NB:


Fourier number is no problem.
Courant NB:

According to the trend, the Courant number will continue to increase but it is limited to 1. Should I increase the limitation? But this does not conform to the theory.

So what should I do?

Thank you very much

Best Regards

XING Jian

Hello,

If your test case is small, could you post it ? Or at least post the listing, setup.log, and residuals.csv.

Regards,

Yvan

Thank you Yvan.

Here are ‘XML’, ‘residual.csv’ and ‘listing’. Is my residual of the ‘residual.csv’ incorrect? They are should be 10E-03(or E-04;E-05) like ‘Norm. Residual’ in ‘listing’?

And for the ‘Courant Nb’, ‘Max CFL Nb’, should I increase it?

Best Regards

XING Jian
listing.zip (345 KB)
residuals.csv (91.2 KB)
upwind_CFL1_Fo1_0.00001.xml (20.1 KB)

Hello,

The residuals in the csv file seem to match the “time residuals” and not the “normalized residuals” from the listing file. I’ll check how this is measured/which type of norm is used.

Regards,

Yvan

Hello Yvan,

So how can I solve it? Actually I use CS5.0.1 now, maybe I try it with 5.0.0?

Best Regards

XING Jian

Hello,

Sorry for reviving an old thread but after all how are those norm. residuals and time residuals measured? I’m using version 5.0 for windows and the Convergence tool doesn’t work( I also tried to run it from a terminal with no results with code_saturne trackcvg). If there are no monitoring points added, which one is better to use for convergence tracking?

Regards,
Robert

Hello,

I am facing the same problem as Xing Jian : my residuals.csv values are a way greater than my listing values.

Did you find a solution ? Which ones should I use for convergence test ?

Regards,
Valentin

Hello,

The values in the CSV file match the last column in the listing (time residual, and not normalized residual). I’m not sure there is much theoretical documentation about that, but I’ll try to get more info on how to interpret that value.

Regards,

Yvan

Hello,

Thank you for your quick answer.

Could you please technically explain what are the norm.residual, drift and time residual and which one should be used for convergence observation in the case of not using monitoring points ?

Best regards,

Valentin

Hello,

I resume this discussion because I am pretty interesting in the answer Yvan

Best regards

Jérémy

Up

With Code_Saturne, how can we be sure that the calculation is converged ?
Especially for a transient calculation, which parameter we should check in listing file for convergence of each time step ?

Could you explain each parameter in the listing file : Rhs norm; Norm Residual, Drift, Time residual ?

Thank you

Jeremy

Hi all!

After some searching on this forum and the functions from code_saturne, I found that norm.residual is the residual I should check in order to see if the simulation is converging or not.

From the file ecrlis.f90, the drift or derive residual is defined as DRIFT=((x_n-x(n-1) )^2*cell volume)/(time step).
Also from the file ecrlis.f90, the norm residual is defined as norm=sqrt(cs_gres(ncel,volume,w1,w1)),
where cs_gres is the global residual of 2 extensive vectors and is defined as 1/sum(vol) . sum(X.Y/vol)
and w1=((x_n-x(n-1) )*cell volume)/(time step)
.

Am I correct? Could someone confirm this?

Best Regards,
Ionut

Can anyone confirm this? Or, if it is wrong, point me in the right direction?

Thanks in advance,
Ionut

Hello,

Yes, this seems correct.

Best regards,

Yvan

Thank you very much Yvan!

Best regards,

Ionut