Discretization of PDEs and Tools for the Parallel Solution of the Resulting Systems

Similar documents
INTRODUCTION TO PDEs

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

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

Numerical Solutions to Partial Differential Equations

PDEs, part 1: Introduction and elliptic PDEs

From Completing the Squares and Orthogonal Projection to Finite Element Methods

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

Numerical Methods for PDEs

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

Introduction to Partial Differential Equations

Lecture 8: Fast Linear Solvers (Part 7)

Scientific Computing: An Introductory Survey

Numerical Analysis and Methods for PDE I

2.29 Numerical Fluid Mechanics Spring 2015 Lecture 9

Solving PDEs with freefem++

AMS 529: Finite Element Methods: Fundamentals, Applications, and New Trends

A note on accurate and efficient higher order Galerkin time stepping schemes for the nonstationary Stokes equations

Additive Manufacturing Module 8

Divergence Formulation of Source Term

Fast Iterative Solution of Saddle Point Problems

Finite Difference Methods for Boundary Value Problems

Numerical Solutions to Partial Differential Equations

Mathematical Methods - Lecture 9

Partial Differential Equations

Video 15: PDE Classification: Elliptic, Parabolic and Hyperbolic March Equations 11, / 20

AMS 529: Finite Element Methods: Fundamentals, Applications, and New Trends

An Introduction to Numerical Methods for Differential Equations. Janet Peterson

University of Illinois at Urbana-Champaign College of Engineering

Solving the Stochastic Steady-State Diffusion Problem Using Multigrid

First, Second, and Third Order Finite-Volume Schemes for Diffusion

SPARSE SOLVERS POISSON EQUATION. Margreet Nool. November 9, 2015 FOR THE. CWI, Multiscale Dynamics

Solving PDEs: the Poisson problem TMA4280 Introduction to Supercomputing

PDE Solvers for Fluid Flow

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

Poisson Solvers. William McLean. April 21, Return to Math3301/Math5315 Common Material.

Lecture 17: Iterative Methods and Sparse Linear Algebra

FDM for parabolic equations

Elements of Matlab and Simulink Lecture 7

Introduction to PDEs and Numerical Methods Lecture 1: Introduction

Chapter Two: Numerical Methods for Elliptic PDEs. 1 Finite Difference Methods for Elliptic PDEs

Classification of partial differential equations and their solution characteristics

Multigrid Methods and their application in CFD

FEniCS Course. Lecture 0: Introduction to FEM. Contributors Anders Logg, Kent-Andre Mardal

Lecture 16: Relaxation methods

Numerical Solution I

CLASSIFICATION AND PRINCIPLE OF SUPERPOSITION FOR SECOND ORDER LINEAR PDE

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

Numerical Modelling in Fortran: day 10. Paul Tackley, 2016

Finite difference method for solving Advection-Diffusion Problem in 1D

Multigrid absolute value preconditioning

Laplace s Equation FEM Methods. Jacob White. Thanks to Deepak Ramaswamy, Michal Rewienski, and Karen Veroy, Jaime Peraire and Tony Patera

13 PDEs on spatially bounded domains: initial boundary value problems (IBVPs)

Block-Structured Adaptive Mesh Refinement

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

A simple FEM solver and its data parallelism

Scientific Computing I

M.Sc. in Meteorology. Numerical Weather Prediction

High-resolution finite volume methods for hyperbolic PDEs on manifolds

Calculation of Sound Fields in Flowing Media Using CAPA and Diffpack

Robust solution of Poisson-like problems with aggregation-based AMG

Splitting Iteration Methods for Positive Definite Linear Systems

Clawpack Tutorial Part I

Diffusion / Parabolic Equations. PHY 688: Numerical Methods for (Astro)Physics

Chapter 3 Second Order Linear Equations

UNIVERSITY of LIMERICK OLLSCOIL LUIMNIGH

LibMesh Experience and Usage

An Introduction to the Discontinuous Galerkin Method

INTRODUCTION TO FINITE ELEMENT METHODS

Space-time Finite Element Methods for Parabolic Evolution Problems

Numerical Solution Techniques in Mechanical and Aerospace Engineering

Solving Boundary Value Problems (with Gaussians)

A short introduction to FreeFem++

Vector and scalar penalty-projection methods

Computation Fluid Dynamics

Fundamental Solutions and Green s functions. Simulation Methods in Acoustics

Tutorial 2. Introduction to numerical schemes

Middle East Technical University Department of Mechanical Engineering ME 413 Introduction to Finite Element Analysis. Chapter 2 Introduction to FEM

Advanced numerical methods for nonlinear advectiondiffusion-reaction. Peter Frolkovič, University of Heidelberg

2.2. Methods for Obtaining FD Expressions. There are several methods, and we will look at a few:

Motivation: Sparse matrices and numerical PDE's

Numerik 2 Motivation

Numerical Methods for Partial Differential Equations: an Overview.

Dual Reciprocity Boundary Element Method for Magma Ocean Simulations

Finite difference method for elliptic problems: I

