CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   Minimum mass and momentum RMS residual levels (https://www.cfd-online.com/Forums/cfx/239354-minimum-mass-momentum-rms-residual-levels.html)

siw November 2, 2021 06:58

Minimum mass and momentum RMS residual levels
 
I was playing in CFX 2021 R2 by simulating turbulent airflow through a smooth pipe with a very low minimum RMS residual limit of 1E-21. I noticed that the mass and momentum RMS residual equations in CFX-Solver Manager were nicely decreasing but suddenly flat-lined at 1E-15, likewise the two SST k and omega plots. I do not recall CFX flat-lining residual levels in previous versions so is this something new? Again, I'm not aiming for a discussion about assessing convergence etc. as I was just playing about in CFX, but rather is a cap new in CFX.

Opaque November 2, 2021 07:13

Depends on the precision selected for the solver, single or double precision.

If you are running single precision, the maximum discernible difference between two numbers is around 1.E-6, while for double precision is about 1.E-16.

Requesting a residual below 1.E-16 is something not achievable for general non-linear problems. For simple problems with low mesh count, good initial guess (effectively exact solution), you may be lucky and get it.

siw November 2, 2021 10:16

I was using double precision.

Like I said, I was simply toying about in CFX and noticed that the RMS residuals decreased to 1E-15 and then held constant. Of course my industrial simulations never get that low, it's tough getting the momentum residuals below 1E-4 in my work cases!

Opaque November 2, 2021 14:47

Quote:

Originally Posted by siw (Post 815627)
I was using double precision.

Like I said, I was simply toying about in CFX and noticed that the RMS residuals decreased to 1E-15 and then held constant. Of course my industrial simulations never get that low, it's tough getting the momentum residuals below 1E-4 in my work cases!

Here is a suggestion if you want to understand your model better:

- Go to Output Control
- For the results file - or for intermediate Backup Results: set Output Equation Residuals, select All

Run your simulation, and post-process your backup/results file as usual.

Create a Point locator, and select the Maximum Variable option, and select the "equation residual" you are interested in. Apply and you will find out where your residual is located.

Try to find out what is happening around that location: poor mesh, highly recirculating flow with a coarse mesh, etc

Address the issue if any. Repeat for the next equation until your model can converge to a lower residual, and hopefully smoother convergence.

ghorrocks November 2, 2021 16:57

As Opaque said, 1E-15 looks like it is the machine precision. So that is as good a convergence as you are going to get on that machine, OS, version of CFX and simulation.

The actual value you get to when you hit machine precision varies between simulations. Some are more sensitive than others - in some cases it can be 1E-4 or 1E-5. It all depends on how significant resolving the tiny difference between adjacent control volumes is for that simulation.

Things which affect machine precision include:
* the floating point processor in the CPU (they are not exact, they approximate floating point arithmetic. So differences in the floating point processor will determine machine precision)
* The OS - 64 bit versus 32 bit
* The software - 32 bit versus 64 bit, but also how the software evaluates the gradients and control volume differences affects things (you should find CFX is very good in this respect versus other software)
* The simulation - The reference pressure and conditions will have a big effect on this, but also a low Re flow should converge much further than, say, a natural convection simulation where the buoyancy is modelled by an ideal gas law where tiny density differences between adjacent cells drives the flow.

siw November 3, 2021 06:54

Quote:

Originally Posted by Opaque (Post 815639)
Here is a suggestion if you want to understand your model better:

- Go to Output Control
- For the results file - or for intermediate Backup Results: set Output Equation Residuals, select All

Run your simulation, and post-process your backup/results file as usual.

Create a Point locator, and select the Maximum Variable option, and select the "equation residual" you are interested in. Apply and you will find out where your residual is located.

Try to find out what is happening around that location: poor mesh, highly recirculating flow with a coarse mesh, etc

Address the issue if any. Repeat for the next equation until your model can converge to a lower residual, and hopefully smoother convergence.

Yes, in my work cases I mostly post-process to find the regions with the highest equation residuals and refine/improve the mesh if possible. This is a just part of the post-solving checks.


All times are GMT -4. The time now is 14:08.