ACM/CMS 107 Linear Analysis & Applications Fall 2017 Assignment 2: PDEs and Finite Element Methods Due: 7th November 2017

Similar documents
Simple Examples on Rectangular Domains

From Completing the Squares and Orthogonal Projection to Finite Element Methods

Second Order Elliptic PDE

CONVERGENCE THEORY. G. ALLAIRE CMAP, Ecole Polytechnique. 1. Maximum principle. 2. Oscillating test function. 3. Two-scale convergence

Lecture 3: Function Spaces I Finite Elements Modeling. Bruno Lévy

Projected Surface Finite Elements for Elliptic Equations

Introduction. J.M. Burgers Center Graduate Course CFD I January Least-Squares Spectral Element Methods

Finite difference method for elliptic problems: I

Finite Element Method for Ordinary Differential Equations

Functional Analysis Review

The following definition is fundamental.

Sobolevology. 1. Definitions and Notation. When α = 1 this seminorm is the same as the Lipschitz constant of the function f. 2.

LECTURE # 0 BASIC NOTATIONS AND CONCEPTS IN THE THEORY OF PARTIAL DIFFERENTIAL EQUATIONS (PDES)

Scientific Computing WS 2018/2019. Lecture 15. Jürgen Fuhrmann Lecture 15 Slide 1

Preliminary Examination, Numerical Analysis, August 2016

Math 350 Fall 2011 Notes about inner product spaces. In this notes we state and prove some important properties of inner product spaces.

Scientific Computing WS 2017/2018. Lecture 18. Jürgen Fuhrmann Lecture 18 Slide 1

1 Discretizing BVP with Finite Element Methods.

Lecture Notes on PDEs

2.3 Variational form of boundary value problems

Differential Equations Preliminary Examination

Lecture Notes: African Institute of Mathematics Senegal, January Topic Title: A short introduction to numerical methods for elliptic PDEs

Robust Domain Decomposition Preconditioners for Abstract Symmetric Positive Definite Bilinear Forms

Applied/Numerical Analysis Qualifying Exam

Iterative Methods for Linear Systems

The Conjugate Gradient Method

Two hours. To be provided by Examinations Office: Mathematical Formula Tables. THE UNIVERSITY OF MANCHESTER. 29 May :45 11:45

Your first day at work MATH 806 (Fall 2015)

LECTURE 1: SOURCES OF ERRORS MATHEMATICAL TOOLS A PRIORI ERROR ESTIMATES. Sergey Korotov,

[2] (a) Develop and describe the piecewise linear Galerkin finite element approximation of,

PDEs, part 1: Introduction and elliptic PDEs

Spectral Processing. Misha Kazhdan

Variational Formulations

LECTURE NOTES ELEMENTARY NUMERICAL METHODS. Eusebius Doedel

PART IV Spectral Methods

Solutions: Problem Set 3 Math 201B, Winter 2007

Partial Differential Equations

Applied Analysis (APPM 5440): Final exam 1:30pm 4:00pm, Dec. 14, Closed books.

Math Solutions to homework 5

Linear Algebra Massoud Malek

Chapter 1: The Finite Element Method

1. Subspaces A subset M of Hilbert space H is a subspace of it is closed under the operation of forming linear combinations;i.e.,

Further Mathematical Methods (Linear Algebra)

Scientific Computing I

The Dirichlet-to-Neumann operator

Notes on PCG for Sparse Linear Systems

PLC Papers. Created For:

Theory of PDE Homework 2

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

Separation of Variables in Linear PDE: One-Dimensional Problems

1 Review: symmetric matrices, their eigenvalues and eigenvectors

Boundary Value Problems and Iterative Methods for Linear Systems

Lecture on: Numerical sparse linear algebra and interpolation spaces. June 3, 2014

4. Solvability of elliptic PDEs

Eigenvalues and Eigenfunctions of the Laplacian

PDEs in Image Processing, Tutorials

Hilbert Space Methods for Reduced-Rank Gaussian Process Regression

