Mat1062: Introductory Numerical Methods for PDE

Similar documents
PROPOSITION of PROJECTS necessary to get credit in the 'Introduction to Parallel Programing in 2014'

Finite Difference Methods for Boundary Value Problems

Numerical Analysis of Differential Equations Numerical Solution of Elliptic Boundary Value

Progress in developing a 3D background error correlation model using an implicit diusion operator

HOMEWORK 4: Numerical solution of PDEs for Mathmatical Models, Analysis and Simulation, Fall 2011 Report due Mon Nov 12, Maximum score 6.0 pts.

= main diagonal, in the order in which their corresponding eigenvectors appear as columns of E.

Finite difference method for elliptic problems: I

Introduction to numerical schemes

by Ron Buckmire Mathematics Department Occidental College Los Angeles, CA , U.S.A.

Math 1270 Honors ODE I Fall, 2008 Class notes # 14. x 0 = F (x; y) y 0 = G (x; y) u 0 = au + bv = cu + dv

Laboratory #3: Linear Algebra. Contents. Grace Yung

2.4 Eigenvalue problems

Numerical Schemes from the Perspective of Consensus

Extreme Values and Positive/ Negative Definite Matrix Conditions

1e N

MAT 22B - Lecture Notes

AM 205: lecture 14. Last time: Boundary value problems Today: Numerical solution of PDEs

An Introduction to Numerical Methods for Differential Equations. Janet Peterson

AMSC/CMSC 466 Problem set 3

Finite Difference Methods (FDMs) 1

AMS527: Numerical Analysis II

Lecture 1. Finite difference and finite element methods. Partial differential equations (PDEs) Solving the heat equation numerically

Problem set 3: Solutions Math 207B, Winter Suppose that u(x) is a non-zero solution of the eigenvalue problem. (u ) 2 dx, u 2 dx.

Department of Mathematics California State University, Los Angeles Master s Degree Comprehensive Examination in. NUMERICAL ANALYSIS Spring 2015

Tutorial 2. Introduction to numerical schemes

MATH 333: Partial Differential Equations

Numerical Solutions to Partial Differential Equations

Gaussian Elimination and Back Substitution

Mathematical Methods - Lecture 9

2 Introduction T(,t) = = L Figure..: Geometry of the prismatical rod of Eample... T = u(,t) = L T Figure..2: Geometry of the taut string of Eample..2.

Introduction - Motivation. Many phenomena (physical, chemical, biological, etc.) are model by differential equations. f f(x + h) f(x) (x) = lim

A review of stability and dynamical behaviors of differential equations:

u(0) = u 0, u(1) = u 1. To prove what we want we introduce a new function, where c = sup x [0,1] a(x) and ɛ 0:

MA 201: Method of Separation of Variables Finite Vibrating String Problem Lecture - 11 MA201(2016): PDE

Linear Systems of Equations. ChEn 2450

Table 1: BEM as a solution method for a BVP dierential formulation FDM BVP integral formulation FEM boundary integral formulation BEM local view is ad

Weighted Residual Methods

ERIK STERNER. Discretize the equations in space utilizing a nite volume or nite dierence scheme. 3. Integrate the corresponding time-dependent problem

Introduction to PDEs and Numerical Methods Tutorial 1: Overview of essential linear algebra and analysis

Lecture 1 INF-MAT3350/ : Some Tridiagonal Matrix Problems

9. Iterative Methods for Large Linear Systems

Numerical Analysis and Methods for PDE I

PIECEWISE LINEAR FINITE ELEMENT METHODS ARE NOT LOCALIZED

Physics 202 Laboratory 5. Linear Algebra 1. Laboratory 5. Physics 202 Laboratory

Department of Applied Mathematics Preliminary Examination in Numerical Analysis August, 2013

3.5 Finite Differences and Fast Poisson Solvers

On the Arithmetic and Shift Complexities of Inverting of Dierence Operator Matrices

INTRODUCTION TO PDEs

Before we look at numerical methods, it is important to understand the types of equations we will be dealing with.

Weighted Residual Methods

1 Separation of Variables

19.2 Mathematical description of the problem. = f(p; _p; q; _q) G(p; q) T ; (II.19.1) g(p; q) + r(t) _p _q. f(p; v. a p ; q; v q ) + G(p; q) T ; a q

ADDITIVE SCHWARZ FOR SCHUR COMPLEMENT 305 the parallel implementation of both preconditioners on distributed memory platforms, and compare their perfo

