Convergence criteria based on residuals in code_saturne?

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
Mohammad
Posts: 114
Joined: Thu Oct 25, 2018 12:18 pm

Convergence criteria based on residuals in code_saturne?

Post by Mohammad »

Hello,

As you know most of CFD softwares have options to set the residuals for equations, for example in fluent you can set the residuals of each velocity components or continuity equation that when the solver reaches that value, it will go to the next iteration like below:
Image

Now the question is how can we set these monitors in code_saturne? What are the default values of residuals in code_saturne?

Regards,
Mohammad
Yvan Fournier
Posts: 4075
Joined: Mon Feb 20, 2012 3:25 pm

Re: Convergence criteria based on residuals in code_saturne?

Post by Yvan Fournier »

Hello,

There is no automatic stapping criteria in code_saturne, as tuning such a criteria is quite tricky and possibly and model + options+mesh dependent, but you could use the values output automatically in residuals.csv to define such a criteria (coding it in cs_user_extra_operations.c for example). I do not remember in which file those values are handled, so to access them, I recommend checking the code to see how resilduals.csv is written, and adapt that in cs_user_extra_operations.c.

Best regards,

Yvan
Post Reply