CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   Problems with Courant number (LaunderGibsonTurbulence Model) (http://www.cfd-online.com/Forums/openfoam/67200-problems-courant-number-laundergibsonturbulence-model.html)

 sven August 6, 2009 20:33

Problems with Courant number (LaunderGibsonTurbulence Model)

Hey,

I am calculating a turbulent channel flow using the LaunderGibsonRSTM Model to account for turbulence. After starting the calculation with the "turbFoam" solver, everything seems to be normal, but after some time or iterations, respectively, my courant number suddenly starts to explode within a few itertations. This can be seen by having a look at the log file:

Code:

``` Time = 0.0875 Courant Number mean: 9122.99 max: 4.06223e+07 DILUPBiCG:  Solving for Ux, Initial residual = 0.00407551, Final residual = 1.89596, No Iterations 1001 DILUPBiCG:  Solving for Uy, Initial residual = 0.03075, Final residual = 11.7948, No Iterations 1001 DICPCG:  Solving for p, Initial residual = 0.998609, Final residual = 3.99957, No Iterations 1001 time step continuity errors : sum local = 1.61145e+17, global = 1.30081e+07, cumulative = 1.30081e+07 DICPCG:  Solving for p, Initial residual = 0.988565, Final residual = 0.0414409, No Iterations 1001 time step continuity errors : sum local = 5.72657e+17, global = 1.74464e+10, cumulative = 1.74595e+10 DILUPBiCG:  Solving for epsilon, Initial residual = 1, Final residual = 1.47062, No Iterations 1001 bounding epsilon, min: -3.17508e+37 max: 4.88268e+29 average: -1.58754e+33 DILUPBiCG:  Solving for Rxx, Initial residual = 2.48129e-11, Final residual = 2.48129e-11, No Iterations 0 DILUPBiCG:  Solving for Rxy, Initial residual = 0.90075, Final residual = 3.6413e-13, No Iterations 1 DILUPBiCG:  Solving for Ryy, Initial residual = 4.78801e-10, Final residual = 4.78801e-10, No Iterations 0 DILUPBiCG:  Solving for Rzz, Initial residual = 1.18566e-10, Final residual = 1.18566e-10, No Iterations 0 ExecutionTime = 219.83 s  ClockTime = 229 s Time = 0.088 Courant Number mean: 4.40528e+18 max: 1.49104e+21 DILUPBiCG:  Solving for Ux, Initial residual = 0.999991, Final residual = 2.18406, No Iterations 1001 DILUPBiCG:  Solving for Uy, Initial residual = 0.999902, Final residual = 0.431004, No Iterations 1001 DICPCG:  Solving for p, Initial residual = 1, Final residual = 428.858, No Iterations 1001 time step continuity errors : sum local = 3.71337e+39, global = -6.60944e+30, cumulative = -6.60944e+30 DICPCG:  Solving for p, Initial residual = 0.99985, Final residual = 6.04153e-07, No Iterations 6 time step continuity errors : sum local = 2.58801e+44, global = 6.17492e+31, cumulative = 5.51398e+31 DILUPBiCG:  Solving for epsilon, Initial residual = 3.69884e-06, Final residual = 3.69884e-06, No Iterations 0 bounding epsilon, min: 1.82392e-20 max: 4.88268e+29 average: 2.5136e+25 DILUPBiCG:  Solving for Rxx, Initial residual = 0.65553, Final residual = 5.73954e-06, No Iterations 27 DILUPBiCG:  Solving for Rxy, Initial residual = 0.578075, Final residual = 3.79017e-06, No Iterations 7 DILUPBiCG:  Solving for Ryy, Initial residual = 0.99998, Final residual = 2.08634e-06, No Iterations 7 DILUPBiCG:  Solving for Rzz, Initial residual = 0.983104, Final residual = 2.01267e-06, No Iterations 27 ExecutionTime = 228.81 s  ClockTime = 238 s Time = 0.0885 Courant Number mean: 1.25453e+44 max: 1.21128e+48 DILUPBiCG:  Solving for Ux, Initial residual = 0.995264, Final residual = 0.995264, No Iterations 1001 DILUPBiCG:  Solving for Uy, Initial residual = 0.998526, Final residual = 58.4614, No Iterations 1001 DICPCG:  Solving for p, Initial residual = 1, Final residual = 8.85047, No Iterations 1001 time step continuity errors : sum local = 1.2145e+82, global = -1.27702e+64, cumulative = -1.27702e+64 DICPCG:  Solving for p, Initial residual = 1, Final residual = 6.97309e-16, No Iterations 2 time step continuity errors : sum local = 1.99448e+90, global = -1.40764e+72, cumulative = -1.40764e+72```
As long as I can judge this, it is because of the epsilon. The line with bounding epsilon only appears in the last few iterations before the Courant number explodes. At this moment the solver also stops displaying these error messages:

Code:

``` #0  Foam::error::printStack(Foam::Ostream&) in "/home/sven/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so" #1  Foam::sigFpe::sigFpeHandler(int) in "/home/sven/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so" #2  Uninterpreted: [0xb802b400] #3  Foam::DILUPreconditioner::calcReciprocalD(Foam::Field<double>&, Foam::lduMatrix const&) in "/home/sven/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so" #4  Foam::DILUPreconditioner::DILUPreconditioner(Foam::lduMatrix::solver const&, Foam::Istream&) in "/home/sven/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so" #5  Foam::lduMatrix::preconditioner::addasymMatrixConstructorToTable<Foam::DILUPreconditioner>::New(Foam::lduMatrix::solver const&, Foam::Istream&) in "/home/sven/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so" #6  Foam::lduMatrix::preconditioner::New(Foam::lduMatrix::solver const&, Foam::Istream&) in "/home/sven/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so" #7  Foam::PBiCG::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const in "/home/sven/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so" #8  Foam::fvMatrix<double>::solve(Foam::Istream&) in "/home/sven/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libfiniteVolume.so" #9  Foam::lduMatrix::solverPerformance Foam::solve<double>(Foam::tmp<Foam::fvMatrix<double> > const&) in "/home/sven/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libincompressibleRASModels.so" #10  Foam::incompressible::RASModels::LaunderGibsonModified::correct() in "/home/sven/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libincompressibleRASModels.so" #11  main in "/home/sven/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/turbFoam" #12  __libc_start_main in "/lib/tls/i686/cmov/libc.so.6" #13  _start in "/home/sven/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/turbFoam" zsh: floating point exception  turbFoam > log turbFoam > log  230,31s user 7,14s system 96% cpu 4:07,20 total```
I already tried to decrease the time step and tried different values for epsilon, but none of it helps in any way. Does anyone has an idea what else could cause the Courant number to explode?? Thanks a lot!

 dipling August 7, 2009 03:41

Less information. A typical floating point error by OpenFoam. Either u repeat the calc with LinuxDebug to see where the floating point exception takes place or u take a look in your dict-files (fvSolution etc.) again (i know it's not fun) and go through them step by step. Usually there is a simple misstake in these files. Often there implausible equations or something like that.

 sven August 7, 2009 13:54

Hey dipling,

1. How can I use the LinuxDebug for my Calculation (unfortunately I never used this before)?

2. I don't really understand the hint on the dict files
Quote:
Code:

`Often there implausible equations or something like that.`
there are no equations in the dict files. what do you mean by this?

Thanks!

 dipling August 10, 2009 03:12

Hi Sven,

u have to set

export WM_COMPILE_OPTION=Debug in the /OpenFOAM/OpenFOAM-1.x/bashrc instead of
export WM_COMPILE_OPTION=Opt .
To test which Compiler OF use type e.g. which icoFoam in the terminal.

Another way is to set these Options directy in your /home/user/.bashrc

#export WM_COMPILE_OPTION=Debug #Debug
export WM_COMPILE_OPTION=Opt # Normal

Activate or Deactivate them with the # .

. .bashrc

After it u have to recompile whole OF the normal way with ./Allwmake . (Takes very long!)

2. I mean files like "UEqn.H" "peqn.H" which uncludes the differential equations.
Don't forget to check them.

 All times are GMT -4. The time now is 12:41.