Final residual greater than initial residual?
Hi Foamers,
I have a small question regarding residuals. I am simulating a fairly straightforward problem involving steady turbulent 2D flow over a uniformly rough surface with simpleFoam in 1.6.x and (until recently) everything has gone quite smoothly. I noticed however that at times the final residual for pressure is actually higher than the initial residual and I'm at a loss to explain this (e.g. see below). Some background: p boundary conditions are all zeroGradient with pRefValue = 0 at cell 0. The inflow is specified for U, k and epsilon, while a fully-developed condition is imposed at the outflow. Wall functions are used at the ground to account for roughness and the top boundary uses gradient conditions for all variables. The solver for p is PCG and the problem arises whether I use DIC as a preconditioner or none. Is there a simple explanation? Cheers! Time = 1 smoothSolver: Solving for Ux, Initial residual = 7.90254290629e-05, Final residual = 3.32026131229e-09, No Iterations 5 smoothSolver: Solving for Uz, Initial residual = 1, Final residual = 4.4404448664e-05, No Iterations 9 nonePCG: Solving for p, Initial residual = 1, Final residual = 4.9598800533, No Iterations 1001 time step continuity errors : sum local = 6.3448224793e-07, global = 1.04228638311e-18, cumulative = 1.04228638311e-18 DILUPBiCG: Solving for epsilon, Initial residual = 0.000112521219714, Final residual = 1.27922932979e-09, No Iterations 2 DILUPBiCG: Solving for k, Initial residual = 0.99999631519, Final residual = 2.73840262525e-05, No Iterations 2 ExecutionTime = 145.33 s ClockTime = 146 s Time = 2 smoothSolver: Solving for Ux, Initial residual = 2.31445762334e-05, Final residual = 1.48861023313e-09, No Iterations 11 smoothSolver: Solving for Uz, Initial residual = 0.455262029033, Final residual = 3.72189398375e-05, No Iterations 14 nonePCG: Solving for p, Initial residual = 0.782162017916, Final residual = 2.42606552396, No Iterations 1001 time step continuity errors : sum local = 1.38148040504e-06, global = 2.0904130329e-19, cumulative = 1.2513276864e-18 DILUPBiCG: Solving for epsilon, Initial residual = 0.00016588809383, Final residual = 1.64560143453e-09, No Iterations 2 DILUPBiCG: Solving for k, Initial residual = 0.0173546654105, Final residual = 1.06423155388e-06, No Iterations 2 ExecutionTime = 262.33 s ClockTime = 264 s ... |
Hi,
there is a problem in your simulation. The final residual is greater than the initial residual because the linear (iterative) solver is diverging and can’t find a solution. Regards, Christian |
Updated settings in fvSolution
Switching the linear solver for p to GAMG seems to have solved the problem.
Code:
p |
All times are GMT -4. The time now is 20:27. |