
[Sponsors] 
SIMPLE: Difference between initial and final residuals 

LinkBack  Thread Tools  Search this Thread  Display Modes 
June 30, 2016, 14:17 
SIMPLE: Difference between initial and final residuals

#1 
Member
Jack
Join Date: May 2015
Posts: 98
Rep Power: 9 
In the context of the simpleFoam solver (steady solver) I am trying to understand the significance of the initial residual vs. the final residual that is reported in the output of simpleFoam. As far as I understand the initial residual is the value of the residual (i.e the error in saying LHS = RHS of the relevant equation for a particular variable) before the particular equation (pressure or momentum equation) is solved. The final residual is a mystery to me. Since we are iterating forward per false time step, shouldn't the final residual become the new initial residual for the next iteration step? This is definitely not the case as I monitor my residuals. So I think I am missing something fundamental here concerning the solution algorithm of SIMPLE.
Also which residual is it that matters in terms of indicating convergence (I know there are other metrics one should look at as well) and why? 

July 1, 2016, 04:07 

#2 
Member
Join Date: Jun 2016
Posts: 66
Rep Power: 9 
The discretized equations (NS, continuity, turbulence, etc.) are written in the form of a matrix A and vectors x and b, Ax=b. During the solution of the equation system defined by the matrix and vectors, you perform several iterations (called inner iterations). After each iteration, the computed residuals measure imbalance in the conservation equations. This should be getting smaller after each iteration. So you get from an initial residual value to a final residual value. During this whole process, you only solve for the vector x and do not update the matrix A. When your final residual is low enough, you update the matrix and repeat the whole process I just described (called outer iteration). Voila, you get a new initial residual that has naturally a larger value than the previous final residual.
The residuals should gradually decrease as you move from the initial to the final residual. That's the main requirement. But monitoring just residuals is not enough, you should monitor also forces, moments, integral quantities etc. You can find many discussions about this. Last edited by Zbynek; July 5, 2016 at 06:33. 

July 4, 2016, 18:42 

#3 
Member
Jack
Join Date: May 2015
Posts: 98
Rep Power: 9 
Thanks for your response.
What I don't understand is why do we take the initial residual (before the so called inner iterations take place) as an indicator for convergence? Shouldn't it be the final residuals after all the inner iterations take place? 

July 5, 2016, 02:10 

#4 
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 28 
Because you want to know if the coupled system converged, not a single equation (e.g. Ux on its own).
__________________
*On twitter @akidTwit *Spend as much time formulating your questions as you expect people to spend on their answer. 

July 11, 2021, 08:33 

#5 
Member
Jnana Bhaskar Rao
Join Date: Mar 2020
Posts: 46
Rep Power: 5 
How is the residual calculated from the matrix equation? I just need to understand how do we get a single value from a matrix inequality equation? Does it represent the correction in the determinant or does it actually indicate how much average change is needed in the solved variable? Can I say something like "if the initial residual is 1e4 in the U equation, on average the cell values need to be varied by 1e4 to balance the U equation."


Tags 
convergence, openfoam, residual, simple 
Thread Tools  Search this Thread 
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
simpleFoam error  "Floating point exception"  mbcx4jc2  OpenFOAM Running, Solving & CFD  12  August 4, 2015 02:20 
Unstabil Simulation with chtMultiRegionFoam  mbay101  OpenFOAM Running, Solving & CFD  13  December 28, 2013 13:12 
pimpleFoam: turbulence>correct(); is not executed when using residualControl  hfs  OpenFOAM Running, Solving & CFD  3  October 29, 2013 08:35 
calculation stops after few time steps  sivakumar  OpenFOAM Running, Solving & CFD  7  March 17, 2013 06:37 
Orifice Plate with a fully developed flow  Problems with convergence  jonmec  OpenFOAM Running, Solving & CFD  3  July 28, 2011 05:24 