CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

Final residual greater than initial residual?

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   March 1, 2011, 18:11
Default Final residual greater than initial residual?
  #1
New Member
 
Jonathon Sumner
Join Date: Aug 2009
Posts: 2
Rep Power: 0
jsumner is on a distinguished road
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

...

Last edited by jsumner; March 1, 2011 at 20:04. Reason: Clarification
jsumner is offline   Reply With Quote

Old   March 2, 2011, 04:08
Default
  #2
Senior Member
 
Christian Lucas
Join Date: Aug 2009
Location: Braunschweig, Germany
Posts: 198
Rep Power: 7
Chris Lucas is on a distinguished road
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
Chris Lucas is offline   Reply With Quote

Old   March 2, 2011, 09:19
Default Updated settings in fvSolution
  #3
New Member
 
Jonathon Sumner
Join Date: Aug 2009
Posts: 2
Rep Power: 0
jsumner is on a distinguished road
Switching the linear solver for p to GAMG seems to have solved the problem.
Code:
p
    {
        solver                    GAMG;
        preconditioner            FDIC;
        smoother                DICGaussSeidel;
        mergeLevels                1;
        agglomerator            faceAreaPair;
        nCellsInCoarsestLevel    100;
        tolerance                0;
        relTol                    1e-4;
    };
With the added benefit that the simulation runs much faster
jsumner is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
transsonic nozzle with rhoSimpleFoam Unseen OpenFOAM Running, Solving & CFD 7 April 16, 2014 03:38
How to write k and epsilon before the abnormal end xiuying OpenFOAM Running, Solving & CFD 8 August 27, 2013 15:33
Floating point exception error Alan OpenFOAM Running, Solving & CFD 10 April 6, 2012 14:02
Computational time sunnysun OpenFOAM Running, Solving & CFD 5 March 16, 2009 04:32
Differences between serial and parallel runs carsten OpenFOAM Bugs 11 September 12, 2008 11:16


All times are GMT -4. The time now is 17:38.