Discretization for PDEs Chunfang Chen,Danny Thorne Adam Zornes, Deng Li CS 521 Feb., 9,2006.

Slides:



Advertisements
Similar presentations
Finite Difference Discretization of Hyperbolic Equations: Linear Problems Lectures 8, 9 and 10.
Advertisements

Computational Modeling for Engineering MECN 6040
Chapter 8 Elliptic Equation.
Parabolic Partial Differential Equations
1 Numerical Solvers for BVPs By Dong Xu State Key Lab of CAD&CG, ZJU.
MULTISCALE COMPUTATIONAL METHODS Achi Brandt The Weizmann Institute of Science UCLA
Geometric (Classical) MultiGrid. Hierarchy of graphs Apply grids in all scales: 2x2, 4x4, …, n 1/2 xn 1/2 Coarsening Interpolate and relax Solve the large.
Session: Computational Wave Propagation: Basic Theory Igel H., Fichtner A., Käser M., Virieux J., Seriani G., Capdeville Y., Moczo P.  The finite-difference.
Introduction to numerical simulation of fluid flows
Partial Differential Equations Introduction, Adam Zornes Discretizations and Iterative Solvers, Chenfang Chen Parallelization, Dr. Danny Thorne.
Total Recall Math, Part 2 Ordinary diff. equations First order ODE, one boundary/initial condition: Second order ODE.
Computational Solutions of Helmholtz Equation Yau Shu Wong Department of Mathematical & Statistical Sciences University of Alberta Edmonton, Alberta, Canada.
Computer-Aided Analysis on Energy and Thermofluid Sciences Y.C. Shih Fall 2011 Chapter 6: Basics of Finite Difference Chapter 6 Basics of Finite Difference.
Chapter 1 Introduction The solutions of engineering problems can be obtained using analytical methods or numerical methods. Analytical differentiation.
Network and Grid Computing –Modeling, Algorithms, and Software Mo Mu Joint work with Xiao Hong Zhu, Falcon Siu.
Lecture 34 - Ordinary Differential Equations - BVP CVEN 302 November 28, 2001.
Ordinary Differential Equations (ODEs) 1Daniel Baur / Numerical Methods for Chemical Engineers / Implicit ODE Solvers Daniel Baur ETH Zurich, Institut.
Partial differential equations Function depends on two or more independent variables This is a very simple one - there are many more complicated ones.
Numerical Methods for Partial Differential Equations
Types of Governing equations
CISE301: Numerical Methods Topic 9 Partial Differential Equations (PDEs) Lectures KFUPM (Term 101) Section 04 Read & CISE301_Topic9.
SE301: Numerical Methods Topic 9 Partial Differential Equations (PDEs) Lectures KFUPM Read & CISE301_Topic9 KFUPM.
Numerical methods for PDEs PDEs are mathematical models for –Physical Phenomena Heat transfer Wave motion.
Numerical Methods Due to the increasing complexities encountered in the development of modern technology, analytical solutions usually are not available.
1 The Spectral Method. 2 Definition where (e m,e n )=δ m,n e n = basis of a Hilbert space (.,.): scalar product in this space In L 2 space where f * :
Tutorial 5: Numerical methods - buildings Q1. Identify three principal differences between a response function method and a numerical method when both.
1 Numerical Integration of Partial Differential Equations (PDEs)
© Fluent Inc. 9/5/2015L1 Fluids Review TRN Solution Methods.
Drift-Diffusion Modeling
Finite Differences Finite Difference Approximations  Simple geophysical partial differential equations  Finite differences - definitions  Finite-difference.
Hybrid WENO-FD and RKDG Method for Hyperbolic Conservation Laws
Partial Differential Equations Introduction –Adam Zornes, Deng Li Discretization Methods –Chunfang Chen, Danny Thorne, Adam Zornes.
Finite Element Method.
MA5251: Spectral Methods & Applications
Introduction to Scientific Computing II From Gaussian Elimination to Multigrid – A Recapitulation Dr. Miriam Mehl.
Lecture 3.
1 EEE 431 Computational Methods in Electrodynamics Lecture 4 By Dr. Rasime Uyguroglu
Discontinuous Galerkin Methods Li, Yang FerienAkademie 2008.
Elliptic PDEs and the Finite Difference Method
Solving an elliptic PDE using finite differences Numerical Methods for PDEs Spring 2007 Jim E. Jones.
© Fluent Inc. 11/24/2015J1 Fluids Review TRN Overview of CFD Solution Methodologies.
Finite Difference Methods Definitions. Finite Difference Methods Approximate derivatives ** difference between exact derivative and its approximation.
Engineering Analysis – Computational Fluid Dynamics –
Engineering Analysis – Computational Fluid Dynamics –
Parallel Solution of the Poisson Problem Using MPI
MECN 3500 Inter - Bayamon Lecture 9 Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo
Introduction to Scientific Computing II Overview Michael Bader.
Lecture 21 MA471 Fall 03. Recall Jacobi Smoothing We recall that the relaxed Jacobi scheme: Smooths out the highest frequency modes fastest.
Numerical methods 1 An Introduction to Numerical Methods For Weather Prediction by Mariano Hortal office 122.
AMS 691 Special Topics in Applied Mathematics Lecture 8
Discretization Methods Chapter 2. Training Manual May 15, 2001 Inventory # Discretization Methods Topics Equations and The Goal Brief overview.
1 Solving the algebraic equations A x = B =. 2 Direct solution x = A -1 B = = Applicable only to small problems For the vertical in the spectral technique.
Elliptic PDEs and Solvers
Partial Derivatives Example: Find If solution: Partial Derivatives Example: Find If solution: gradient grad(u) = gradient.
Partial Differential Equations Introduction – Deng Li Discretization Methods –Chunfang Chen, Danny Thorne, Adam Zornes CS521 Feb.,7, 2006.
ECE 576 – Power System Dynamics and Stability Prof. Tom Overbye Dept. of Electrical and Computer Engineering University of Illinois at Urbana-Champaign.
Towards Future Navier-Stokes Schemes Uniform Accuracy, O(h) Time Step, Accurate Viscous/Heat Fluxes Hiroaki Nishikawa National Institute of Aerospace.
Department of Mathematics Numerical Solutions to Partial Differential Equations Ch 12. Applied mathematics. Korea University.
X1X1 X2X2  Basic Kinematics Real Applications Simple Shear Trivial geometry Proscribed homogenous deformations Linear constitutive.
The Finite-Difference Method Taylor Series Expansion Suppose we have a continuous function f(x), its value in the vicinity of can be approximately expressed.
EEE 431 Computational Methods in Electrodynamics
Convection-Dominated Problems
Chapter 30.
© Fluent Inc. 1/10/2018L1 Fluids Review TRN Solution Methods.
Convergence in Computational Science
Introduction to Multigrid Method
Brief introduction to Partial Differential Equations (PDEs)
topic4: Implicit method, Stability, ADI method
Comparison of CFEM and DG methods
Ph.D. Thesis Numerical Solution of PDEs and Their Object-oriented Parallel Implementations Xing Cai October 26, 1998.
Presentation transcript:

