
[Sponsors] 
November 26, 2002, 06:44 
Residuals?

#1 
Guest
Posts: n/a

Hi
I want to know more about residuals. How is residuals computed during a simulation and what reduction in residual is required before continuing to the next iteration (steady state) or time step (transient)? Does it imply multiplying the coeffient matrix with the approx. solution and subtracting this from the source vector? Does residuals only play a role when using iterative solvers and not when using direct solvers? How does residual normalization work. i.e. that the residuals of all variables solved have the same initial value for example 1 and then reduces to whatever? What is the link between residual and convergence? Thank you. Regards Tom 

November 27, 2002, 08:44 
Re: Residuals?

#2 
Guest
Posts: n/a

Most numerical computations will involve an iterative procedure. If you are interested in the steady state solution then you will monitor the change in some variable from one level to the next. Even for transient simulations you will have inner iterations if you are using an implicit scheme. I use the following definition of the residue,
residue = L2norm at the current iteration/L2norm in the first iteration. I generally use the L2 norm of the density and go upto about 6 decade reduction; in the first iteration residue=1, and I stop when residue<1e6. Of course this is not a sacrosant number. Also, density may not be a good indicator of convergence always, e.g., very low mach number flows. Try to choose a variable that is expected to change considerably as the simulation progresses. 

November 27, 2002, 10:23 
Re: Residuals?

#3 
Guest
Posts: n/a

what is L2norm here please. could you define it in general.


November 27, 2002, 11:40 
Re: Residuals?

#4 
Guest
Posts: n/a

Basically the L^2 norm of a function, f say, is the square root of the ingegral of the square of the function over the domain. The L stands for Lebesgue (as in Lebesgue integration) and the 2 denotes the fact it's the integral of a square.


November 27, 2002, 13:06 
Re: Residuals?

#5 
Guest
Posts: n/a

In the numerical context we might only know the function at discrete number of points. (In FEM the numerical solution if known everywhere in the domain). We must use the discrete L2 norm
f = sqrt( (sum_i f_i^2)/N ) where N is the number of data points at which the function is known. The mathematically correct expression whould be f = sqrt( (sum_i (f_i h_i)^2) ) where h_i is the size of the i'th cell. Note that this is a discrete analog of the integral L2 norm. When the grid is uniform people usually do not write the h_i. But when the grid is not uniform the second expression should be used, especially if you doing an error analysis by grid refinement, but when your purpose is merely to check convergence the first expression will do. Note that in general h_i is the "volume" of the finite volume, length, area and volume in 1d, 2d and 3d, respectively. For a nice description of these things in more detail see the notes of Randy Leveque here (Appendices 1, 2) ftp://amath.washington.edu/pub/rjl/p...amath58X.ps.gz 

November 28, 2002, 01:50 
Re: Residuals?

#6 
Guest
Posts: n/a

Thank you for your responses
I have another question on residuals and the solution of PDE. If I am only solving a single equation for exampe the diffusion equation for heat conduction, and the equation is linear, i.e. my coefficients are not a function of temperature: Then do I still have to iterate to obtain the solution or do I simply solve my system to a reasonable residual tolerance? In general if we have a system of uncoupled PDE's to solve is iteration still required? Thank you 

November 28, 2002, 05:09 
Re: Residuals?

#7 
Guest
Posts: n/a

It depends on your method. If you use a direct solver then you do not need to iterate  you simply solve the linear matrix problem. However if you don't use a direct solver then you must iterate to get a solution; i.e. you use an iterative matrix solver such as conjugate gradient, multigrid, etc.
(The other) Tom. 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Tutorial of how to plot residuals !  wolle1982  OpenFOAM Running, Solving & CFD  143  November 20, 2017 06:40 
what to monitor besides residuals?  franzdrs  FLUENT  5  March 21, 2013 04:59 
Mesh size and solver residuals...  Scott  CFX  5  December 15, 2008 18:10 
Convergence  scaled vs unscaled residuals  HS  FLUENT  1  November 7, 2005 06:45 
residuals  Karl  CFX  2  June 24, 2003 23:13 