CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Post-Processing (https://www.cfd-online.com/Forums/openfoam-post-processing/)
-   -   What is the continuity plot useful for? (https://www.cfd-online.com/Forums/openfoam-post-processing/144422-what-continuity-plot-useful.html)

martad November 13, 2014 16:05

What is the continuity plot useful for?
 
pyFoamPlotWatcher gives two plots: residuals and continuity (global and cumulative). I understand how residual plots are useful, and the plot of global continuity makes sense when it tends to zero, but the cumulative continuity seems to always tend to some value - it's very small, but distinctively different from 0. Is that what I should expect?

Thanks

blais.bruno November 20, 2014 11:46

From my understanding, the cumulative continuity is the cumulative error in terms of mass conservation from your scheme (aka the sum of div(U) * cellVolume). Therefore, this quantity accumulates mass conservation error throughout your simulation.

If it converges to a constant (negligible) value, then everything is fine. It means that during your transient period there was some mass loss, but that at steady state it is no more. However, if it keeps on increasing/decreasing, it means you have mass drift in your system and this is something that is important to fix.

So even if it is distinctively different from 0, as long as it is negligible (i.e in the order of the numerical precision (relTol or absTol) of your iterative solver) then everything is fine.

Hope that answers your question.

martad November 22, 2014 12:52

Thanks for your answer Bruno, it's very helpful! In the case when I do have a mass drift, what would be the first thing to look at to correct it?

blais.bruno November 22, 2014 14:32

Quote:

Originally Posted by martad (Post 520533)
Thanks for your answer Bruno, it's very helpful! In the case when I do have a mass drift, what would be the first thing to look at to correct it?

There are some things to check, but it highly depends on the physics of the flows.

Things you should verify are
1 - Do you have a multiphase flow? Are the quantities of each phases conserved?

2 - Do you have inlet, outlet or mixed boundary conditions? Are they set correctly? Do you get spurious pressure or velocity in the viccinity of these boundary?

3 - Does your flow converge to a steady state? If it is highly periodic or transient, then that might a reason why you keep on having mass drift

4 - Is the drift affected by the precision of the numerical solver (notably the pressure one)? Increase the relative tolerance can do wonder for transient flows

5 - Does increasing the number of PISO loop (if using PisoFoam) change the results or no? Increasing the number of PISO loop should generally improve your continuity equation since after all the pressure is nothing more than a lagrange multiplier to impose mass conservation

6 - Is the quality of your mesh good (this is a critical point)? What is the maximal non-orthogonality? If it is high, might be necessary to increase the number of non-orthogonality correctors. What is the skewness of your elements? if it is bad, I would consider remeshing, etc. etc.

Mesh quality is critical to good mass conservation and is by far the first thing you should look into, even it is tedious sometimes. If you have a structured homogenous mesh then this is not a problem however.


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