CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   Simulation diverges randomly QUICK (

santos August 17, 2006 17:21

Hello I wonder if anyone ca

I wonder if anyone can give some advice on this problem:

I am simulating a rectangular cross section channel with dimensions 11.4 x 2 x 30 (mm). Reynolds number is 250 (based on channel height) for water flowing at room temperature.

For this Re number, the flow regime is expected to be transient.

The inlet and outlet are specified as cyclic.
The time step was set in order to maintain Courant number smaller than 1.

The solver is channelOodles.

My fvSchemes file content is the following:
default Euler;

default Gauss linear;
grad(p) Gauss linear;
grad(U) Gauss linear;

default none;
div(phi,U) Gauss QUICK;
div(phi,k) Gauss limitedLinear 1;
div(phi,B) Gauss limitedLinear 1;
div(B) Gauss linear;
div(phi,nuTilda) Gauss limitedLinear 1;
div((nuEff*dev(grad(U).T()))) Gauss linear;

default none;
laplacian(nuEff,U) Gauss linear corrected;
laplacian(1|A(U),p) Gauss linear corrected;
laplacian(DkEff,k) Gauss linear corrected;
laplacian(DBEff,B) Gauss linear corrected;
laplacian(DnuTildaEff,nuTilda) Gauss linear corrected;

default linear;
interpolate(U) linear;

default corrected;

default no;

I am using BICCG for the velocity and AMG for the pressure (2 PISO correctors), with 100 cells on the top level.

With this settings, the simulation diverges (NaN) randomly. This happens regardless of the mesh refinement - I get the same behaviour for 65k, 125k, 500k and 1M cells.

As soon as I change the velocity scheme from QUICK to Gamma or linear, I stop observing the divergence problems.

Is this an intrinsic problem of using the QUICK scheme (however, it is the most used scheme in the literature on the same kind of simulations, using either CFX or Fluent), or is it a bug?

On the other hand, is Gamma scheme at least equivalent in accuracy to QUICK so it can be used instead?

Thanks a lot!

Josť Santos

hjasak August 18, 2006 05:02

Can you run a debug version, o
Can you run a debug version, or set FOAM_ABORT anvironment variable to find out where it fails? It is pretty difficult to say anything based on the above, but if it makes you feel better I cannot immediately see anything wrong. Also, it would be useful if you could try other schemes on the momentum equation (upwind, Gamma), to see if the problem is really related to Quick.

As for the Gamma scheme, is is a bounded second-order NVD scheme. Quick is formally third order but in the original definition it is also unbounded.


santos August 18, 2006 12:25

Hello Dr. Jasak, thank you for
Hello Dr. Jasak, thank you for your reply.

With QUICK scheme, the Courant number starts to increase for a given simulation time, and after a few time steps and a further increase in Co, I get NaN (I've set export FOAM_SIGFPE=1 and export FOAM_SETNAN=1 so the simulation stops when NaN appear).

I can delay or partially overcome this problem by reducing the time step. However, even with the smallest time step, it diverges again after some more simulation time - I went down to the minimum time step allowed(?) 1e-5, and even so the simulation diverged.

By replacing QUICK with Gamma, linear, upwind or linearLimited, the simulation behaves much better, no more NaN, and Co is steady during all the simulation. However the wall shear stress results are a bit different when comparing the results that I got with those schemes with QUICK's. I will investigate which results are the most accurate.

I've read your paper on Gamma discretisation scheme. Your results show that it is indeed more accurate than bounded QUICK for those test situations. Do you think the same could apply for my situation, and that would explain the different results using QUICK and Gamma?

Josť Santos

hjasak August 18, 2006 12:52

Well, the conclusion on accura
Well, the conclusion on accuracy you draw will depend on the range of cases of interest. In any case, all of the bounded schemes will give you similar and pretty decent results. Also, the paper is pretty old now and the stuff on vector schemes is not there - try using any of the GammaV or limitedLinearV variants, which should be even better.

I am mostly interested in the problem you report because of a possibility of a bug in Quick. However, from what I can hear so far, this does not seem to be the problem.



santos August 18, 2006 17:39

I am now using limitedLinearV
I am now using limitedLinearV on the momentum equation.

Yes, you are probably right, maybe it is not a bug, but a stability problem of QUICK scheme specific to my situation.

Thank you for your time and help!

Josť Santos

All times are GMT -4. The time now is 22:27.