you expect to encounter difficulties when trying to solve A x = b? 4. A composite quadrature rule has error associated with it in the following form

Definition and basic properties of heat kernels I, An introduction

Index. C 2 ( ), 447 C k [a,b], 37 C0 ( ), 618 ( ), 447 CD 2 CN 2

Ordinary Differential Equations II

A Statistical Look at Spectral Graph Analysis. Deep Mukhopadhyay

Numerical methods for PDEs FEM convergence, error estimates, piecewise polynomials

Chapter 1 Foundations of Elliptic Boundary Value Problems 1.1 Euler equations of variational problems

Lehrstuhl Informatik V. Lehrstuhl Informatik V. 1. solve weak form of PDE to reduce regularity properties. Lehrstuhl Informatik V

Basic Calculus Review

EXAMINATION SOLUTIONS

WELL POSEDNESS OF PROBLEMS I

5 Compact linear operators

1 Inner Product and Orthogonality

Math 307 Learning Goals

Numerical Solution I

Class notes: Approximation

Chapter 1. Preliminaries. The purpose of this chapter is to provide some basic background information. Linear Space. Hilbert Space.

Projection Theorem 1

Math 7824 Spring 2010 Numerical solution of partial differential equations Classroom notes and homework

Numerical Solutions to Partial Differential Equations

Distances, volumes, and integration

SPECTRAL PROPERTIES OF THE LAPLACIAN ON BOUNDED DOMAINS

MATH 167: APPLIED LINEAR ALGEBRA Chapter 3

Lecture 12: Detailed balance and Eigenfunction methods

Graded Mesh Refinement and Error Estimates of Higher Order for DGFE-solutions of Elliptic Boundary Value Problems in Polygons

Introduction to Aspects of Multiscale Modeling as Applied to Porous Media

Partial Differential Equations 2 Variational Methods

Recall that any inner product space V has an associated norm defined by

Introduction to Aspects of Multiscale Modeling as Applied to Porous Media

Chapter 6. Finite Element Method. Literature: (tiny selection from an enormous number of publications)

Definition 1. A set V is a vector space over the scalar field F {R, C} iff. there are two operations defined on V, called vector addition

Appendix A Functional Analysis

Vectors in Function Spaces

A posteriori error estimates in FEEC for the de Rham complex

Exercises - Chapter 1 - Chapter 2 (Correction)

Traces and Duality Lemma

Basic Principles of Weak Galerkin Finite Element Methods for PDEs

ICES REPORT A Generalized Mimetic Finite Difference Method and Two-Point Flux Schemes over Voronoi Diagrams

Supraconvergence of a Non-Uniform Discretisation for an Elliptic Third-Kind Boundary-Value Problem with Mixed Derivatives

A Hybrid Method for the Wave Equation. beilina

Numerical methods for PDEs FEM convergence, error estimates, piecewise polynomials

V. SUBSPACES AND ORTHOGONAL PROJECTION

INTERGRID OPERATORS FOR THE CELL CENTERED FINITE DIFFERENCE MULTIGRID ALGORITHM ON RECTANGULAR GRIDS. 1. Introduction

Transcription:

