2.4.3 Truncation Error for a PDE
In the discussion of ODE integration, we used the ideas of consistency and stability to prove convergence through the Dahlquist Equivalence Theorem. Similar concepts also exist for PDE discretizations, however, we cannot cover these here. We will briefly look at the truncation error for a partial differential equation. We have already discussed the local truncation error for finite difference approximation of derivatives.
Similar to the ODE case, the truncation error is defined as the remainder after an exact solution to the governing equation is substituted into the finite difference approximation. For example, suppose we are using the FTCS algorithm in Equation (2.57) to approximate the one-dimensional convection-diffusion equation. Then the local truncation error for the PDE approximation is defined as,
where \(U(x,t)\) is an exact solution to Equation (2.55).
Note that the truncation error defined here for PDE's is not quite a direct analogy with the standard definition of local truncation error used in ODE integration, specifically in Equation (1.49). In particular, in the ODE case, the truncation error is defined as the difference between the numerical solution and the exact solution after one step of the method (starting from exact values). However, in the PDE case, we have defined the truncation error as the remainder after an exact solution is substituted into the numerical method when the numerical method is written in a form that approximates the governing PDE.
Except for this difference in the definition, the calculation of the local truncation follows the same procedure as in the ODE case in which Taylor series substitutions are used to expand the error in powers of \({\Delta t}\). Continuing on with our example, we use Taylor series of \(U\) about \(t=t^ n\) and \(x=x_ i\). However, we can use our previous results from the analysis of the truncation error of spatial derivatives. Specifically, we showed in during in-class discussions that,
Using these results,
Then, performing a similar Taylor series of the time derivative approximation gives,
Substituting this into \(\tau\) and collecting terms in powers of \({\Delta t}\) and \({\scriptstyle \Delta } x\) gives,
The first line of this equation is actually just the PDE, evaluated at \(t=t^ n\) and \(x=x_ i\). Since \(U\) is an exact solution to the PDE, this is zero. The second line shows that the time discretization introduces an \(O({\Delta t})\). The third line shows that the spatial discretization introduces an \(O({\scriptstyle \Delta } x^2)\) error. Thus, this numerical method is first-order accurate in time and second-order accurate in space.
Summary The truncation error is defined as the remainder after an exact solution to the governing equation is substituted into the finite difference approximation, and is computed using Taylor series expansions to expand the error in terms of \({\Delta t}.\)
Exercise
Consider the following convection-diffusionsteady-state PDE: \(vU_ x = \mu U_{xx}\) and the following discretization: \(v_ i\delta _ x^{-}U_ i = \mu \delta _ x^2U_ i\). What is the order of accuracy for this finite difference approximation?