Discretization for PDEs Chunfang Chen,Danny Thorne Adam Zornes, Deng Li CS 521 Feb., 9,2006

Classification of PDEs Different mathematical and physical behaviors:  Elliptic Type  Parabolic Type  Hyperbolic Type System of coupled equations for several variables:  Time : first-derivative (second-derivative for wave equation)  Space: first- and second-derivatives

Classification of PDEs (cont.) General form of second-order PDEs ( 2 variables)

PDE Model Problems  Hyperbolic (Propagation) Advection equation (First-order linear) Advection equation (First-order linear) Wave equation (Second-order linear ) Wave equation (Second-order linear )

PDE Model Problems (cont.)  Parabolic (Time- or space-marching) Burger’s equation(Second-order nonlinear) Burger’s equation(Second-order nonlinear) Fourier equation (Second-order linear ) Fourier equation (Second-order linear ) (Diffusion / dispersion)

PDE Model Problems (cont.)  Elliptic (Diffusion, equilibrium problems) Laplace/Poisson (second-order linear) Laplace/Poisson (second-order linear) Helmholtz equation (second-order linear) Helmholtz equation (second-order linear)

PDE Model Problems (cont.)  System of Coupled PDEs Navier-Stokes Equations Navier-Stokes Equations

Well-Posed Problem Numerically well-posed Numerically well-posed  Discretization equations  Auxiliary conditions (discretized approximated) the computational solution exists (existence) the computational solution exists (existence) the computational solution is unique (uniqueness) the computational solution is unique (uniqueness) the computational solution depends continuously on the approximate auxiliary data the computational solution depends continuously on the approximate auxiliary data the algorithm should be well-posed (stable) also the algorithm should be well-posed (stable) also

