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

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
JeremyA
Posts: 31
Joined: Fri Jul 26, 2019 10:33 am

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

Post by JeremyA »

Hello,

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

Best regards

Jérémy
JeremyA
Posts: 31
Joined: Fri Jul 26, 2019 10:33 am

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

Post by JeremyA »

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
Ionut G
Posts: 43
Joined: Fri Apr 20, 2018 2:43 pm

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

Post by Ionut G »

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
Ionut G
Posts: 43
Joined: Fri Apr 20, 2018 2:43 pm

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

Post by Ionut G »

Ionut G wrote: Wed Feb 12, 2020 11:36 am 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
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

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

Post by Yvan Fournier »

Hello,

Yes, this seems correct.

Best regards,

Yvan
Ionut G
Posts: 43
Joined: Fri Apr 20, 2018 2:43 pm

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

Post by Ionut G »

Thank you very much Yvan!

Best regards,

Ionut
Post Reply