A High-Order Discontinuous Galerkin Method for the Unsteady Incompressible Navier-Stokes Equations

Analysis III (BAUG) Assignment 3 Prof. Dr. Alessandro Sisto Due 13th October 2017

Boundary Value Problems - Solving 3-D Finite-Difference problems Jacob White

OUTLINE ffl CFD: elliptic pde's! Ax = b ffl Basic iterative methods ffl Krylov subspace methods ffl Preconditioning techniques: Iterative methods ILU

Numerical Solutions to Partial Differential Equations

A finite element solver for ice sheet dynamics to be integrated with MPAS

Hierarchical Parallel Solution of Stochastic Systems

ECE 695 Numerical Simulations Lecture 12: Thermomechanical FEM. Prof. Peter Bermel February 6, 2017

Lecture No 1 Introduction to Diffusion equations The heat equat

Lecture Introduction

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

Info. No lecture on Thursday in a week (March 17) PSet back tonight

FEAST eigenvalue algorithm and solver: review and perspectives

Past, present and space-time

Poisson Equation in 2D

Basic Aspects of Discretization

Transcription:

Discretization of PDEs and Tools for the Parallel Solution of the Resulting Systems Stan Tomov Innovative Computing Laboratory Computer Science Department The University of Tennessee Wednesday April 4, 2018

Outline Part I Partial Differential Equations Part II Mesh Generation and Load Balancing Part III Tools for Numerical Solution of PDEs

Part I Partial Differential Equations

Mathematical Modeling Mathematical Model: a representation of the essential aspects of an existing system which presents knowledge of that system in usable form (Eykhoff, 1974) Mathematical Modeling: Real world Model Navier-Stokes equations: u = 0 u t = (u )u 1 ρ p + ν 2 u + f B.C., etc.

Mathematical Modeling We are interested in models that are Dynamic i.e. account for changes in time Heterogeneous i.e. account for heterogeneous systems Typically represented with Partial Differential Equations

Mathematical Modeling How can we model for e.g. Heat Transfer? Heat * a form of energy (thermal) Heat Conduction * transfer of thermal energy from a region of higher temperature to a region of lower temperature Some notations Q : amount of heat k : material conductivity T : temperature A : area of cross-section

Heat Transfer The Law of Heat Conduction Q t = k A T x Change of heat is proportional to the gradient of the temperature and the area A of the cross-section. Q : amount of heat k : material conductivity T : temperature A : area of cross-section

Heat Transfer Consider 1-D heat transfer in a thin wire so thin that T is piecewise constant along the slides, i.e. T 0 (t), T 1 (t), T 2 (t), etc. ideally insulated Let us write a balance for the temperature at T 1 for time t + t T 1 (t + t) =?

Heat Transfer T 1 (t + t) Take lim x, t 0 T 1 (t) + k t (T 2(t) T 1 (t)) ( x) 2 + k t (T 0(t) T 1 (t)) ( x) 2 = T 1 (t) + k t T 2(t) 2T 1 (t) + T 0 (t) ( x) 2 T t = k 2 T x 2 (Exercise)

Heat Transfer Extend to 2-D and put a source term f to easily get ( T 2 ) t = k T x 2 + 2 T y 2 + f k T + f Known as the Heat equation

Other Important PDEs Poisson equation (elliptic) u = f Heat equation (parabolic) T t = k T + f Wave equation (hyperbolic) 1 2 u ν 2 t 2 = u + f

Classification of PDEs For a general second-order PDE in 2 variables: Elliptic: if B 2 4AC < 0 Au xx + Bu xy + Cu yy + = 0 process in equilibrium (no time dependence) easy to discretize but challenging to solve Parabolic: if B 2 4AC = 0 processes evolving toward steady state Hyperbolic: if B 2 4AC > 0 not evolving toward steady state difficult to discretize (support discontinuoities) but easy to solve in characteristic form

How do we solve them? Numerical solution approaches: Finite difference method Finite element method Finite volume method Boundary element method

Finite Difference Method use finite differences to approximate differential operators one of the simplest and extensively used method in solving PDEs the error, called truncation error, is due to finite approximation of the Taylor series of the differential operator

A Finite Difference Method Example Consider the 2-D Poisson equation: The idea, first in 1-D: 2 u x 2 + 2 u y 2 = f Use Taylor series to approximate d2 u dx 2 (x) with u(x), u(x + h), u(x h) u(x + h) = u(x) + h du dx (x) + h 2 d 2 u 2 dx 2 (x) + h 3 3! u(x h) = u(x) h du dx (x) + h 2 d 2 u 2 dx 2 (x) h 3 3! d 3 u dx 3 (x) + O(h4 ) d 3 u dx 3 (x) + O(h4 ) d2 u dx 2 (x) = 1 h 2 (u(x + h) + u(x h) 2u(x)) + O(h2 )

