
2 Finite Difference Methods 2.1 Basic Concepts of the Method of Finite Differences: Grid Functions and Difference Operators In Collatz’s famous 1950 monograph Numerical Treatment of Differential Equations, the following statement can be found: The finite difference method is a procedure generally applicable to boundary value problems. It is easily set up and on a coarse mesh it generally supplies, after a relatively short calcula- tion, an overview of the solution function that is often sufficient in practice. In particular there are classes of partial differential equations where the finite difference method is the only practical method, and where other procedures are able to handle the boundary conditions only with difficulty or not at all. Even today, when finite element methods are widely dominant in the nu- merical solution of partial differential equations and their applications, this high opinion of the finite difference method remains valid. In particular it is straightforward to extend its basic idea from the one-dimensional case to higher dimensions, provided that the geometry of the underlying domain is not too complicated. The classical theoretical foundation of the method of finite differences—which rests on consistency estimates via Taylor’s formula and the derivation of elementary stability bounds—is relatively easy, but it has the disadvantage of making excessive assumptions about the smoothness of the desired solution. Non-classical approaches to difference methods, as can be found for example in the standard book [Sam01] published 1977 in Russian (which unfortunately for many years was not widely known in the West) en- able a weakening of the smoothness assumptions. These ideas also appear in a slightly concealed form in [Hac03a] and [Hei87]. When we discuss the conver- gence analysis of finite volume methods in Section 2.5, we shall briefly sketch how to weaken the assumptions in the analysis of finite difference methods. When a finite difference method (FDM) is used to treat numerically a par- tial differential equation, the differentiable solution is approximated by some grid function, i.e., by a function that is defined only at a finite number of 24 2 Finite Difference Methods so-called grid points that lie in the underlying domain and its boundary. Each derivative that appears in the partial differential equation has to be replaced by a suitable divided difference of function values at the chosen grid points. Such approximations of derivatives by difference formulas can be generated in various ways, e.g., by a Taylor expansion, or local balancing equations, or by an appropriate interpretation of finite difference methods as specific finite element methods (see Chapter 4). The first two of these three approaches are generally known in the literature as finite difference methods (in the original sense) and finite volume methods, respectively. The related basic ideas for finite volume methods applied to elliptic differential equations are given in Section 2.5. The convergence of finite difference methods for parabolic and first-order hyperbolic problems is analysed in Sections 2.6 and 2.3, respec- tively. As an introduction to finite difference methods, consider the following example. We are interested in computing an approximation to a sufficiently smooth function u that for given f satisfies Poisson’s equation in the unit square and vanishes on its boundary: −∆u = f in Ω := (0, 1)2 ⊂ R2, (1.1) u =0 on Γ := ∂Ω. Finite difference methods provide values ui,j that approximate the desired function values u(xi,j ) at a finite number of points, i.e., at the grid points {xi,j }. Let the grid points in our example be T 2 xi,j =(ih,jh) ∈ R ,i,j=0, 1,...,N. Here h := 1/N , with N ∈ N, is the mesh size of the grid. Figure 2.1 Grid for the discretization 2.1 Basic Concepts 25 At grid points lying on the boundary Γ the given function values (which here are homogeneous) can be immediately taken as the point values of the grid functions. All derivatives in problem (1.1) have however to be approximated by difference quotients. From e.g. Taylor’s theorem we obtain ∂2u 1 (x ) ≈ ( u(x − ) − 2u(x )+u(x )) , 2 i,j 2 i 1,j i,j i+1,j ∂x1 h ∂2u 1 (x ) ≈ ( u(x − ) − 2u(x )+u(x )) . 2 i,j 2 i,j 1 i,j i,j+1 ∂x2 h If these formulas are used to replace the partial derivatives at the inner grid points and the given boundary values are taken into account, then an approx- imate description of the original boundary value problem (1.1) is given by the system of linear equations 4ui,j − ui−1,j − ui+1,j − − 2 ui,j−1 ui,j+1 = h f(xi,j ), i, j =1,...,N − 1. (1.2) u0,j = uN,j = ui,0 = ui,N =0, For any N ∈ N this linear system has a unique solution ui,j. Under certain smoothness assumptions on the desired solution u of the original problem one has ui,j ≈ u(xi,j ), as will be shown later. In the method of finite differences one follows the precepts: • the domain of the given differential equation must contain a sufficiently large number of test points (grid points); • all derivatives required at grid points will be replaced by approximating finite differences that use values of the grid function at neighbouring grid points. In problems defined by partial differential equations, boundary and/or initial conditions have to be satisfied. Unlike initial and boundary value prob- lems in ordinary differential equations, the geometry of the underlying domain now plays an important role. This makes the construction of finite difference methods in domains lying in Rn, with n ≥ 2, not entirely trivial. Let us consider the very simple domain Ω := (0, 1)n ⊂ Rn. Denote its closure by Ω. For the discretization of Ω asetΩh of grid points has to be selected, e.g., we may chose an equidistant grid that is defined by the points of intersection obtained when one translates the coordinate axes through con- secutive equidistant steps with step size h := 1/N . Here N ∈ N denotes the number of shifted grid lines in each coordinate direction. In the present case we obtain ⎧⎛ ⎞ ⎫ ⎨ x1 ⎬ ⎝ · ⎠ n x1 = i1 h,..., xn = in h, Ωh := · ∈ R : (1.3) ⎩ i1,...,in =0, 1,...,N ⎭ xn as the set of all grid points. We distinguish between those grid points lying in the domain Ω and those at the boundary Γ by setting 26 2 Finite Difference Methods Ωh := Ωh ∩ Ω and Γh := Ωh ∩ Γ. (1.4) Unlike the continuous problem, whose solution u is defined on all of Ω,the discretization leads to a discrete solution uh : Ωh → R that is defined only at a finite number of grid points. Such mappings Ωh → R are called grid functions. To deal properly with grid functions we introduce the discrete function spaces { → R } 0 { ∈ | } Uh := uh : Ωh ,Uh := uh Uh : uh Γh =0 , Vh := { vh : Ωh → R }. To shorten the writing of formulas for difference quotients, let us define the following difference operators where the discretization step size is h>0: + 1 j − (Dj u)(x):= u(x + he ) u(x) —forward difference quotient h (D−u)(x):= 1 u(x) − u(x − hej) —backward difference quotient j h D0 := 1 (D+ + D−)—central difference quotient. j 2 j j Here ej denotes the unit vector in the positive direction of the j-th coordinate + + + axis. Analogously, we shall also use notation such as Dx ,Dy ,Dt etc. when independent variables such as x,y,t,... are present. For grids that are gener- ated by grid lines parallel to the coordinate axes we can easily express differ- ence quotient approximations of partial derivatives in terms of these difference operators. Next we turn to the spaces of grid functions and introduce some norms that are commonly used in these spaces—which are isomorphic to finite- 0 dimensional Euclidean spaces. The space Uh of grid functions that vanish on the discrete boundary Γh will be equipped with an appropriate norm ·h. For the convergence analysis of finite difference methods let us define the 0 following norms on Uh: 2 n | |2 ∀ ∈ 0 uh 0,h := h uh(xh) uh Uh (1.5) xh∈Ωh —the discrete L2 norm; n 2 n | + |2 ∀ ∈ 0 uh 1,h := h [Dj uh](xh) uh Uh (1.6) xh∈Ωh j=1 —the discrete H1 norm;and | |∀ ∈ 0 uh ∞,h := max uh(xh) uh Uh (1.7) xh∈Ωh —the discrete maximum norm. 0 Finally, we introduce the discrete scalar product in Uh: 2.1 Basic Concepts 27 n ∀ ∈ 0 (uh,vh)h := h uh(xh) vh(xh) uh,vh Uh. (1.8) xh∈Ωh It is clear that n 2 2 + + ∀ ∈ 0 uh 0,h =(uh,uh)h and uh 1,h = (Dj uh,Dj uh)h uh Uh. j=1 The definitions of the norms ·0,h and ·∞,h and of the scalar product (·, ·)h use points xh that lie only in Ωh, so these norms and scalar product can also be applied to functions in the space Vh. They define norms for Vh that we shall call upon later. In the case of non-equidistant grids the common multiplier hn must be replaced by a weight µh(xh) at each grid point. These weights can be defined via appropriate dual subdomains Dh(xh) related to the grid points xh by µh(xh) := meas Dh(xh):= dx, xh ∈ Ωh. Dh(xh) In the equidistant case for Ω =(0, 1)n ⊂ Rn we may for instance choose Dh(xh)={ x ∈ Ω : x − xh∞ <h/2 }.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages102 Page
-
File Size-