Boundary and Initial Conditions R s n RR  Initial conditions: starting point for propagation problems  Boundary conditions: specified on domain boundaries to provide the interior solution in computational domain

Numerical Methods  Complex geometry  Complex equations (nonlinear, coupled)  Complex initial / boundary conditions  No analytic solutions  Numerical methods needed !!

Numerical Methods Objective: Speed, Accuracy at minimum cost  Numerical Accuracy (error analysis)  Numerical Stability (stability analysis)  Numerical Efficiency (minimize cost)  Validation (model/prototype data, field data, analytic solution, theory, asymptotic solution)  Reliability and Flexibility (reduce preparation and debugging time)  Flow Visualization (graphics and animations)

computational solution procedures Governing Equations ICS/BCS Discretization System of Algebraic Equations Equation (Matrix) Solver Approximate Solution Continuous Solutions Finite-Difference Finite-Volume Finite-Element Spectral Boundary Element Hybrid Discrete Nodal Values Tridiagonal ADI SOR Gauss-Seidel Krylov Multigrid DAE U i (x,y,z,t) p (x,y,z,t) T (x,y,z,t) or  ( , , ,  )

Discretization  Time derivatives almost exclusively by finite-difference methods almost exclusively by finite-difference methods  Spatial derivatives - Finite-difference: Taylor-series expansion - Finite-difference: Taylor-series expansion - Finite-element: low-order shape function and - Finite-element: low-order shape function and interpolation function, continuous within each interpolation function, continuous within each element element - Finite-volume: integral form of PDE in each - Finite-volume: integral form of PDE in each control volume control volume - There are also other methods, e.g. collocation, - There are also other methods, e.g. collocation, spectral method, spectral element, panel spectral method, spectral element, panel method, boundary element method method, boundary element method

Finite Difference  Taylor series  Truncation error  How to reduce truncation errors? Reduce grid spacing, use smaller  x = x-x o Reduce grid spacing, use smaller  x = x-x o Increase order of accuracy, use larger n Increase order of accuracy, use larger n

Finite Difference Scheme  Forward difference  Backward difference  Central difference

Example : Poisson Equation (1,1) (-1,-1) (1,-1) (-1,1) x y

Example (cont.)

Rectangular Grid After we discretize the Poisson equation on a rectangular domain, we are left with a finite number of gird points. The boundary values of the equation are the only known grid points

What to solve? Discretization produces a linear system of equations. The A matrix is a pentadiagonal banded matrix of a standard form: A solution method is to be performed for solving

Matrix Storage We could try and take advantage of the banded nature of the system, but a more general solution is the adoption of a sparse matrix storage strategy. We could try and take advantage of the banded nature of the system, but a more general solution is the adoption of a sparse matrix storage strategy.

Limitations of Finite Differences  Unfortunately, it is not easy to use finite differences in complex geometries.  While it is possible to formulate curvilinear finite difference methods, the resulting equations are usually pretty nasty.

Finite Element Method  The finite element method, while more complicated than finite difference methods, easily extends to complex geometries.  A simple (and short) description of the finite element method is not easy to give. PDE Weak Form Matrix System

