Residual of PDEs as convergence criteria of numerical solution

In summary, the conversation discusses the use of a numerical method to solve a PDE and the role of the residual of the discretized PDE as a convergence criteria for the numerical solution. However, the residual is not a good estimate of the error and it is not the same as the residual of the original PDE. It is also noted that the size of the residual may not necessarily indicate the accuracy of the solution, especially for oscillatory solutions.
  • #1
feynman1
435
29
Use a numerical method to solve a PDE f[u(x),u'(x),...]=0, where f is an operator, e.g. u'(x)+u(x)=0, and obtain a numerical solution v(x). Define f[v(x),v'(x),...] as the residual of the original PDE. Is this residual of the PDE widely used as the convergence criteria of the numerical solution v(x)?
 
Physics news on Phys.org
  • #2
No
 
  • #3
The numerical method either forces the residuals to be zero at the points where the approximate solution is obtained, or forces the residual to be orthogonal to some finite space of basis functions.

In neither case is it used to estimate the error.
 
  • Like
Likes feynman1 and jim mcnamara
  • #4
pasmith said:
The numerical method either forces the residuals to be zero at the points where the approximate solution is obtained, or forces the residual to be orthogonal to some finite space of basis functions.

In neither case is it used to estimate the error.
then why not a good estimate of the error?
 
  • #5
feynman1 said:
Define f[v(x),v'(x),...] as the residual of the original PDE
You do not have the residual of the original PDE. What you do have is the residual of the discretized PDE.

Now, if you use iterative solvers like Krylov subspace methods (for instance GMRES https://en.wikipedia.org/wiki/Generalized_minimal_residual_method) then the Euclidian norm of the residual at iteration i can be used to monitor the convergence towards the numerical solution in this discretized subspace. These residuals are reported by numerical PDE solver software like Comsol or OpenFOAM.

However, if your residual is zero, it only means that you have found the solution of the discretized PDE to within machine precision. You still do not know how large the error is between your discretized solution and the solution of the original PDE. For this you then need to do a mesh refinement study. For example you can take your exact solution of the discretized problem on mesh N and project it onto a larger/finer mesh 2N and recompute the residual. The residual will now not be zero anymore and you have to re-iterate until convergence. The hope is that if you make your mesh larger and larger, these residual changes on the new mesh will become smaller and your discrete solution will converge to the continuous solution.

feynman1 said:
then why not a good estimate of the error?
In practice, people look at residuals of iterative methods and associate this with 'the error'. There are relationships (from functional analysis) between the norm of the residual and the discretization error, and the actual continuous solution of the original PDE. They depend on the PDE (+boundary conditions) and the numerical method used and they give you information about the order of the convergence (next to the proof that the numerical method actually converges).
You can find this kind of detailed information for instance in the book of Babuska and Strouboulis 'The Finite Element Method and its Reliability' .
 
  • Like
Likes feynman1 and BvU
  • #6
bigfooted said:
You do not have the residual of the original PDE. What you do have is the residual of the discretized PDE.
Thanks, but why don't we have the residual of the original PDE? Unable to take derivatives?
 
  • #7
feynman1 said:
Thanks, but why don't we have the residual of the original PDE? Unable to take derivatives?
In the discretized problem you are working with a finite number of points. In your original problem ##u'(x) + u(x)## you could take a continuous solution ##f(x)## and substitute it into the ODE and determine a residual. But as soon as you construct some kind of solution vector ##x=(x_1,x_2,...,x_N)## then you are working in a discrete subspace, not in the continuous function space. For instance for first order methods, you assume that the solution is actually in a Hilbert Space ##H_1## of once locally differentiable functions. If your are solving a shock wave problem with the Euler equations, there is a discontinuity at the location of the shock. The solution of this problem is not in ##H_1##, at least not in the neighborhood of the discontinuity.

So these discrete problems have analytical solutions that are different from the continuous solution and you only ever get an approximation of the continuous solution unless your solution can be exactly represented by the discrete problem (when the solution is linear and the discretization is also linear for example).
 
  • Like
Likes feynman1
  • #8
Define f[v(x),v'(x),...] as the residual of the discretized PDE. Is this residual of the PDE widely used as the convergence criteria of the numerical solution v(x)? How small should it be for an oscillatory solution?
 
  • #9
feynman1 said:
Define f[v(x),v'(x),...] as the residual of the discretized PDE. Is this residual of the PDE widely used as the convergence criteria of the numerical solution v(x)? How small should it be for an oscillatory solution?
?
 
  • #10
how large is the residual of a discrete solution of a PDE from 0 in order of magnitude?
 

1. What is a residual in the context of PDEs?

A residual in the context of PDEs (partial differential equations) is the difference between the exact solution of the equation and the numerical solution obtained through a numerical method. It is a measure of the accuracy of the numerical solution and is used as a convergence criteria to determine when the numerical solution is close enough to the exact solution.

2. How is the residual calculated?

The residual is typically calculated by subtracting the numerical solution from the exact solution at each point in the domain. This results in a residual value for each point, which can then be averaged or summed to obtain an overall residual value for the entire solution.

3. Why is the residual used as a convergence criteria?

The residual is used as a convergence criteria because it provides a quantitative measure of the accuracy of the numerical solution. As the numerical solution approaches the exact solution, the residual decreases. Therefore, a small residual value indicates a more accurate numerical solution.

4. How is the convergence of a numerical solution determined using the residual?

The convergence of a numerical solution is determined by monitoring the behavior of the residual as the numerical method progresses. If the residual decreases with each iteration or time step, then the numerical solution is converging towards the exact solution. If the residual remains constant or increases, then the solution may not be converging and further analysis or adjustments to the numerical method may be necessary.

5. Are there any limitations to using the residual as a convergence criteria?

Yes, there are limitations to using the residual as a convergence criteria. The residual only measures the accuracy of the numerical solution and does not take into account other factors such as stability or computational efficiency. Additionally, the residual may not always decrease monotonically, which can make it difficult to determine when the solution has fully converged. Therefore, it is important to use the residual in conjunction with other convergence criteria and to carefully analyze the behavior of the residual over multiple iterations or time steps.

Similar threads

  • Differential Equations
Replies
3
Views
396
  • Differential Equations
Replies
5
Views
2K
Replies
4
Views
1K
  • Differential Equations
Replies
1
Views
895
  • Differential Equations
Replies
2
Views
1K
  • Differential Equations
Replies
2
Views
2K
Replies
5
Views
616
  • Differential Equations
Replies
1
Views
1K
  • Differential Equations
Replies
3
Views
2K
  • Differential Equations
Replies
7
Views
394
Back
Top