CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Unexcepted behavior with vanLeer divergence scheme (https://www.cfd-online.com/Forums/openfoam-solving/222344-unexcepted-behavior-vanleer-divergence-scheme.html)

vrogly November 20, 2019 07:16

Unexcepted behavior with vanLeer divergence scheme
 
2 Attachment(s)
I'm learning OpenFOAM by messing around with the SimpleFOAM - motorbike (with kOmegaSST) tutorial. I was recommended to use vanLeer as divergence scheme, but when I tried it, the pressure and velocity fields don't act as excpected. The first figure is when running the simulation with

divSchemes
{
default none;
div(phi,U) bounded Gauss linearUpwindV grad(U);
div(phi,k) bounded Gauss upwind;
div(phi,omega) bounded Gauss upwind;
div((nuEff*dev2(T(grad(U))))) Gauss linear;
}

and the second with

divSchemes
{
default none;
div(phi,U) Gauss vanLeer;
div(phi,k) bounded Gauss upwind;
div(phi,omega) bounded Gauss upwind;
div((nuEff*dev2(T(grad(U))))) Gauss linear;
}

The intense blue and red colors are orders of magnitudes larger than the muted colors in the first figure. The yellow is "nan", not a number.

I've read the official documentation of vanLeer [1], and it seems like I've implemented the scheme correctly, but something is clearly wrong.

So, I'm wondering if anyone has any idea of what could have happended? All other settings are equal.



[1] https://www.openfoam.com/documentati...e-vanleer.html



Thanks in advance

cryabroad November 26, 2019 04:03

Quick question, can you also post your residuals plot? "nan" means the simulation is diverged, so the results are not meaningful.

I normally use vanLeer for bounded scalars, e.g., some variables that are bounded between 0 and 1. It usually gives good results, meaning that the results are indeed bounded (sometimes with a little overshoot, but within 1 or 2 percent and it goes away as the simulation proceeds).

I think another thing you could try to make more meaningful comparison is to use

Code:

div(phi, U)    bounded Gauss vanLeerV;


All times are GMT -4. The time now is 00:35.