CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Residuals?

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Praveen

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 26, 2002, 05:44
Default Residuals?
  #1
Tom
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
  Reply With Quote

Old   November 27, 2002, 07:44
Default Re: Residuals?
  #2
Praveen
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 = L2-norm at the current iteration/L2-norm 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<1e-6. 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.
aerosayan likes this.
  Reply With Quote

Old   November 27, 2002, 09:23
Default Re: Residuals?
  #3
student
Guest
 
Posts: n/a
what is L2-norm here please. could you define it in general.
  Reply With Quote

Old   November 27, 2002, 10:40
Default Re: Residuals?
  #4
Tom
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.
  Reply With Quote

Old   November 27, 2002, 12:06
Default Re: Residuals?
  #5
Praveen
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

  Reply With Quote

Old   November 28, 2002, 00:50
Default Re: Residuals?
  #6
Tom
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
  Reply With Quote

Old   November 28, 2002, 04:09
Default Re: Residuals?
  #7
Tom
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.
  Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Tutorials] Tutorial of how to plot residuals ! wolle1982 OpenFOAM Community Contributions 171 February 20, 2024 02:55
what to monitor besides residuals? franzdrs FLUENT 5 March 21, 2013 03:59
Mesh size and solver residuals... Scott CFX 5 December 15, 2008 17:10
Convergence - scaled vs unscaled residuals HS FLUENT 1 November 7, 2005 05:45
residuals Karl CFX 2 June 24, 2003 23:13


All times are GMT -4. The time now is 06:26.