
[Sponsors] 
May 9, 2013, 04:16 
initial residual and final residual

#1 
New Member
Maosong Cheng
Join Date: Aug 2012
Posts: 19
Rep Power: 6 
Hi FOAMERs,
what is the definition of the initial residual and final residual, which can be used to decide convergence ? 

May 15, 2013, 05:20 

#2 
Senior Member
Anne Gerdes
Join Date: Aug 2010
Location: Hamburg
Posts: 168
Rep Power: 8 
The initial residual is evaluated based on the current values of the field before solving an equation for a particular field . The final residual is evaluated after the solution of the equation is performed.
The intial residual is more important to decide whether a computation converges, or not. 

May 15, 2013, 08:23 

#3 
Member
Timo K.
Join Date: Feb 2010
Location: University of Stuttgart
Posts: 66
Rep Power: 9 
Hi Anne,
can you give some rule of thumbs for values, which should be achieved for the initial/final residual and how many iterations should be used for pEqn per cycle e.g. for a transient simulation with a standard PCG solver. Best Timo 

May 15, 2013, 08:29 

#4 
Senior Member
Anne Gerdes
Join Date: Aug 2010
Location: Hamburg
Posts: 168
Rep Power: 8 
Initial residual: e^4 or e^5 is a good result. Final residual has to be smaller (e^8).
I cannot answer your 2nd question. 

August 17, 2016, 15:45 

#5  
New Member
Manm
Join Date: Apr 2015
Posts: 16
Rep Power: 3 
Quote:
Hi, based on this definition, I was curious as to why the final residual in one time step NOT equal to initial residual in NEXT time step? 

August 17, 2016, 15:55 

#6 
Member
Bruno Blais
Join Date: Sep 2013
Location: Canada
Posts: 62
Rep Power: 5 
Assuming you are solving in steady state, it is because the equations are nonlinear.
If you solve the momentum equation for U, at the next iteration, P and phi will have been changed. Therefore, the initial residual will be different from the final residual of the last iteration. If you were to solve a linear equation, noncoupled with any other variables, in steadystate, then you would solve it in a single iteration... and therefore your "next initial" residual would be your last final one... 

August 17, 2016, 17:13 

#7  
New Member
Manm
Join Date: Apr 2015
Posts: 16
Rep Power: 3 
Quote:
If I understand it right, Say : U =f(p,phi,t) where f is a complex function If t0 =0: During 1 st iteration, we start with a p0, phi0 and dt time step and get U1 =f(p0, phi0,dt) as well as p1, phi1 values. The corresponding final error/ residual is calculated from U1 and true U expected. Before 2nd iteration starts, a (say) U12 is calculated based on new available values: U12 =f(p1,phi1,dt) and this is used to calculate the initial error/ residual before the 2nd time step starts. and then we go on to calculate U2 =f(p1, phi1, dt+dt) and corresponding p2, phi2 and final error/ residual at the end of 2nd time step and so on.... 

August 18, 2016, 08:31 

#8  
Member
Bruno Blais
Join Date: Sep 2013
Location: Canada
Posts: 62
Rep Power: 5 
Yup, That is exactly so.
OpenFOAM is a segregated solver, that is U, V, W, phi and P are solved segregated. This is why such a thing happen. There are block coupled solvers in foamextend, but those are still linear solver and don't implement a nonlinear newton method or something like that. Quote:


Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
High Courant Number @ icoFoam  Artex85  OpenFOAM Running, Solving & CFD  11  February 16, 2017 14:40 
Extrusion with OpenFoam problem No. Iterations 0  Lord Kelvin  OpenFOAM Running, Solving & CFD  8  March 28, 2016 11:08 
pimpleFoam: turbulence>correct(); is not executed when using residualControl  hfs  OpenFOAM Running, Solving & CFD  3  October 29, 2013 09:35 
calculation stops after few time steps  sivakumar  OpenFOAM Running, Solving & CFD  7  March 17, 2013 07:37 
Orifice Plate with a fully developed flow  Problems with convergence  jonmec  OpenFOAM Running, Solving & CFD  3  July 28, 2011 05:24 