ACM/CMS 17 Linear Analysis & Applications Fall 217 Assignment 2: PDEs and Finite Element Methods Due: 7th November 217 For this assignment the following MATLAB code will be required: Introduction http://wwwmdunloporg/cms17/assignment2zip In this assignment we consider the boundary value problem d ( κ(x) dp ) dx dx (x) = f(x) for x (, 1) p() = p(1) = (PDE) The concept of a weak solution to this equation will be introduced, and an existence and uniqueness result will be shown We will then consider how the equation may be implemented numerically, using a finite element method, and study some properties of this discretization This equation has a natural extension to more general domains D R 3, given by (κ(x) p(x) ) = f(x) p(x) = for x D for x D where now κ : D R 3 3 is matrix-valued The theory we look at generalizes to this case directly, and it is in this case where the weak solutions and finite element methods become key tools for understanding The equation itself arises, for example, when considering groundwater flow, with κ representing the permeability of the subsurface and p the pressure of a fluid in the subsurface Matrix-valued κ is considered to account for the permeability of a medium being dependent on direction The equation is arrived at by combining Darcy s law, relating velocity to pressure, with mass conservation The equation also arises in electrodynamics: if an electric field E is conservative, then the equation follows from the steady state Maxwell equations, with κ representing the background conductivity and p representing the electric potential corresponding to E For exposition we work in this assignment only with the one-dimensional case D = (, 1) given by (PDE) This allows for the general theory and ideas to be introduced, without having to deal with certain technicalities Moreover, computations in this case are much faster than in higher dimensions Throughout this assignment we will make the following assumptions about (PDE): Assumptions 1 The diffusion coefficient κ : (, 1) R and source term f : (, 1) R are such that: (i) there exist κ, κ 1 > with κ κ(x) κ 1 for all x (, 1); (ii) f L 2 (, 1)

Problem 1 Weak Solutions (25 points) (a) Denote by Cc (, 1) the set of compactly supported smooth functions on the open interval (, 1) That is, { } Cc (, 1) = ϕ C there exists a closed bounded set K (, 1) (, 1) with ϕ(x) = for all x / K (i) Let ϕ C c (, 1) Show that lim ϕ(x) = lim ϕ(x) = x x 1 (ii) Let p be a solution to (PDE) Show that κ(x) dp dx (x)dϕ (x) dx = dx Do not solve (PDE) explicitly f(x)ϕ(x) dx for any ϕ C c (, 1) (b) Define the H 1 norm and inner product on C c (, 1) by ϕ 2 H = dϕ 1 dx (x) 2 dϕ dx, ϕ, ψ H 1 = dx (x)dψ (x) dx dx Define also the H 1 norm and inner product: ϕ 2 H = ϕ 2 1 L + ϕ 2 2 H, ϕ, ψ 1 H 1 = ϕ, ψ L 2 + ϕ, ψ H 1 Let the space H 1 (, 1) be the closure of C c (, 1) with respect to the H 1 norm, ie H 1 (, 1) = {v : (, 1) R there exists {ϕ n } C c (, 1) with ϕ n v H 1 } We will assume in the remainder of what follows that any v H 1 (, 1) is once differentiable at almost every point in (, 1); in particular the derivative of v is welldefined whenever it appears under an integral sign Additionally we will assume that H 1(, 1) is a Hilbert space when equipped with the inner product, H 1 defined above These assumptions may both be verified, however doing so is not part of this assignment Remark 1 You will have encountered the space H 1 (, 1) in a problem set, though it was defined differently The two definitions can be shown to be equivalent, but in this assignment we will work only with the definition above (i) Prove the Poincaré inequality: for any v H 1 (, 1), v(x) 2 dx dv dx (x) 2 dx Deduce that the norms H 1 and H 1 are equivalent on H 1 (, 1), and that H 1(, 1) is continuously embedded in L2 (, 1)

(ii) Let Assumptions 1 hold, and let p be a solution to (PDE) Using Problem 1(a)(ii) and the Poincaré inequality, show that κ(x) dp dv (x) (x) dx = dx dx f(x)v(x) dx for all v H 1 (, 1) (WPDE) In what follows, we will call any function p H 1 (, 1) that satisfies (WPDE) a weak solution to (PDE), and any function that solves (PDE) in the classical sense a strong solution to (PDE) Note that if it exists, a strong solution is a weak solution Denote V = H 1 (, 1) Define B : V V R, g : V R by B(u, v) = κ(x) du dv (x) (x) dx, g(v) = dx dx Then we may rewrite (WPDE) in the form B(p, v) = g(v) for all v V f(x)v(x) dx (1) Later on in the course you will encounter the Lax-Milgram lemma, which may be used to deduce the existence of a unique weak solution p V to this equation Problem 2 Finite Element Approximations (3 points) If we wish to solve (WPDE) numerically, we will first need to make a finite dimensional approximation to the system, which will then provide a finite dimensional approximation to the solution In this problem we consider a class of approximations known as finite element approximations Let V h V be a finite dimensional subspace of V, with basis {ϕ h j } j=1 The scalar parameter h > will be related to the dimension of V h, with as h It is this space V h in which we will look for an approximate solution (a) (i) Equip V h with the inner product, H 1 Show that V h is a Hilbert space (ii) Let B : V h V h R, g : V h R denote the restrictions of B, g to V h, where B, g are defined by (1) Again using the Lax-Milgram lemma, it can be shown that there exists a unique solution p h V h to the problem B(p h, v h ) = g(v h ) for all v h V h (WPDE-h) Let p h V h denote this solution Since ϕ h 1,, ϕh form a basis for V h, there exist scalars P h 1,, P h R such that p h = Pj h ϕ h j j=1 Find expressions for the entries of a matrix A h R and a vector F h R such that the coefficients P h = (P1 h,, P h ) R solve A h P h = F h (FEM)

