# Mathematical test method for the numerical solution of PDEs?

What are some of the methods used to test for the exactitude of a numerical solution, given that the analytical solution isn't available, and the numerical solution converges ?

You should also read about the Method of Manufactured Solutions (PDF) which will show you how to generate analytical solutions to your problem.

• I second this approach. This way you compare your solution to what you've manufactured as a solution, providing both verification that your system is well defined and that your numerical techniques converge appropriately. – Jesse Johns Oct 18 '15 at 18:36

Verification of a numerical solution is not fully possible when there is no analytical solution for comparison, but there are still several ways to gain confidence in the "correctness".

In your question the meaning of "the numerical solution converges" is not fully clear. "Convergence" in the sense that the numerical code produces a finite answer in finite time is of course necessary for correctness. More strongly, typically a mesh-refinement study will be performed to show that the solution converges as the discretization becomes finer.

If your PDE system is $F(x)=0$, then the error is $\Delta x=x_h-x_*$, where $x_h$ is the discrete solution for mesh-size $h$ and $x_*$ is the exact solution. You would want the convergence to be monotone (i.e. refining mesh does not increase error), and possibly also show a consistent order of convergence (e.g. $|\Delta x|=O[h^{-p}]$).

In your case, you could choose some proxy for the "exact" solution. For example, this could be a solution on a very fine mesh, or a solution from another code, e.g. from the literature. (For validation, rather than verification, you would use observations from the natural/experimental/engineered system your PDE is modeling.) Then you can use this proxy in the mesh refinement convergence analysis.

Rather than the solution error, you can also look at the solution residual, i.e. $|F_h(x_h)|$. In this case you should normalize the residual so it does not inherently grow with mesh refinement. For example the residual could be averaged, or integrated over the fixed domain size (conceptually, $\int_\Omega F d\Omega = \bar{F}|\Omega|$, with $h=|\Omega|/N$).

I would also reccomend doing code verification as well. That is, solve some problems that do have an analytical solution using the same code, and verify that these are correct. (Here, you can manufacture test cases that by design have an analytical solution; see Bill Barth's answer.)