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/)
-   -   Anisotropic (~2) divergence/Courant number explosion (https://www.cfd-online.com/Forums/openfoam-solving/200404-anisotropic-2-divergence-courant-number-explosion.html)

myuse2 April 1, 2018 23:46

Anisotropic (~2) divergence/Courant number explosion
 
Dear all,

I'm sure this is an easy thing as I'm new to OpenFOAM. I'm trying to run a simple laminar flow in a 2.5x0.41x0.41 channel with x-inlet velocity = 1 and nu = 1. Everything works fine with an isotropic mesh, but when I increase the anisotropy ratio to 2 or beyond (meshCheck is ok execpt for Max aspect ratio = 2.0098 OK, which should be fine I think) the Courant number steadily increases even though the linear solvers converge fine.

I'm using icoFoam ddtScheme Euler with a small time step 0.005 (and potential flow initialization), and have three boundary patches:

Code:

1: wall - U: type fixedValue; value uniform (0 0 0); p: type zeroGradient;
2(x==0): patch - U: type fixedValue; value uniform (1 0 0); p: type zeroGradient;
3(x==2.5): patch - U: type zeroGradient; p: type fixedValue; value uniform 0;

Solver output looks like this:

Code:

...

Time = 0.02

Courant Number mean: 0.396073 max: 0.595328
DILUPBiCG:  Solving for Ux, Initial residual = 0.710458, Final residual = 6.05412e-009, No Iterations 29
DILUPBiCG:  Solving for Uy, Initial residual = 0.555298, Final residual = 8.24426e-009, No Iterations 27
DILUPBiCG:  Solving for Uz, Initial residual = 0.555298, Final residual = 8.24421e-009, No Iterations 27
GAMG:  Solving for p, Initial residual = 0.146766, Final residual = 8.4081e-009, No Iterations 24
GAMG:  Solving for p, Initial residual = 3.12959e-010, Final residual = 3.12959e-010, No Iterations 0
GAMG:  Solving for p, Initial residual = 3.12959e-010, Final residual = 3.12959e-010, No Iterations 0
time step continuity errors : sum local = 4.908e-010, global = 1.35872e-010, cumulative = 3.72047e-010
GAMG:  Solving for p, Initial residual = 0.00478919, Final residual = 9.99079e-009, No Iterations 19
GAMG:  Solving for p, Initial residual = 5.2169e-007, Final residual = 7.70071e-009, No Iterations 6
GAMG:  Solving for p, Initial residual = 7.70139e-009, Final residual = 7.70139e-009, No Iterations 0
time step continuity errors : sum local = 2.30206e-010, global = -6.38586e-011, cumulative = 3.08189e-010
ExecutionTime = 8.047 s  ClockTime = 8 s

Time = 0.025

Courant Number mean: 0.469957 max: 1.39104
DILUPBiCG:  Solving for Ux, Initial residual = 0.338095, Final residual = 6.63966e-009, No Iterations 28
DILUPBiCG:  Solving for Uy, Initial residual = 0.381617, Final residual = 7.22101e-009, No Iterations 27
DILUPBiCG:  Solving for Uz, Initial residual = 0.381617, Final residual = 7.221e-009, No Iterations 27
GAMG:  Solving for p, Initial residual = 0.285914, Final residual = 6.1955e-009, No Iterations 25
GAMG:  Solving for p, Initial residual = 1.60704e-010, Final residual = 1.60704e-010, No Iterations 0
GAMG:  Solving for p, Initial residual = 1.60704e-010, Final residual = 1.60704e-010, No Iterations 0
time step continuity errors : sum local = 2.46742e-010, global = -6.86928e-011, cumulative = 2.39496e-010
GAMG:  Solving for p, Initial residual = 0.00646772, Final residual = 5.10226e-009, No Iterations 20
GAMG:  Solving for p, Initial residual = 1.52933e-007, Final residual = 9.2095e-009, No Iterations 4
GAMG:  Solving for p, Initial residual = 9.20973e-009, Final residual = 9.20973e-009, No Iterations 0
time step continuity errors : sum local = 4.68844e-010, global = 1.30753e-010, cumulative = 3.70249e-010
ExecutionTime = 9.923 s  ClockTime = 10 s

Time = 0.03

Courant Number mean: 0.399864 max: 0.877514
DILUPBiCG:  Solving for Ux, Initial residual = 0.553235, Final residual = 7.50458e-009, No Iterations 29
DILUPBiCG:  Solving for Uy, Initial residual = 0.664806, Final residual = 6.56398e-009, No Iterations 28
DILUPBiCG:  Solving for Uz, Initial residual = 0.664806, Final residual = 6.56398e-009, No Iterations 28
GAMG:  Solving for p, Initial residual = 0.240677, Final residual = 8.57317e-009, No Iterations 24
GAMG:  Solving for p, Initial residual = 3.59447e-010, Final residual = 3.59447e-010, No Iterations 0
GAMG:  Solving for p, Initial residual = 3.59447e-010, Final residual = 3.59447e-010, No Iterations 0
time step continuity errors : sum local = 5.52764e-010, global = 1.5542e-010, cumulative = 5.25669e-010
GAMG:  Solving for p, Initial residual = 0.00873356, Final residual = 5.62807e-009, No Iterations 20
GAMG:  Solving for p, Initial residual = 2.56358e-007, Final residual = 7.65837e-009, No Iterations 5
GAMG:  Solving for p, Initial residual = 7.6587e-009, Final residual = 7.6587e-009, No Iterations 0
time step continuity errors : sum local = 2.56423e-010, global = -7.21304e-011, cumulative = 4.53539e-010
ExecutionTime = 11.86 s  ClockTime = 12 s

Time = 0.035

Courant Number mean: 0.462337 max: 1.70965

Time = 0.04

Courant Number mean: 0.406624 max: 1.26753

Time = 0.045

Courant Number mean: 0.470408 max: 2.2144

...

I would really apreciate if someone has any idea what could be the issue (the problem files are attached here https://we.tl/kw9XFZmjWi).

piu58 April 2, 2018 01:28

If you have elements with very different length of the sides, the Courant number increases, because it roughly gives the way the fluid moves in one time step, measured in element sizes. If one side is very small, then the element size like velocity gets very high.

I think there exist reasons for this mesh. I recommend either reducing the time step for keeping the Co number low or thinking about your meshing strategy: Is ist really necessary to that extend?


All times are GMT -4. The time now is 03:47.