A Finite Difference Method Example Similarly in 2-D Use Taylor series to approximate u(x, y) with u(x, y), u(x + h, y), u(x h, y), u(x, y + h), u(x, y h). u(x + h, y) = u(x, y) + h u 2 h 2 3 u h 3 u (x, y) + (x, y) + x 2 x2 3! x 3 (x, y) + O(h4 ) u(x h, y) = u(x, y) h u 2 h 2 3 u h 3 u (x, y) + (x, y) x 2 x2 3! x 3 (x, y) + O(h4 ) u(x, y + h) = u(x, y) + h u 2 h 2 3 u h 3 u (x, y) + (x, y) + y 2 y 2 3! y 3 (x, y) + O(h4 ) u(x, y h) = u(x, y) h u y 2 h (x, y) + 2 2 3 u h 3 u (x, y) y 2 3! y 3 (x, y) + O(h4 ) u(x, y) = 1 h 2 (u(x + h, y) + u(x h, y) + u(x, y + h) + u(x, y h) 4u(x)) + O(h2 )

A Finite Difference Method Example Consider the 1-D equation: d 2 u (x) = f (x), for x (0, 1) dx2 and the Dirichlet boundary condition u(0) = u(1) = 0 The interval [0, 1] is discretized uniformly with n + 2 points x 0 x 1 x n x n+1 h h h h At any point x i we are looking for u i, an approxmation of the exact solution u(x i ), using the approximation we obtain a linear system of the form Ax = b where b = (f i ) i=1,n and x = (u i ) i=1,n and A = 1 h 2 2 1 1 2 1 1 2 1......... 1 2 1 1 2 u i 1 + 2u i u i+1 = h 2 f i, and the fact that u 0 = u n+1 = 0, (slide used material from Julien Langou s presentation)

A Finite Difference Method Example The interval [0, 1] [0, 1] is discretized Consider the 2-D Poisson equation: uniformly with (n + 2) (n + 2) points u = f and the Dirichlet boundary condition u(x, y) = 0 for (x, y) Ω h h A = 1 h 2 B I I B 1 I B 1......... I B I I B where B = 4 1 1 4 1 1 4 1......... 1 4 1 1 4 (slide used material from Julien Langou s presentation)

Finite Element Method Remember the slides from the previous lecture http://www.cs.utk.edu/ dongarra/web-pages/spring-2013/lect10-2013.pdf Main pluses/minuses of FEM vs FDM FEM can handle complex geometries FDM is easy to implement

A Finite Element Method Example Consider the 1-D Dirichlet problem: (1) u (x) = f (x), for x (0, 1) and the Dirichlet boundary condition u(0) = u(1) = 0 Weak or Variational formulation: Multiply (1) by smooth v and integrate over (0,1) 1 1 f (x)v(x)dx = u (x)v(x)dx 0 0 Integrate by parts the above RHS 1 1 u (x)v(x)dx = u (x)v(x) 1 0 u (x)v (x)dx 0 0 1 = u (x)v (x)dx a(u, v) 0 Variational formulation: Find u H0 1 (0, 1) such that 1 0 f (x)v(x)dx = a(u, v) for v H 1 0 (0, 1)

A Finite Element Method Example Discretization (Galerkin FE problem): Replace H0 1 (0, 1) with finite dimensional subspace V Shown is a 4 dimensional space V (basis in blue) and a linear combination (in red) What is the matrix form of the problem (Exercise)

Part II Mesh Generation and Load Balancing slides at: http://www.cs.utk.edu/ dongarra/web-pages/spring-2013/lect12-p2.pdf

Part III Tools for Numerical Solution of PDEs

Parallel PDE Computations Challenges: Software Complexity Data Distribution and Access Portability, Algorithms, and Data Redistribution Read more in Chapter 21

Software for PDEs There is software; to mention a few packages: Overture OO framework for PDEs in complex moving geometry PARASOL Parallel, sparse matrix solvers; in Fortran 90 SAMRAI OO framework for parallel AMR applications Hypre Large sparse linear solvers and preconditioners PETSc Tools for numerical solution of PDEs FFTW parallel FFT routines Diffpack OO framework for solving PDEs Doug FEM for elliptic PDEs POOMA OO framework for HP applications UG PDEs on unstructured grids using multigrid See also: http://www.mgnet.org/ http://www.nhse.org/ http://www.netlib.org/

PETSc PETSc: Portable, Extensible Toolkit for Scientific computation for large-scale sparse systems facilitate extensibility provides interface to external packages, e.g. BlockSolve95, ESSL, Matlab, ParMeTis, PVODE, and SPAI. programed in C, usable from Fortran and C++ uses MPI for all parallel communication in a distributed-memory model user do communication on level higher than MPI Computation and communication kernels: MPI, MPI-IO, BLAS, LAPACK

PETSc s Main Numerical Components more info at: http://acts.nersc.gov/petsc/

Learning Goals A brief overview of Numerical PDEs and related issues Mathematical modeling PDEs for describing changes in physical processes More specific discretization examples Finite Differences (natural) FEM reinforce the idea and application of Petrov-Galerkin conditions Issues related to mesh generation and load balancing and importance in HPC Adaptive methods Software