312 using the ordinary di erential equations soft 26

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: tervals to obtain xj;1 ; 2xj + xj+1 = ; (Wj+1 ; Wj ) _ __ j = 1 2 : : : J ; 1: The mesh trajectories and solution shown in Figure 4.3.3 used a mesh with J = 30. The mesh is concentrated in the vicinity of the sharp front and following it with approximately the correct velocity. Comparable accuracy with a uniform stationary mesh would require more than 1000 elements. 4.3.3 A Posteriori Error Estimation A priori estimates of local discretization errors involve unknown derivatives of the exact solution. They are useful for ascertaining convergence rates, but rarely provide quantitative information. A posteriori error estimates use a computed solution to provide quantitative information. The two common techniques to obtain a posteriori error estimates involve comparing solutions on di erent meshes and comparing solutions of different orders. We will sketch the latter technique and describe the former in greater detail. Suppose that we have two methods with local errors un+1 ; Ujn+1 = t c1 tp + c2 xp + O( tp+1) + O( xp+1)] j (4.3.14a) un+1 ; Vjn+1 = t d1 tp+1 + d2 xp+1 + O( tp+2) + O( xp+2)]: j (4.3.14b) The spatial and temporal orders have been equated for simplicity. The technique that we are about to present works when these orders di er. Adding and subtracting the higher order-solution yields un+1 ; Ujn+1 = (un+1 ; Vjn+1 ) + (Vjn+1 ; Ujn+1 ): j j (4.3.15a) Using (4.3.14) we see that the term on the left of (4.3.15a) is t(O( tp) + O( xp)) and the rst term on the right is t(O( tp+1) + O( xp+1)). Thus, the second term on the 28 Parabolic PDEs right must be t(O( tp) + O( xp)). Hence, we can neglect the rst term on the right to obtain the approximation un+1 ; Ujn+1 Vjn+1 ; Ujn+1 : j (4.3.15b) Thus, the di erence between the lower- and higher-order solutions furnishes an estimate of the error of the lower-order solution. Unfortunately, the technique provides no error estimate of the higher-order solution, but it is common to propagate it forward in time rather than propagating the lower-order solution. This strategy is called local extrapolation. It is generally acceptable in regions where solutions are smooth, but can be dangerous near singulariteis. Unless there are special properties of the di erence scheme that can be exploited, the work involved in obtaining the error estimate is comparable to that of obtaining the solution. It's possible that the higher-order method can just provide a \correction" to the lower-order method. In this case, the work to obtain the lower-order solution need not be duplicated when obtaining the higher-order solution. This is called order embedding or p-re nement. There are often special super convergence points where the error converges at a faster rate than it does elsewhere. Knowledge of these points can reduce the computational cost of obtaining the error estimate 4]. The technique of using solutions computed on di erent meshes to obtain an a posteriori error estimate is called Richardson's extrapolation 16] or h-re nement. Suppose that a solution has been obtained using scheme (4.3.14a). Obtain a second solution using half the time and spatial step sizes, but starting from tn . The error of the second solution, ^ which we'll call Ujn+1 , is obtained from (4.3.14a) as ^ un+1 ; Ujn+1 = 2 2t c1( 2t )p + c2( 2x )p + O( tp+1) + O( xp+1)] j or ^ un+1 ; Ujn+1 = 2pt c1 tp + c2 xp + O( tp + 1) + O( xp + 1)] j (4.3.16) Remark 1. The indexing of this second ( ne-mesh) solution should have been changed. ^ Thus, Ujn+1 corresponds to U2nj+2. We haven't changed the indexing to emphasize that 4.3. Multilevel Schemes 29 the two solutions are sampled at the same points. Additionally, the mesh can be changed by other than a factor of two, but more e ort is involved. Subtracting (4.3.16) from (4.3.14a) yields 1 ^ Ujn+1 ; Ujn+1 = (1 ; 2p ) t c1 tp + c2 xp] + t(O( tp+1 ) + O( xp+1)): Neglecting the higher-order terms yields ^ n+1 n+1 p + c xp ] Uj ; Uj : t c1 t 2 1 ; 21p Thus, the error of the coarse-mesh solution (4.3.14a) may be estimated as ^ Ujn+1 ; Ujn+1 : (4.3.17) un+1 ; Ujn+1 j 1 ; 21p Richardson's extrapolation can also be used to estimate the error of the ne-mesh ^ solution Ujn+1 , but only at the coarse mesh points. The work of obtaining the error estimate is approximately four times the work of obtaining the solution. This is usually considered excessive unless the ne-mesh solution is propagated forward in time. As with order embedding, this can be risky near singularities. Example 4.3.3. Let us solve the kinematic wave equation ut + aux = 0 by the forward time-backward space scheme (2.2.4) Ujn+1 = (1 ; )Ujn + Ujn;1: As usual = a t= x is the Courant number. We choose a = 1, periodic initial data u(x 0) = sin x Thus, the exact solution is = 1=2, and the u(x t) = sin(x ; t): Since this scheme is rst order accurate, we obtain error estimates by setting p = 1 in (4.3.17). This gives ^ un+1 ; Ujn+1 Ejn+1 = 2(Ujn+1 ; Ujn+1 ): j 30 Parabolic PDEs Let us compare exact and estimated local errors by solving this problem for a single time step on 0 < x < 2 using meshes with spacing x = 2 =J , J = 4 8 16. Results for the exact errors and those estimated by Richardson's extrapolation, present...
View Full Document

This document was uploaded on 03/16/2014 for the course CSCI 6840 at Rensselaer Polytechnic Institute.

Ask a homework question - tutors are online