(iii) Define the inner product, B on V by u, v B = B(u, v) Show that the induced norm B is equivalent to H 1 (iv) Let p V, p h V h be the unique solutions to (WPDE) and (WPDE-h) respectively Establish the Galerkin orthogonality: p p h, v h B = for all vh V h Using this, show that p p h B p v h B for all v h V h and hence p p h H 1 κ1 inf κ p vh H v h V h 1 The first inequality above is the Galerkin optimality property, namely that p h is optimal over all possible approximations in V h with respect to the norm induced by B (b) We now look at a particular choice of approximation space V h Let h (, 1/2) and set = 1/h 1 N Define the mesh x h = {, h, 2h, 3h,, h, ( + 1)h} [, 1] We will denote x h j = jh for each j =,, + 1 The points x h j to as nodes and the intervals (x h j, xh j+1 ) as elements will be referred Define the set of functions {ϕ h j } H1 (, 1) by x x h j 1 x (x h x h ϕ h j xh j 1, xh j ] j 1 j (x) = x h j+1 x x (x h x h j+1 xh j, xh j+1 ] j x / (x h j 1, xh j+1 ] for each j = 1,, Define the finite element space V h = span{ϕ h 1,, ϕ h } H 1 (, 1) (i) Draw the graphs of each {ϕ h j } for h = 1/5 (ii) Show that ϕ h 1,, ϕh form a basis for V h Are they an orthonormal basis? (iii) Given a function b V, describe the function b h V h given by b h (x) = b(x h j )ϕ h j (x) j=1 (iv) Observe that ϕ h j and ϕh k have disjoint supports if j k > 1 Given that this is the case, what structure should the matrix A h in (FEM) have?

(v) Implement the system (FEM) in MATLAB, with the terms κ and f provided as function handles That is, given h > and function handles for κ, f, construct A h and F h, and return the vector of coefficients P h It will be beneficial to implement P h as a sparse matrix, using the sparse function in MATLAB For integration over elements, use the integral function in MATLAB, supplying relative and absolute tolerances of 1 14 We choose these tolerances close to machine precision so that the errors in the integration will be dominated by the errors that arise from the finite element approximation Consider the case κ(x) = e x, f(x) = 4e x (2x + 1) It can be shown that the exact solution is given by the quadratic p(x) = 1 (2x 1) 2 Test your implementation in this case by verifying that P h j p(x h j ), j = 1,, for h = 2 1 Construct p h on the mesh x h using the coefficients P h, and produce a plot on logarithmic axes of the error function e h (x) = p h (x) p(x) Remark 2 The definitions we give of the basis {ϕ h j } can be simplified for the mesh x h that we work with Note however that the definition makes sense for more general, non-uniform meshes, and the above still applies directly in those cases Such meshes may be more appropriate to use if either κ or f have strong local behavior that needs to be captured Problem 3 Spectral Properties (25 points) In this problem we focus on the case where the diffusion coefficient κ is constant The equation (PDE) is then known as the Laplace equation (a) Fix κ = 1 Let L denote the differential operator associated with the left hand side of (PDE), ie the negative second derivative operator equipped with zero boundary conditions (i) Find the eigenfunctions {ψ j } and corresponding eigenvalues {λ j } associated with L: dψ j dx 2 (x) = λ jψ j (x) for x (, 1) ψ j () = ψ j (1) = (ii) Show that the bound in the Poincaré inequality from Problem 1 may be improved to v(x) 2 dx 1 dv π 2 dx (x) 2 dx You may use without proof that the eigenfunctions {ψ j } form an orthonormal basis for L 2 (, 1)

