Computational Partial Differential Equations Using MATLAB® CHAPMAN & HALL/CRC APPLIED MATHEMATICS AND NONLINEAR SCIENCE SERIES Series Editors Goong Chen and Thomas J. Bridges Published Titles Computing with hp-ADAPTIVE FINITE ELEMENTS, Volume 1, One and Two Dimensional Elliptic and Maxwell Problems, Leszek Demkowicz Computing with hp-ADAPTIVE FINITE ELEMENTS, Volume 2, Frontiers: Three Dimensional Elliptic and Maxwell Problems with Applications, Leszek Demkowicz, Jason Kurtz, David Pardo, Maciej Paszyński, Waldemar Rachowicz, and Adam Zdunek CRC Standard Curves and Surfaces with Mathematica®: Second Edition, David H. von Seggern Exact Solutions and Invariant Subspaces of Nonlinear Partial Differential Equations in Mechanics and Physics, Victor A. Galaktionov and Sergey R.
Svirshchevskii Geometric Sturmian Theory of Nonlinear Parabolic Equations and Applications, Victor A. Galaktionov Introduction to Fuzzy Systems, Guanrong Chen and Trung Tat Pham Introduction to non-Kerr Law Optical Solitons, Anjan Biswas and Swapan Konar Introduction to Partial Differential Equations with MATLAB®, Matthew P. Coleman Introduction to Quantum Control and Dynamics, Domenico D’Alessandro Mathematical Methods in Physics and Engineering with Mathematica, Ferdinand F. Cap Mathematical Theory of Quantum Computation, Goong Chen and Zijian Diao Mathematics of Quantum Computation and Quantum Technology, Goong Chen, Louis Kauffman, and Samuel J.
Lomonaco Mixed Boundary Value Problems, Dean G. Duffy Multi-Resolution Methods for Modeling and Control of Dynamical Systems, Puneet Singla and John L. Junkins Optimal Estimation of Dynamic Systems, John L. Crassidis and John L.
Junkins Quantum Computing Devices: Principles, Designs, and Analysis, Goong Chen, David A. Church, Berthold-Georg Englert, Carsten Henkel, Bernd Rohwedder, Marlan O. Suhail Zubairy Stochastic Partial Differential Equations, Pao-Liu Chow CHAPMAN & HALL/CRC APPLIED MATHEMATICS AND NONLINEAR SCIENCE SERIES Computational Partial Differential Equations Using MATLAB® Jichun Li University of Nevada Las Vegas, NV, U. Yi-Tung Chen University of Nevada Las Vegas, NV, U.
MATLAB® and Simulink® are trademarks of the Math Works, Inc. and are used with permission. The Math- works does not warrant the accuracy of the text or exercises in this book. This book’s use or discussion of MATLAB® and Simulink® software or related products does not constitute endorsement or sponsorship by the Math Works of a particular pedagogical approach or particular use of the MATLAB® and Simulink® software.
CRC Press Taylor & Francis Group 6000 Broken Sound Parkway NW, Suite 300 Boca Raton, FL 33487-2742 © 2008 by Taylor & Francis Group, LLC CRC Press is an imprint of Taylor & Francis Group, an Informa business No claim to original U. Government works Version Date: 20131121 International Standard Book Number-13: 978-1-4200-8905-9 (eBook - PDF) This book contains information obtained from authentic and highly regarded sources. Reasonable efforts have been made to publish reliable data and information, but the author and publisher cannot assume responsibility for the validity of all materials or the consequences of their use. The authors and publishers have attempted to trace the copyright holders of all material reproduced in this publication and apologize to copyright holders if permission to publish in this form has not been obtained.
If any copyright material has not been acknowledged please write and let us know so we may rectify in any future reprint. Except as permitted under U. Copyright Law, no part of this book may be reprinted, reproduced, transmit- ted, or utilized in any form by any electronic, mechanical, or other means, now known or hereafter invented, including photocopying, microfilming, and recording, or in any information storage or retrieval system, without written permission from the publishers. For permission to photocopy or use material electronically from this work, please access www.
com (http://www.com/) or contact the Copyright Clearance Center, Inc. (CCC), 222 Rosewood Drive, Danvers, MA 01923, 978-750-8400. CCC is a not-for-profit organization that provides licenses and registration for a variety of users. For organizations that have been granted a photocopy license by the CCC, a separate system of payment has been arranged.
Trademark Notice: Product or corporate names may be trademarks or registered trademarks, and are used only for identification and explanation without intent to infringe. Visit the Taylor & Francis Web site at http://www.com and the CRC Press Web site at http://www.com Contents Preface xi Acknowledgments xiii 1 Brief Overview of Partial Differential Equations 1 1.1 The parabolic equations .2 The wave equations .3 The elliptic equations .4 Differential equations in broader areas .3 Ground water contamination .4 Petroleum reservoir simulation .5 A quick review of numerical methods for PDEs. 8 References 10 2 Finite Difference Methods for Parabolic Equations 13 2.2 Theoretical issues: stability, consistence, and convergence .4 2-D and 3-D parabolic equations .1 Standard explicit and implicit methods .2 The ADI methods for 2-D problems .3 The ADI methods for 3-D problems .5 Numerical examples with MATLAB codes. 33 References 36 v vi Computational Partial Differential Equations Using MATLAB 3 Finite Difference Methods for Hyperbolic Equations 39 3.2 Some basic difference schemes .3 Dissipation and dispersion errors .4 Extensions to conservation laws .5 The second-order hyperbolic PDEs .6 Numerical examples with MATLAB codes.
52 References 54 4 Finite Difference Methods for Elliptic Equations 57 4.2 Numerical solution of linear systems .2 Simple iterative methods .3 Modern iterative methods .3 Error analysis with a maximum principle .1 Mixed boundary conditions .2 Self-adjoint problems .3 A fourth-order scheme .5 Numerical examples with MATLAB codes. 76 References 78 5 High-Order Compact Difference Methods 79 5.1 One-dimensional problems .2 Approximations of high-order derivatives .4 Low-pass spatial filter .5 Numerical examples with MATLAB codes .2 High-dimensional problems .1 Temporal discretization for 2-D problems .3 Extensions to 3-D compact ADI schemes .4 Numerical examples with MATLAB codes .3 Other high-order compact schemes .1 One-dimensional problems .2 Two-dimensional problems. 127 Table of Contents vii 5. 127 References 130 6 Finite Element Methods: Basic Theory 133 6.1 Introduction to one-dimensional problems .1 The second-order equation .2 The fourth-order equation .2 Introduction to two-dimensional problems .1 The Poisson’s equation .2 The biharmonic problem .3 Abstract finite element theory .1 Existence and uniqueness .2 Stability and convergence .4 Examples of conforming finite element spaces .1 Triangular finite elements .2 Rectangular finite elements .5 Examples of nonconforming finite elements .1 Nonconforming triangular elements .2 Nonconforming rectangular elements .6 Finite element interpolation theory .7 Finite element analysis of elliptic problems .1 Analysis of conforming finite elements .2 Analysis of nonconforming finite elements .8 Finite element analysis of time-dependent problems .2 FEM for parabolic equations.
167 References 169 7 Finite Element Methods: Programming 173 7.1 FEM mesh generation .2 Forming FEM equations .3 Calculation of element matrices .4 Assembly and implementation of boundary conditions .5 The MATLAB code for P1 element .6 The MATLAB code for the Q1 element. 194 References 197 viii Computational Partial Differential Equations Using MATLAB 8 Mixed Finite Element Methods 199 8.1 An abstract formulation .2 Mixed methods for elliptic problems .1 The mixed variational formulation .2 The mixed finite element spaces .3 The error estimates .3 Mixed methods for the Stokes problem .1 The mixed variational formulation .2 Mixed finite element spaces .4 An example MATLAB code for the Stokes problem .5 Mixed methods for viscous incompressible flows .1 The steady Navier-Stokes problem .2 The unsteady Navier-Stokes problem. 235 References 237 9 Finite Element Methods for Electromagnetics 241 9.1 Introduction to Maxwell’s equations .2 The time-domain finite element method .1 The mixed method .2 The standard Galerkin method .3 The discontinuous Galerkin method .3 The frequency-domain finite element method .1 The standard Galerkin method .2 The discontinuous Galerkin method .3 The mixed DG method .4 The Maxwell’s equations in dispersive media .1 Isotropic cold plasma .4 Double-negative metamaterials. 281 References 283 10 Meshless Methods with Radial Basis Functions 287 10.2 The radial basis functions .3 The MFS-DRM .1 The fundamental solution of PDEs .2 The MFS for Laplace’s equation .3 The MFS-DRM for elliptic equations.
297 Table of Contents ix 10.4 Computing particular solutions using RBFs .5 The RBF-MFS .6 The MFS-DRM for the parabolic equations .1 Kansa’s method for elliptic problems .2 Kansa’s method for parabolic equations .3 The Hermite-Birkhoff collocation method .5 Numerical examples with MATLAB codes .6 Coupling RBF meshless methods with DDM .2 Non-overlapping DDM .3 One numerical example. 328 References 329 11 Other Meshless Methods 335 11.1 Construction of meshless shape functions .1 The smooth particle hydrodynamics method .2 The moving least-square approximation .3 The partition of unity method .2 The element-free Galerkin method .3 The meshless local Petrov-Galerkin method. 345 References 346 Appendix A Answers to Selected Problems 349 Index 361 Preface The purpose of this book is to provide a quick but solid introduction to advanced numerical methods for solving various partial differential equations (PDEs) in sciences and engineering. The numerical methods covered in this book include not only the classic finite difference and finite element meth- ods, but also some recently developed meshless methods, high-order compact difference methods, and finite element methods for Maxwell’s equations in complex media.
This book is based on the material that we have taught in our numerical analysis courses MAT 665/666 and MAT 765/766 at the University of Nevada Las Vegas since 2003. The emphasis of the text is on both mathematical theory and practical implementation of the numerical methods. We have tried to keep the mathematics accessible for a broad audience while still presenting the results as rigorously as possible. This book covers three types of numerical methods for PDEs: the finite difference method, the finite element method, and the meshless method.
In Chapter 1, we provide a brief overview of some interesting PDEs coming from different areas and a short review of numerical methods for PDEs. Then we introduce the finite difference methods for solving parabolic, hyperbolic, and elliptic equations in Chapters 2, 3, and 4, respectively. Chapter 5 presents the high-order compact difference method, which is quite popular for solving time-dependent wave propagation problems. Chapters 6 through 9 cover the finite element method.
In Chapter 6, fundamental finite element theory is introduced, while in Chapter 7, basic finite element programming techniques are presented. Then in Chapter 8, we extend the discussion to the mixed finite element method. Here both theoretical analysis and programming implemen- tation are introduced. In Chapter 9, we focus on some special finite element methods for solving Maxwell’s equations, where some newly developed algo- rithms and Maxwell’s equations in dispersive media are presented.
Chapter 10 is devoted to the radial basis function meshless methods developed in recent years. Some Galerkin-type meshless methods are introduced in Chapter 11. The book is intended to be an advanced textbook on numerical methods applied to diverse PDEs such as elliptic, parabolic, and hyperbolic equations. Each chapter includes about 10 exercises for readers to practice and enhance their understanding of the materials.
This book supplies many MATLAB R source codes, which hopefully will help readers better understand the pre- sented numerical methods. We want to emphasize that our goal is to provide readers with simple and clear implementations instead of sophisticated usages xi of MATLAB functions. The skilled reader should be able to easily modify or improve the codes to solve similar problems of his/her interest. This book can be used for a two-semester graduate course that provides an introduction to numerical methods for partial differential equations.
The first semester can cover the elementary chapters such as Chapters 1 through 5. This part can also be used at the undergraduate level as a one-semester introductory course on numerical methods or scientific computing. The rest of the chapters are more advanced and can be used for the second semester or a stand-alone advanced numerical analysis course. For product information, please contact: The MathWorks, Inc.
3 Apple Hill Drive Natick, MA 01760-2098 USA Tel: 508-647-7000 Fax: 508-647-7001 Email: info@mathworks.com Web: www.com Acknowledgments First, we would like to thank Professor Goong Chen for his kind support to accept our book into this book series. We also want to thank Shashi Kumar, Karen Simon, and Bob Stern for their always kind help during the production process. Then we have to thank the many students who suffered from our inaccurate and incomplete lecture notes.