Professional Documents
Culture Documents
com
1. Introduction
This book provides an introduction to the finite difference method (FDM) for solving partial differential equations (PDEs). In addition to specific FDM details, general concepts such as stability, boundary conditions, verification, validation and grid independence are presented which are important for anyone wishing to solve PDEs by using other numerical methods and/or commercial software packages. Material is presented in order of increasing complexity and supplementary theory is included in appendices.
(1.1)
t, x, y are the independent variables (often time and space) a, b, c and f are known functions of the independent variables, U is the dependent variable and is an unknown function of the independent variables. partial derivatives are denoted by subscripts: U t
U U 2U , Ux , U yy 2 etc. t x y
The order of a PDE is the order of its highest derivative. A PDE is linear if U and all its partial derivatives occur to the first power only and there are no products involving more than one of these terms. (1.1) is second order and linear. The dimension of a PDE is the number of independent spatial variables it contains. (1.1) is 2D if x and y are spatial variables.
mywbut.com
mywbut.com
1.4.1 Initial and Boundary Conditions PDEs require proper initial conditions (ICs) and boundary conditions (BCs) in order to define what is known as a well-posed problem. If too many conditions are specified then there will be no solution; if too few conditions are specified the solution will not be unique. If the ICs/BCs are specified in the wrong place or at the wrong time then the solution will not depend smoothly on the ICs/BCs and small errors in the ICs/BCs will bring about large changes in the solution. This is referred to as an ill-posed problem. The PDEs encountered in practice are often non-linear and multi-dimensional and cannot be reduced to the simple so-called canonical forms of a) - e). However, we need to understand the properties of the solution to these simple model PDEs before attempting to solve more complicated PDEs. A second order elliptic PDE such as a) requires a boundary condition on U at each point on the boundary. Thus, these are called Boundary Value (BV) problems. The BC may be a value of U on the boundary or the value of its derivative (see Appendix B). Linear parabolic equations such a b) require ICs at the initial start time (usually t=0) and one BC at each end-point of the spatial domain (e.g. at the ends of the heated bar). Technically linear hyperbolic equations such as d) require ICs and as many BCs as there are inwardpointing characteristics (this is an advanced topic which we will not cover) which depend on the sign of wave speed c, thus: If c>0, we need ICs: U(0,x) = f(x) and BCs: U(t,0) = g(t); If c<0, we need ICs: U(0,x) = f(x) but no BCs. These are called Initial Boundary Value Problems (IBV) problems. 1.4.2 Domain of Dependence The differences between the types of PDEs can be illustrated by sketching their respective domains of dependence. So for example, in the hyperbolic case d), point P (x0, t0) in Figure 1.1 can only be influenced by points lying within the region bounded by the two characteristics x+ct = const and x-ct = const and t < t0. This region is called the domain of dependence. In turn, point P can influence points at later times lying within its zone of influence. In the parabolic case, shown in Figure 1.2 information travels downstream (or forward in time) only and so the domain of dependence of point P (x0, t0) in this case is the region t < t0 and the zone of influence is all points for which t > t0
mywbut.com
t x+ct = const BC
Zone of influence
P (x0, t0)
BC
IC
Figure 1.1 Domain of dependence: hyperbolic case.
Domain of dependence IC
Figure 1.2 Domain of dependence: parabolic case.
mywbut.com
In the elliptic case, corresponding to subsonic flow (Figure 1.3), information travels in all directions at infinite speed so the solution at point P (x0, t0) influences all points within the domain and vice versa. BC y
BC
Figure 1.3 Domain of dependence: elliptic case.
Notice in this case that the whole region bounded by the BCs is both a domain of dependence and zone of influence.
mywbut.com
The type of PDE fundamentally influences the choice of solution strategy. Time dependent hyperbolic problems and parabolic problems illustrated by Figures 1.1 and 1.2 are solved numerically by timemarching methods which involves, as its name suggests, obtaining the numerical solution at a later time from that at an earlier time starting from given ICs. Elliptic problems, as illustrated in Figure 1.3 are solved numerically by so-called relaxation methods.
mywbut.com
1.7 Exercise 1
1. Assuming that t is time and x and y are spatial variables give the dimensions of the PDEs in a) to e) of Section 1.4. Classify the following PDEs: b) U xx U yy 0 , c) U t U xx 0 .
2.
a) U tt 2 U xx ,