K. BLACK To avoid these diculties, Boyd has proposed a method that proceeds by mapping a semi-innite interval to a nite interval [2]. The method is co

A Block Red-Black SOR Method. for a Two-Dimensional Parabolic. Equation Using Hermite. Collocation. Stephen H. Brill 1 and George F.

7 Hyperbolic Differential Equations

Vector Space Basics. 1 Abstract Vector Spaces. 1. (commutativity of vector addition) u + v = v + u. 2. (associativity of vector addition)

MAT 22B - Lecture Notes

Lecture 9 Approximations of Laplace s Equation, Finite Element Method. Mathématiques appliquées (MATH0504-1) B. Dewals, C.

High order FEM vs. IgA by J.A.Evans, T.J.Hughes and A.Reali, 2014

Covariance and Correlation Matrix

Introduction to Boundary Value Problems

Solution of the Two-Dimensional Steady State Heat Conduction using the Finite Volume Method

Technical University Hamburg { Harburg, Section of Mathematics, to reduce the number of degrees of freedom to manageable size.

1 The relation between a second order linear ode and a system of two rst order linear odes

Boundary-Layer Transition. and. NASA Langley Research Center, Hampton, VA Abstract

Numerical Solutions to PDE s

CHAPTER 4. Introduction to the. Heat Conduction Model

Section 4.4 Reduction to Symmetric Tridiagonal Form

MA 201, Mathematics III, July-November 2016, Partial Differential Equations: 1D wave equation (contd.) and 1D heat conduction equation

Physics 6303 Lecture 8 September 25, 2017

n i,j+1/2 q i,j * qi+1,j * S i+1/2,j

= c c + g (n; c) (.b) on the interior of the unit square (; ) (; ) in space and for t (; t final ] in time for the unknown functions n(x; y; t)

Splitting methods with boundary corrections

MA2501 Numerical Methods Spring 2015

My signature below certifies that I have complied with the University of Pennsylvania s Code of Academic Integrity in completing this exam.

Take Home Exam I Key

Strauss PDEs 2e: Section Exercise 4 Page 1 of 6

Applied Mathematics 505b January 22, Today Denitions, survey of applications. Denition A PDE is an equation of the form F x 1 ;x 2 ::::;x n ;~u

Finite-Elements Method 2

BOUNDARY-VALUE PROBLEMS IN RECTANGULAR COORDINATES

AIMS Exercise Set # 1

FDM for parabolic equations

Introduction to PDEs and Numerical Methods: Exam 1

Fluctuationlessness Theorem and its Application to Boundary Value Problems of ODEs

Finite element approximation on quadrilateral meshes

3. Replace any row by the sum of that row and a constant multiple of any other row.

1111: Linear Algebra I

18.06 Problem Set 8 - Solutions Due Wednesday, 14 November 2007 at 4 pm in

INF-MAT Mandatory Exercise 1

3.3. SYSTEMS OF ODES 1. y 0 " 2y" y 0 + 2y = x1. x2 x3. x = y(t) = c 1 e t + c 2 e t + c 3 e 2t. _x = A x + f; x(0) = x 0.

MAT292 - Calculus III - Fall Solution for Term Test 2 - November 6, 2014 DO NOT WRITE ON THE QR CODE AT THE TOP OF THE PAGES.

Linear Systems of n equations for n unknowns

Solution of Linear Equations

Linear Algebra Section 2.6 : LU Decomposition Section 2.7 : Permutations and transposes Wednesday, February 13th Math 301 Week #4

1 Solutions to selected problems

Essentials of Intermediate Algebra

A MULTIGRID ALGORITHM FOR. Richard E. Ewing and Jian Shen. Institute for Scientic Computation. Texas A&M University. College Station, Texas SUMMARY

Multigrid absolute value preconditioning

Solving Symmetric Indefinite Systems with Symmetric Positive Definite Preconditioners

Transcription:

Mat1062: Introductory Numerical Methods for PDE Mary Pugh January 13, 2009 1 Ownership These notes are the joint property of Rob Almgren and Mary Pugh 2 Boundary Conditions We now want to discuss in detail methods for solving the linear diusion equation for u(x, t) u t = D u xx (1) We shall suppose that the domain is X L x X R, and that initial data u 0 (x) is given at t = 0: u(x, 0) = u 0 (x), X L x X R and that suitable boundary conditions are given on x = X L and x = X R for t > 0 We will consider boundary conditions that are Dirichlet, Neumann, or Robin Dirichlet boundary conditions specify the value of u at the endpoints: u(x L, t) = u L (t), u(x R, t) = u R (t) where u L and u R are specied functions of time Neumann conditions specify the derivative u x at the endpoints: u x (X L, t) = u L (t), u x (X R, t) = u R (t) 1

2 Mary Pugh Mat1062 Jan 13, 2009 Robin boundary conditions specify a linear combination of u and u x at the endpoints: a u(x L, t) + b u x (X L, t) = u L (t), c u(x R, t) + d u x (X R, t) = u R (t) where a, b, c, and d are xed constants usually determined by material properties 21 Space Discretization For given X L and X R, we choose a number N Our grid spacing is and we place grid points at locations h = X R X L N x j = X L + j h, j = 0, 1,, N, so that x 0 = X L and x N = X R We represent our solution by a vector U(t) of length N + 1, whose components are U j (t) u ( x j, t), j = 0,, N That is, the jth component of the vector, U j (t) is supposed to approximate the PDE's solution at the x j grid point: u(x j, t) We take the initial data to be an exact sample of the true initial data u 0 (x): U j (0) = u 0 ( xj ) Given Du xx,, a domain [X L, X R ], and boundary conditions, these determine a linear operator on a function space We will approximate this linear operator by a matrix operating on the vector U This allows us to dene U(t) as satisfying a linear ODE U t = LU, which we can solve by standard methods As we will see below, even if the domain is unchanged and the operation Du xx is unchanged, dierent boundary conditions lead to dierent linear operators and hence dierent dynamics This holds in the continuous case (where the operator is acting on a function space) and in the discretized case (where the approximating operator is just a matrix) Boundary conditions matter!

Mat1062 Jan 13, 2009 Mary Pugh 3 22 Dirichlet Boundary Conditions Let us consider the case of Dirichlet boundary conditions: u(x L, t) = u L (t) and u(x R, t) = u R (t) There are N+1 meshpoints and U(t) has a component for each meshpoint However, the the components U 0 (t) and U N (t) are specied by the boundary conditions and so there are only N 1 unknowns: U 1 (t) U N 1 (t) From the January 8 notes, we need to approximate u xx (x j, t) for 1 j N 1 This is done with the nite-dierence approximation In matrix form this is 1 2 1 U 0 u xx (x 1 ) 1 1 2 1 U 1 u xx (x N 1 ) 1 2 1 U N 1 1 2 1 However, these expressions are not quite what we want The vector on the left is of size N 1 and will determine the interior grid values The vector on the right is of size N + 1; it involves both the interior grid values and the boundary values We need to express derivatives at the interior grid points in terms only of interior grid values and the Dirichlet boundary conditions This means that we need to eliminate U 0 and U N from the above Substituting the boundary values u 0 = u L (t), u N = u R (t), we approximate u xx (with Dirichlet boundary conditions on [X L, X R ]) via the inhomogeneous linear operator L 1 L 1 U = M 1 U + R 1, where M 1 is a (N 1) (N 1) tridiagonal matrix and R 1 is an (N 1)-vector containing the boundary data: 2 1 u L (t) M 1 = 1 1 2 1, R 1 (t) = 1 0 (2) 1 2 1 0 1 2 u R (t) R 1 depends on time if the boundary conditions do In practice, it is often more convenient to store the boundary values in their natural locations at U N

4 Mary Pugh Mat1062 Jan 13, 2009 the endpoints of a linear grid, and then the derivatives can be computed by doing the (N 1) (N + 1) multiplication above Of course, the matrix M 1 never actually exists in the computer, nor do we ever actually do a matrix multiply as written above: since most entries are zero, storing the matrix and doing a matrix multiply would be a huge waste of memory and time \Multiplication" really means \apply the linear operator," which we do by taking dierences 23 Neumann Boundary Conditions For Neumann boundary conditions (u x (X L, t) = u L (t), u x (X R, t) = u R (t)) the values at the endponts, U 0 (t) and U N (t), are unknown Again, we approximate the dierentiation operation as U 1 1 2 1 U 0 u xx (x 0 ) 1 1 2 1 U 1 u xx (x N ) 1 2 1 U N 1 1 2 1 U N U N+1 Note that we've done something strange here We refer to U 1 and U N+1 which are the values at X L h and X R + h respectively These grid points are not in our domain They are artices introduced to help implement the nite dierence approximation of u xx at the endpoints Such points are often called \ghost points" The vector on the left is of size N + 1 and will determine the interior grid values and the boundary grid values The vector on the right is of size N + 3; it involves the interior grid values, the boundary grid values, and the values at the two ghost points We need to express the right-hand side in terms of interior grid values and the boundary grid values only This means that we need to use the Neumann boundary conditions to determine the values at the ghost points This is done as follows: u L (t) = u x (X L, t) U 1 U 1 as a result = U 1 = U 1 u L (t) u xx (X L, t) U 1 2U 0 + U 1 = 2U 1 2U 0 2u L(t) h

Mat1062 Jan 13, 2009 Mary Pugh 5 Similarly, at the right-hand endpoint hence 0 = u x (X R, t) U N+1 U N 1 u xx (X R, t) U N+1 2U N + U N 1 = U N+1 = U N 1 + u R (t) = 2U N 1 2U N + 2u R(t) h And so, we approximate u xx (with Neumann boundary conditions on [X L, X R ]) with the inhomogeneous linear operator M 2 U + R 2, where M 2 is a (N+1) (N+1) tridiagonal matrix and R 2 is an N+1-vector containing the boundary data: 2 2 u L (t) M 2 = 1 1 2 1, R 2 (t) = 2 0 h (3) 1 2 1 0 2 2 u R (t) A natural question to ask is why we used centered nite dierences above to approximate u x (X L ) and u x (X R ) rather than using a left-dierence for u x (X L ) and a right-dierence for u x (X R ): 0 = u x (X L ) U 0 U 1 h 0 = u x (X R ) U N+1 U N h We will revisit this question when we discuss the convergence and accuracy of our scheme 24 Robin Boundary Conditions We handle Robin boundary conditions (a u(x L, t) + b u x (X L, t) = u L (t), c u(x R, t) + d u x (X R, t) = u R (t)) in the same manner that we handle Neumann boundary conditions: by introducing ghost grid points the values at which are then determined from the boundary conditions u L (t) = a u(x L, t) + b u x (X L, t) a U 0 + b U 1 U 1 = U 1 = U 1 + 2ah b U 0 u L(t) b

6 Mary Pugh Mat1062 Jan 13, 2009 as a result Similarly, hence u xx (X L, t) U 1 2U 0 + U 1 = 2U 1 (2 2ah/b)U 0 2u L(t) bh u R (t) = c u(x R, t) + d u x (X R, t) c U N + d U N+1 U N 1 = U N+1 = U N 1 2ch d u xx (X R, t) U 1 2U 0 + U 1 U N + u R(t) d = 2U N 1 (2 + 2ch/d)U N + 2u R(t) dh In this way, we can approximate u xx (with Robin boundary conditions on [X L, X R ]) as the inhomogeneous linear operator = M 3 U + R 3 where M 2 is a (N + 1) (N + 1) tridiagonal matrix: 2 + 2ah/b 2 M 3 = 1 1 2 1, R 3 (t) = 2 h 1 2 1 2 2 2ch/d (4) As a reality check, note that if a = c = 0 and if b = d = 1 then this matrix is the same matrix as for the Neumann boundary conditions u L (t)/b 0 0 u R (t)/d 25 Summary The spatial derivative operator Lu = Du xx on [X L, X R ] u(x L, t) = u L (t) u(x R, t) = u R (t)

Mat1062 Jan 13, 2009 Mary Pugh 7 has the discrete approximation LU = MU + R where M = DM 1 and R = DR 1 with M 1 and R 1 given in (2) Similarly, the spatial derivative operator Lu = Du xx on [X L, X R ] u x (X L, t) = u L (t) u x (X R, t) = u R (t) has the discrete approximation LU = MU + R where M = DM 2 and R = DR 2 with M 2 and R 2 given in (3) Finally, the spatial derivative operator Lu = Du xx on [X L, X R ] au(x L, t) + bu x (X L, t) = u L (t) cu(x R, t) + Du x (X R, t) = u R (t) has the discrete approximation LU = MU + R where M = DM 3 and R = DR 3 with M 3 and R 3 given in (4) In all three cases, we have L which is an ane linear operator But the three matrices M 1, M 2, and M 3 are all dierent from one another They will have dierent eigenvalues and eigenvectors All of the eigenvalues of M 1 and M 2 will be either zero or negative The matrix M 3 can have positive eigenvalues They correspond to modes that grow exponentially in time, rather than decaying this shows how powerful boundary eects can be!