(b) Fix κ = 1 and 1/h N Define L h R by L h = A h /h, where A h denotes the finite element matrix in (FEM) associated with the discretization of (PDE), using the approximation from Problem 2(b) L h is an approximation to L, often referred to as the finite difference Laplacian The rescaling of A h by 1/h is natural after approximating the entries of the vector F h with the trapezium rule (i) Show that the eigenvectors {W (j) } and corresponding eigenvalues {µ j } of L h satisfy the system W (j) 2 + 2W (j) 1 = µ j h 2 W (j) 1, W (j) (j) k+1 + 2W k W (j) k 1 = µ jh 2 W (j) k, k = 2,, 1, 2W (j) W Nh 1 = µ j h 2 W (j) (ii) Show that, up to normalization constant, W (j) k = sin(jπkh), k = 1,,, and find the corresponding eigenvalues {µ j } Deduce that the spectrum of L h may be bounded below by a positive constant independently of h (iii) Show that for all U R, U 2 2 h 2 4 sin(πh/2) 2 U, Lh U 2 Problem 4 Convergence Rates (2 points) We now study the rates of convergence of the finite element approximations as h, ie as the number of basis elements increases Throughout this question, we fix κ(x) = 11 + sin(25x 2 ), f(x) = cos(x) We saw in Problem 2(a)(iv) that the error between the true solution and the finite element approximation satisfies the following bound in the H 1 (, 1) norm: p p h H 1 κ1 inf κ p vh H v h V h 1 Choosing v h to be the piecewise linear interpolant of the true solution p at the mesh points, which belongs to V h, it is known that there exists a constant C(p) > such that p v h H 1 C(p)h We can hence deduce that the convergence of p h to p as h is at least linearly fast in the H 1 (, 1) norm We will see how this compares with numerical experiments, and also look at convergence in the L 2 (, 1) norm (a) The file datamat contains a reference solution P ref to (PDE) solved on a dense grid X ref using an accurate quadrature method We will denote p this reference solution, and x h the corresponding mesh, where h = 2 14 Define h k := 2 k Compute the coefficients P h k of the finite element approximation p h k for k = 4,, 12

Construct each p h k on the mesh x h using these coefficients, then calculate and store the H 1 and L2 errors, e k = p p h k H 1, e k = p p h k L 2, using the integral, gradient and interp1 functions in MATLAB It may also be beneficial to run format long to increase the number of decimal places in the output Present these errors in a table (b) Given a norm and h, h >, we define the experimental order of convergence (EOC) with respect to by EOC(h, h ) = log ( p p h / p p h ) log(h/h ) (i) Explain why if the convergence if of the form p p h Ch α, then EOC(h, h ) provides an estimate for α (ii) For each of the H 1 and L2 norms, compute EOC(h k, h k+1 ) for k = 4,, 11 using the stored values of e k, e k, and present these values in a table How do the experimental rates of convergence in the H 1 norm compare with the theoretical bound above? What do you think the theoretical rate of convergence in the L 2 norm is? Remark 3 Faster rates of convergence can be attained by choosing a different family of finite element basis functions {ϕ h j } Rather than being piecewise linear, they can be chosen to be piecewise quadratic, piecewise cubic, and so on These basis functions have a larger support than the piecewise linear basis functions, and so the matrix P h becomes less sparse Thus there is an increase in, for example, memory requirements, in exchange for the higher rate of convergence