The dual reciprocity boundary element method for two-dimensional Burgers equations using MATLAB. W. Toutip 1, S. Kaennakam 1 and A. Kananthai 2 1 Department of Mathematics, Khon Kaen University, Khon Kaen 40002, THAILAND 2 Department of Mathematics, Chiang Mai University, Chiang Mai 50200, THAILAND Abstract The 2-dimensional Burgers equations is a mathematical model to describe various kind of phenomena such as turbulence and viscous fluid. The traditional methods such as finite difference and finite element method have been used to solve the problem. In this work we introduce the dual reciprocity boundary element method to handle such problem. A new modern language, MATLAB is developed to implement a program applying the method to the problem. Numerical results are compared with those of exact solutions. 1. Introduction 1.1 The Dual Reciprocity Boundary Element Method The Boundary Element Method (BEM) has become an important tool for solving problems in applied science and engineering. Its origins are quite recent compared with those of the Finite Difference Method(FDM) and the Finite Element Method (FEM). The BEM has its beginnings in the early 1960s with the research work of Massonet(1956)[1], Rizzo(1967)[2] and Cruse (1969) in elasticity, Jaswon(1963)[3] and Symm(1963)[4] in potential theory, Hess and Smith(1964)[5] in aerodynamics, Shaw(1970) [6] in acoustics and Rizzo and Shippy(1970)[7] in heat condition, in which the underlying physical processes are expressed as integral equations posed on the boundary of the region of interest.the term boundary element method was first used by Brebbia and Dominguez(1977)[8] who realize the analogy between the discretisation process for the boundary integral method and that for the already established finite element method. Presently, the BEM is a very active field of study especially within the engineering community, and it is experiencing very rapid development in research and applications
2 worldwide. The followings are some points of view about the features and the capability of BEM form researchers. One of the most interesting features of the BEM is the much smaller system of equations and the considerable reduction of the data required to run a program. Moreover, the numerical accuracy of the method is generally greater than that the FEM (Brebbia, 1978)[9]. The BEM has emerged as a powerful alternative to the FEM, particularly in case where better accuracy is required due to difficulties such as stress concentration or where the domain extends to infinity (Ciskowski and Brebbia, 1991)[10]. The BEM is well established by now as an accurate and powerful numerical technique in continuum mechanics (Becker,1992)[11]. The most important feature of the BEM is that it requires only the discretisation of the boundary rather than the domain. It is now gaining very considerable popularity and being incorporated into high-speed computer algorithms immediately useful to the practicing analyst (Banerjee, 1994)[12]. The BEM occupies a less prominent role in engineering than its features and capability due to the complexity of the mathematical background (Paris and Canas, 1997)[13]. More introductory discussion on this subject can be founded in Brebbia and Dominguez(1989). Boundary elements are usually associated with direct formulations in which the problem unknowns are the physical variables, for instance potential or fluxes, what is more attractive to users than the indirect formulations, used mainly before 1978, which involve concepts such as sources or dipoles. The direct formulation is somewhat more general, elegant and simple to apply in computer codes. However, there are some difficulties in extending the method to applications such as non-homogeneous, non-linear and time dependent problems. The main drawback in these cases is the need to discretize the domain into a series of internal cells to deal with the terms taken to the boundary by application of the fundamental solution. This additional discretization destroys some of the attraction of the method. A new approach is needed to deal with domain integrals in boundary element. Several methods have been proposed by different authors. The dual reciprocity boundary element method (DRM) is essentially a generalized way of constructing particular solutions that can be used to solve non-linear problems.
3 1.2 Burgers Equation In recent years, Burgers equation have received a considerable amount of attention due to the large number of physically important phenomena [14] that can be modeled using these equation. Several studies have been published on the numerical solution of Burgers equations and related problems, and some attention has been given to the convection-dominated case. In this direction, Thomaidis et al. [15] studied a finite difference method using the modified method of characteristics, and Caldwell et al. [16] present a solution based on finite elements with moving nodes. Other studies include those of Christie et al., Staughan et al., Van Niekerk and Van Niekerk, and Saunders et al. [17-20]. All of the above studies concentrate on the one-dimensional Burgers equation, both steady and time-dependent. An extensive comparative study of finite difference and finite element solutions of the two-dimensional problem was performed by Fletcher [21] who used a time split algorithm to obtain steady-state solutions of Burgers equations. The Burgers equation is one of the very few nonlinear partial differential equation which can be solved exactly for a restricted set of initial function φ(x), only. In the context of gas dynamic, Hopf [22] and Cole [23] independently showed that this equation can be transformed to the linear diffusion equation and solved exactly for an arbitrary initial condition. The study of the general properties of the Burgers equation has motivated considerable attention due to its applications in field as diverse as number theory, gas dynamics, heat conduction, elasticity, etc. 1.3 Matlab Computer Program MATLAB is an interactive system for numerical computation. Numerical analyst Cleve Moler wrote the initial Fortran version of MATLAB in the late 1970s as a teaching aid. It became popular for both teaching and research and evolved into a commercial software package written in C. For many years now, MATLAB has been widely used in universities and industry. MATLAB has several advantages over more traditional means of numerical computing (e.g., writing Fortran or C programs can calling numerical libraries): 1.3.1 It allows quick and easy coding in a very high-level language.
4 1.3.2 Data structures require minimal attention; in particular, arrays need not be declared before first use. 1.3.3 An interactive interface allows rapid experimentation and easy debugging. 1.3.4 High-quality graphics and visualization facilities are available. 1.3.5 MATLAB M-files are completely portable across a wide range of platforms. 1.3.6 Toolboxes can be added to extend the system, giving, for example, specialized signal processing facilities and a symbolic manipulation capability. 1.3.7 A wide rang of user-contributed M-files is freely available on the Internet. Furthermore, MATLAB is a modern programming language and problem solving environment: it has sophisticated data structures, contains built-in debugging and profiling tools, and supports object-oriented programming. These factors make MATLAB an excellent language for teaching and a powerful tool for research and practical problem solving(see more detail in [24]). 2 Formulation of The Dual Reciprocity Method Consider the Poisson equation 2 u = b (1) where b = b(x, y). The solution to above equation can be expressed as the sum of the solution of homogenous and a particular solution as u = u h + û (2) where u h is the solution of the homogeneous equation and û is a particular solution of the Poisson equation such that 2 û = b (3) We approximate b as a linear combination of interpolation functions for each of which we can find a particular solution at points which are situated in the domain and on its boundary. If there are N boundary nodes and L internal nodes, there will be N + L interpolation functions, f j, and consequently N + L particular solution, û j.
5 The approximation of b over domain Ω is written in the form b(x, y) N+L j=1 α j f j (x, y) (4) If b i and f ij are the values of b and f j at node i respectively, then we have a matrix equation for the unknown coefficients α j : j = 1, 2,..., N + L as b=fα (5) The particular solutions û j, and the interpolation function, f j are linked through the relation 2 û j = f j (6) The interpolation function is also called radial basis function. In this work we use the linear function f = 1 + r. Substituting equation (6) into (4) gives b N+L j=1 α( 2 û j ) (7) Equation (7) can be substituted into the original equation (1) to give the following expression 2 u = N+L j=1 α( 2 û j ) (8) Multiplying by the fundamental solution and integrating over the domain, we obtain Ω ( 2 u)u dω = N+L j=1 α j Ω ( 2 û j )u dω (9) Note that the same result may be obtained from equation ( 2 u)u dω = bu dω (10) Ω Integrating by parts the Laplacian terms in (9) produce the following integral equation for each source node i (Partridge and Brebbia, 1992): c i u i + Γ q udγ Γ u qdγ = N+L j=1 Ω α j (c i û ij + Γ q û j dγ u ˆq j dγ) (11) Γ
6 The term ˆq j in equation (11) is defined as ˆq j = û j, where n is the unit outward normal n to Γ, and can be written as ˆq j = û j x x n + û j y y n Note that equation (11) involves no domain integrals. The next step is to write equation (11) in discretise form, with summations over the boundary elements replacing the integrals. This gives, for a source node i, the expression c i u i + Γ k q udγ Γ k u qdγ = N+L j=1 α j (c i û ij + Γ k q û j dγ (12) u ˆq ) j dγ Γ k After introducing the interpolation function and integrating over each boundary element, the above equation can be written in terms of nodal values as c i u i + H ik u k G ik q k = N+L j=1 α j (c i û ij + H ik û kj ) G ik ˆq kj where the definition of the terms H ik and G ik are defined as in [26]. The index k is used for the boundary nodes which are the field points. After application to all boundary nodes, using a collocation technique, equation (14) can be expressed in matrix form as Hu Gq = N+L j=1 (13) (14) α j (Hû j Gˆq j ) (15) If each of the vectors û j and ˆq j is considered to be one column of the matrices Ûj and ˆQ j respectively, then equation (15) may be written without the summation to produce Hu Gq = (HÛ G ˆQ)α (16) Note that equation (14) contains no domain integrals. The source term b in (1) has been substituted by equivalent boundary integrals. This was done by first approximating b using equation (7), and then expressing both the right and left hand sided of the resulting expression as boundary integrals using the second form of Green s theorem or a reciprocity principle. It is this operation which gives the name to the method: reciprocity has been applied to both side of (9) to take all the terms to the boundary, hence Dual Reciprocity Boundary Element Method.
7 From equation (5), α is given as α = F 1 b (17) the right hand side of equation (16) is thus a known vector. It can be written as Hu-Gq=d (18) where the vector d is defined as d = ( HÛ G ˆQ ) α (19) Applying boundary condition to (18), this equation reduces to the form Ax = y (20) where x contain N unknown boundary values of u and q. After equation (20) is solved using standard techniques such as Gaussian elimination, the values at any internal node can be calculated from equation (14), each one involving a separate multiplication of known vectors and matrices. In the case of internal nodes, we have c i = 1 and equation (14) becomes u i = H ik u k + G ik q k + N+L j=1 α j (c i û ij + H ik û kj ) G ik ˆq kj (21) 3 Computer implementation of the DRM for Burgers equation We first substitute equation (17) into equation (16) to get the equation system matrix which expressed as Hu Gq = (HÛ G ˆQ)F 1 b (22) Setting then equation (22) becomes S = (HÛ G ˆQ)F 1 (23) Hu Gq = Sb (24)
8 Consider the following system of two-dimensional Burgers equation: subject to the initial condition: u t + u u x + v u y = 1 R ( 2 u) (25) v t + u v x + v v y = 1 R ( 2 v) (26) u(x, y, 0) = φ 1 (x, y), (27) v(x, y, 0) = φ 2 (x, y), (28) where (x, y) D and the boundary condition: u(x, y, t) = ϕ(x, y, t), (29) where x, y D, t > 0 v(x, y, t) = ψ(x, y, t), (30) and D is a domain of the problem, D is its boundary; u(x, y, t) and v(x, y, t) are the velocity components to be determined, φ 1, φ 2, ϕ and ψ are known functions and R is the Reynolds number, which described in [31]. The analytic solution of (25) and (26) was given by Fletcher using the Hopf-Cole transformation [27]. The numerical solutions of this equation system have been studied by several authors. Jain and Holla [28] developed two algorithms based on cubic spline function technique. Fletcher [29] has discussed the comparison of a number of different numerical approaches. As described in [26], u u, u v, v u x y x obtain and and v v y are approximated similarly. Then we u u x = U F x F 1 u (31) v u y = V F y F 1 u (32) u v x = U F x F 1 v (33) v u y = V F y F 1 v (34)
9 From equation (22) and (24) we obtain Hu Gq = (HÛ G ˆQ)F 1 b 1 (35) and Hv Gz = (H ˆV GẐ)F 1 b 2 (36) where q = u n, z = v n and b 1 = R( u t + u u x + v u y ) (37) b 2 = R( v t + u v x + v v y ) (38) In the case, if we consider Û, ˆV to be generated by using the same redial basis function, then we get Û = ˆV (39) which yield Setting ˆQ = Ẑ (40) S = (HÛ G ˆQ)F 1 (41) then equation (35) and (36) becomes Hu Gq = Sb 1 (42) and Hv Gz = Sb 2 (43) For the time derivatives, we use the forward difference method to approximate time derivative u t v and. The forward difference is expressed as t u = ut+1 u t t v = vt+1 v t t (44) (45)
10 where u = u and v = v t t Substituting equation (31) to (34), (37) and (38) in equation (42) and (43), then Setting then equation (46) and (47) becomes (Hu-Gq) = SR( u + U F x F 1 u + V F y F 1 u) (46) (Hv-Gz) = SR( v + U F x F 1 v + V F y F 1 v) (47) C = U F x F 1 + V F y F 1 (48) (Hu-Gq) = SR( u + Cu) (49) and (Hv-Gz) = SR( v + Cv) (50) respectively. Substituting equation (44) and (45) in above equations. The following expressions are obtained (RSC + SR t H)ut+1 + Gq t+1 = RS t ut (51) (RSC + SR t H)vt+1 + Gz t+1 = RS t vt (52) Note that the element of matrices H, G and S depend only on geometrical data. Thus, they can all be computed once and stored. In computing step using MATLAB we apply the initial condition to the right side of equation (51) and (52), and boundary conditions to the left hand side of the two equations. In each time step, the iteration will be used to get the suitable solution. For the detail of this, we explain step by step as the following. 1. Construct C in equation (48) by setting it be zero for the first iterative loop for both U and V. 2. Set all the values appearing in equation (51) and (52), then apply the initial condition on right side and boundary condition on left side which reduce those equations into equation system Ax = y
11 3. After solving this equation system, we get the solutions of U and V. Then the both solutions will be tested by condition of iteration method. If they are considered to be good enough, they will be used to be as the initial condition in next time-step. However, if they are not, they will be used to construct C in next iterative loop and computing in similar way again. 4. This iterative loop is processing continuously until the solutions of U and V satisfy the condition of the method in each time-step. The main parts of this program are shown below C=(Usq*DFX+Vsq*DFY)*Finv; T=R*A*C+(R*A/delt)-HNEW; S=R*A/delt; % Construct matrix to change to be in form Ax=y AAu2=mtAAu2(n,l,T,GNEWL); % can be used in both case of U and V BBu2=mtBBu2(n,l,T,GNEWL); % can be used in both case of U and V bdcu=sfbdu(n,l,xb,yb,delt,t,r);%applying boundary condition for U bdcv=sfbdv(n,l,xb,yb,delt,t,r);%applying boundary condition for v BRU=(S*Urhs-BBu2*bdcU); BRV=(S*Vrhs-BBu2*bdcV); % Construct new matrix containing two systems of U and V LMIUV=mixUVL(n,l,AAu2); % LHS of Ax=B RMIUV=mixUVR(n,l,BRU,BRV); % RHS of Ay=B SolUV=(inv(LMIUV))*RMIUV; % solution % Seperate values of U and V from known values SolUV Uval3=solU3(SolUV,bdcU,n,l);%the value of U at every node in domain Vval3=solV3(SolUV,bdcV,n,l);%the value of V at every node in domain Uval=Uval3; % is the solution of U Vval=Vval3; % is the solution of V
12 4 Numerical examples The program using MATLAB has been successfully used in the implementation of the DRM for both linear and non-linear problem. We present here only the Burgers equation as the following examples: Example 1 Burgers equation Consider Burgers equation (Partridge and Brebbia,1992[25]) 2 u = u u x (53) on the elliptical domain in the positive quadrant as shown in Figure 1.1 (3,1) 13 (1,0) 1 9 (5,0) 5 : Boundary node (3,-1) : Internal point Figure 1.1 Discretisation of the boundary into 16 elements in elliptical domain The boundary condition is the Dirichlet condition with u = 2 x on the boundary. The normal derivative agrees well with the exact solution as shown in Figure 1.2. Now the exact is defined as follows q = 1 2 [ (x 3) 2 + 4y 4 2 x ][ (x 3) ] 2 2 The internal solution is compared with those of the method in Partridge and Brebbia (1992) [29] and the exact solution in Table 1.1.
13 Table 1.1 Internal solutions for the problem in Example 1 Point This work Partridge Exact (4.50,0.00) 0.446 0.445 0.444 (4.20,-0.35) 0.478 0.477 0.476 (3.60,-0.45) 0.558 0.558 0.555 (3.00,-0.45) 0.669 0.669 0.666 (2.40,-0.45) 0.834 0.834 0.833 (1.80,-0.35) 1.109 1.110 1.111 (1.50,0.00) 1.333 1.333 1.333 2.5 2 Normal Derivative on the boundary This work Exact Normal derivative 1.5 1 0.5 0 0.5 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 Node figure 1.2 Normal derivative on the boundary Example 2 The 2-dimensional of Burgers equation Consider the two-dimensional Burgers equation with the following conditions u t + u u x + v u y = 1 R ( 2 u) (54) v t + u v x + v v y = 1 R ( 2 v) (55)
14 1. Domain of the problem is D = (x, y) : 0 x 1, 0 y 1 2. Both boundary and initial condition are taken from the exact solution given by u(x, y, t) = 3 4 1 4[1 + exp(( 4x + 4y t)r/32)] v(x, y, t) = 3 4 + 1 4[1 + exp(( 4x + 4y t)r/32)] 3. R=100, tolerance ɛ = 10 5 of iteration step The boundary is discretized into 80 nodes with 9 internal nodes. The internal solution values of u and v at time t=0.01 with time step t = 10 5 are compared with those from A.R. Bahadir [31] and the exact solutions as shown in Figure 2.1 and Figure 2.2 Comparision of numerical and exact values of u for R=100 0.9 This work A.R.Bahadir 0.85 Exact 0.8 Values 0.75 0.7 0.65 0.6 0.55 0.5 0.45 0 1 2 3 4 5 6 7 8 9 10 Nodes Figure 2.1 Comparison of solution of u at t=0.01 We can see from Figure 2.1 and Figure 2.2 that the numerical solutions are compared well with those from A.R. Bahadir [31] and the exact solution.
15 Comparision of numerical and exact values of v for R=100 1.1 This work A.R.Bahadir 1.05 Exact 1 0.95 Values 0.9 0.85 0.8 0.75 0.7 0 1 2 3 4 5 6 7 8 9 10 11 Nodes Figure 2.2 Comparison of solution of v at t=0.01 5 Conclusion We have shown how to apply the dual reciprocity boundary element method using MATLAB to solve Burgers equation. Numerical results for both examples are compared well with those from the exact solutions. The ideas developed above can be applied to any problem which may reduced to a pair of non-linear problems. The following comments may be used to improve the solutions of such problem 1. Using other radial basis functions such as the augmented thin plate spline expressed as f = r 2 log(r) + a + bx + cy. 2. Applying Newton iteration method 3. Using the gradient approach to deal with corner problems References [1] C.E. Massonet, Solution du probleme aux tensions de l elasticite tridimensional, Proc.9th Cong.,Appl Mech.,(1956),168-180. [2] F.J. Rizzo, An integral equation approach to boundary value problems of classical elastostatics,quart., Appl.Math.,Vol. 25,(1967),83-95.
16 [3] M.A. Jaswan, Integral equation methods in potential theory I, Proceedings of the Royal society, Vol. 275,(1963),23-32. [4] G.T. Symm, Integral equation methods in potential theory II, Proceedings of the Royal society, Vol. 275,(1963),33-46. [5] J. Hess and A.M.O. Smith, Calculation of non-lifting potential flow about arbitrary three-dimension bodies,journal of Ship Research, Vol. 8, (1964),22-44. [6] R.P. Shaw, An integral equation approach to acoustic radiation and scattering, topic in Ocean Engineering II, Houston, Gulf Publishing Co., 1970. [7] F.J. Rizzo and D.J. Shippy, A method of solution for certain problems of transient heat conduction, AIAA Journal, Vol. 8, (1970), 2004-2009. [8] C.A. Brebbia add J. Dominguez, Boundary element methods for potential problems,applied Mathematical Modelling, Vol. 1, (1970), 7. [9] C.A. Brebbia, The boundary element method for engineers, Pentech Press, 1978. [10] R.D. Ciskawski and C.A. Brebbia, Boundary element method in acoustics, Addison-Wesley, 1991. [11] A.A. Becker, The boundary element method in engineering, Berkshire:McGraw-Hill, 1992. [12] P.K. Benerjee, The boundary element methods in engineering, Cambridge:McGraw-Hill, 1994. [13] F. Paris and J. Cañas, Boundary element method:fundamentals and application, Oxford University Press, 1997. [14] C.A. Fletcher, Burgers equation: a model for all reasons, in: J. Noye (Ed.), Numerical Solution of Partial Differential Equations, North-Holland, Amsterdam, 1982. [15] G. Thomaidis, K. Zygourakis, M. Wheeler, An explicit finite difference scheme based on the modified method of characteristics for solving convection-diffusion problems in one space dimension, Numer. Meth. Partial Differential Equation, Vol. 4, (1988), 119-137. [16] J. Caldwell, P. Wanless, A.E. Cook, Solution of Burgers equation for large reynolds number using finite elements with moving nodes, Appl. Math. Modelling, Vol. 11, (1987),211-214.
17 [17] I. Christie et al., Product approximation for non-linear problems in the finite element method, IMA J. Numer. Anal., Vol. 1, (1981), 253-266. [18] B. Straughan et al., Nonlinear stability for a modified form of Burgers equation Numer. Meth. Partial Differential Equations, Vol. 3, (1987), 51-84. [19] A. Van Niekerk, The boundary element method for engineers, Pentech Press, 1978. [20] R. Saunders, J. Caldwell, P. Wanless, A variational-iterative scheme applied to Burgers equation, IMA J. Numer. Anal., Vol. 4, (1984), 349-362. [21] C.A. Fletcher, A comparison of finite element and finite difference solution of the, one- and two-dimensional Burgers equations, J. Comput. Phys., Vol. 51, (1983), 159-188. [22] E. Hopf, The partial differential equation u t + uu x = µu xx,comm. Pure Appl. Math., Vol. 3, (1950, 201-230. [23] J.D. Cole, On a quaslinear parabolic equations occurring in aerodynamics, Quart. Appl. Math., Vol. 9, (1951), 225-236. [24] D.J. Higham, A.E. Cook, MATLAB guide, University of Strathclyde Glasgow, Scotland, 2000. [25] P.W. Partridge, C.A. Brebbia, L.C. Wrobel, The Dual Reciprocity Boundary, Element Method, Jouthampton Boston, Computational Mechanics Publications, 1992. [26] W. Toutip, The dual reciprocity boundary element method for linear and nonlinear, problems, Degree of Doctor, University of Hertfordshire, England: 2001. [27] C.A.J. Fletcher, Generating exact solutions of the two-dimensional Burgers, equationint. J. Numer. Meth. Fluids., Vol. 3, (1983),213-216. [28] P.C. Jain and D.N. Holla, Numerical solution of coupled Burgers equations, Int. J. Numer. Meth. Eng., Vol. 12, (1978), 213-222. [29] C.A.J. Fletcher, A comparison of finite element and finite difference solution of the one- and two-dimensional Burgers equations, J. Comput. Phys., Vol. 51, (1983), 159-188.
18 [30] F.W. Wubs and E.D. de Goede, An explicit-implicit method for a class of timedependent partial differential equations, Appl. Numer. Math., Vol. 9, (1992), 157-181. [31] A. Refik Bahadir, A fully implicit finite-difference scheme for two-dimensional Burgers equations, Applied Mathematics and Computation, Vol. 137, (2003), 131-137.