Finite Element Method ( Variational Formulations )  Find u in test space H such that a(u,v) = f(v) for all v in H, where a is a bilinear form and f is a linear functional.  V(x,y) =  j V j  j (x,y), j = 1,…,n  I(V) =.5  j  j A ij V i V j -  j b i V i, i,j = 1,…,n  A ij =  a(   j,   j ), i = 1,…,n  B i =  f  j, i = 1,…,n  The coefficients V j are computed and the function V(x,y) is evaluated anyplace that a value is needed.  The basis functions should have local support (i.e., have a limited area where they are nonzero).

Time Stepping Methods  Standard methods are common: –Forward Euler (explicit) –Backward Euler (implicit) –Crank-Nicolson (implicit) θ = 0, Fully-Explicit θ = 1, Fully-Implicit θ = ½, Crank-Nicolson

Time Stepping Methods (cont.)  Variable length time stepping –Most common in Method of Lines (MOL) codes or Differential Algebraic Equation (DAE) solvers

Solving the System  The system may be solved using simple iterative methods - Jacobi, Gauss-Seidel, SOR, etc. Some advantages: Some advantages: - No explicit storage of the matrix is required - No explicit storage of the matrix is required - The methods are fairly robust and reliable - The methods are fairly robust and reliable Some disadvantages Some disadvantages - Really slow (Gauss-Seidel) - Really slow (Gauss-Seidel) - Really slow (Jacobi) - Really slow (Jacobi)

Solving the System  Advanced iterative methods (CG, GMRES) CG is a much more powerful way to solve the problem. Some advantages: –Easy to program (compared to other advanced methods) –Fast (theoretical convergence in N steps for an N by N system) Some disadvantages: –Explicit representation of the matrix is probably necessary –Applies only to SPD matrices

Multigrid Algorithm: Components  Residual  compute the error of the approximation  Iterative method/Smoothing Operator  Gauss-Seidel iteration  Restriction  obtain a ‘coarse grid’  Prolongation  from the ‘coarse grid’ back to the original grid

Residual Vector  The equation we are to solve is defined as:  So then the residual is defined to be:  Where u q is a vector approximation for u  As the u approximation becomes better, the components of the residual vector(r), move toward zero

Multigrid Algorithm: Components  Residual  compute the error of your approximation  Iterative method/Smoothing Operator  Gauss-Seidel iteration  Restriction  obtain a ‘coarse grid’  Prolongation  from the ‘coarse grid’ back to the original grid

Multigrid Algorithm: Components  Residual  compute the error of your approximation  Iterative method/Smoothing Operator  Gauss-Seidel iteration  Restriction  obtain a ‘coarse grid’  Prolongation  from the ‘coarse grid’ back to the original grid

The Restriction Operator  Defined as ‘half-weighted’ restriction.  Each new point in the courser grid, is dependent upon it’s neighboring points from the fine grid

Multigrid Algorithm: Components  Residual  compute the error of your approximation  Iterative method/Smoothing Operator  Gauss-Seidel iteration  Restriction  obtain a ‘coarse grid’  Prolongation  from the ‘coarse grid’ back to the original grid

The Prolongation Operator  The grid change is exactly the opposite of restriction

Prolongation vs. Restriction  The most efficient multigrid algorithms use prolongation and restriction operators that are directly related to each other. In the one dimensional case, the relation between prolongation and restriction is as follows:

Full Multigrid Algorithm 1.Smooth initial U vector to receive a new approximation U q 2. Form residual vector: R q =b -A U q 3. Restrict R q to the next courser grid  R q-1 4. Smooth Ae= R q-1 starting with e=0 to obtain e q-1 5.Form a new residual vector using: R q-1 = R q-1 -A e q-1 6. Restrict R 2 (5x? where ?  5) down to R 1 (3x? where ?  3) 7. Solve exactly for Ae= R 1 to obtain e 1 8. Prolongate e 1  e 2 & add to e 2 you got from restriction 9. Smooth Ae= R 2 using e 2 to obtain a new e Prolongate e q-1 to e q and add to U q

Reference /2006-index.html

Practice (Option) Introduce the following processing by read the book “A Tutorial on Elliptic PDE Solvers and Their Parallelization” PDE Weak Form Discrete Matrix