Page **1** of **1**

### Divergence error.

Posted: **Wed Mar 27, 2019 4:43 pm**

by **meb15aa**

Hi there,

I am currently experiencing divergence in my temperatures whilst running a steady state simulation. My velocity however seems to converge. I decided to reduce the time step which brings my temperature closer to convergence but my velocity has become negative and possesses a magnitude of order 7 when it should be around 15-20m/s. The way i changed the reference time step was to to reduce it from 0.1 to 0.01. All other categories ( minimal /maximal time step factor) remained unchanged. Could this be the reason why I am witnessing an absurd result.

Thank you

### Re: Divergence error.

Posted: **Wed Mar 27, 2019 11:30 pm**

by **Yvan Fournier**

Hello,

Do you have natural convection ? In which zone does your computation diverge first ?

Please see

https://www.code-saturne.org/cms/documentation/BPGand

viewtopic.php?f=2&t=7 for mre recommendations.

Regards,

Yvan

### Re: Divergence error.

Posted: **Fri Mar 29, 2019 8:38 am**

by **Antech**

**meb15aa**
Hello. Try without the temperature scalar first. For the gradient reconstruction in global numerics, select the "Least squares method over partial extended cell neighbourhood". If you need unsteady formulation, try to reduce time step further, 0.1 or 0.01 s is too much for SIMPLE-like algorythms with 15-20 m/s velocity, it will only work with extremely stiff solvers like CFX. If you don't need unsteady formulation, switch to steady flow and set the folowing time stepping parameters: reference step = 0.0001 s, Max CFL = 5, Max Fourier = 10, Min timestep factor = 0.001, Max timestep factor = 100, timestep variation: default (0.1).

**Always use Upwind scheme for all variables for the first run in steady formulation**. If you reached convergence in steady, switch to SOLU with blend of 0.8...1.0 for velocity and Upwind for other variables (all turbulent quantities that should be OK with Upwind). Start based on Upwind results and let it do about 100 iterations, then introduce the temperature scalar, hope it will converge so you'll get normal steady results. If you need unsteady but don't need to start from particular initial conditions, use steady results as initials for unsteady run, maybe, it will help. Otherwise work with SOLU for velocity and temperature and First order for others, don't forget to switch the gradient method, reduce the timestep to ~0.001 s, start calculation ans pray

or ask someone to pray for you

To reduce the calculation time, set the precision for all variables to 10^-5, not 10^-8 as by default. It's recommended on forum and almost will not affect results.

### Re: Divergence error.

Posted: **Fri Mar 29, 2019 6:32 pm**

by **meb15aa**

Thank you Antech

the solution is showing signs of convergence but I think it will require a lot of iterations. Currently I have run 80,000 iterations with a time step 0.001 and my temperature is very slowly showing signs of leveling off (image attached). I will try a few other techniques that you have mentioned to see if i can get closer to converged results. If you have any other recommendations, much appreciated.

Thank you for the help

### Re: Divergence error.

Posted: **Mon Apr 01, 2019 8:02 am**

by **Antech**

Hello.

To obtain reasonably fast convergence, use **local timestep**, if static results are enough. With time stepping options I mentioned, you will need about 1000 iterations for simple flows and 3000...5000 iterations for swirled flows with RSM to obtain reliable results (regarding convergence).

### Re: Divergence error.

Posted: **Mon Apr 01, 2019 11:16 am**

by **meb15aa**

Hi there again Antech,

I have taken on board what you have said, but still require at least 50,000 iterations for convergence. My model is simulating a segment inside a nuclear reactor core, maybe the extreme conditions it is subjected to mean a a greater number of iterations than predicted.

### Re: Divergence error.

Posted: **Tue Apr 02, 2019 7:16 am**

by **Antech**

Hello.

Your settings look good, IMHO. Maybe there's indeed a specific conditions that require so many iterations. We usually work with aerodynamics and conjugate fluid/solid heat transfer now, so our conditions are very different from yours (at least the fluid density, because, I guess, you work with water while our fluids, in Saturne cases, are mostly air and industrial gases). I use different meshes, including meshes with local areas of small elements, so I don't think that it's related to mesh. Without the case files I cannot say more specific, may be, Ivan will give you some suggestion.

### Re: Divergence error.

Posted: **Thu Apr 04, 2019 10:23 am**

by **meb15aa**

Thank you. This is a nuclear related project and the guideline I have been provided states that I cannot alter the precision (10e-08) or reduce the mesh near the wall for for initial mesh. The meshes I create after for my sensitivity study can be altered and utilised if they match well with the initial mesh. So my issue is the initial mesh creation. Because the mesh is very fine near the wall (10e-06) it requires a very small time step to alleviate divergence in velocity (10e-09) which I am currently trying to get access to a supercomputer to use. So thanks for the help everyone but all I can do is take your advice and pray and wait.

### Re: Divergence error.

Posted: **Thu Apr 04, 2019 4:41 pm**

by **Antech**

Hello.

Sorry that I cannot help you. If you need more confidence, I suggest to make the parallel calculation in OpenFOAM. For aerodynamic (hydrodynamic) cases Helyx-OS GUI is available. Both are free for commercial use. Although Saturne, IMHO, is much more convenient for engineering needs, it's always good to have alternative for important cases.