Some notes about PDEs. -Bill Green Nov. 2015

Similar documents
Lecture 16: Relaxation methods

PDE Solvers for Fluid Flow

Part 1. The diffusion equation

Review for Exam 2 Ben Wang and Mark Styczynski

Index. higher order methods, 52 nonlinear, 36 with variable coefficients, 34 Burgers equation, 234 BVP, see boundary value problems

ME Computational Fluid Mechanics Lecture 5

10.34 Numerical Methods Applied to Chemical Engineering. Quiz 2

Numerical Methods for Engineers and Scientists

An Efficient Low Memory Implicit DG Algorithm for Time Dependent Problems

2.29 Numerical Fluid Mechanics Spring 2015 Lecture 9

Implicit Solution of Viscous Aerodynamic Flows using the Discontinuous Galerkin Method

Efficient solution of stationary Euler flows with critical points and shocks

Partial differential equations

Additive Manufacturing Module 8

Marching on the BL equations

Numerical Solutions of Partial Differential Equations

Multistep Methods for IVPs. t 0 < t < T

Scientific Computing: An Introductory Survey

Direct Numerical Solution of the Steady 1D Compressible Euler Equations for Transonic Flow Profiles with Shocks

Chapter 2 Finite-Difference Discretization of the Advection-Diffusion Equation

Numerical Solution Techniques in Mechanical and Aerospace Engineering

ALGEBRAIC FLUX CORRECTION FOR FINITE ELEMENT DISCRETIZATIONS OF COUPLED SYSTEMS

10.34 Numerical Methods Applied to Chemical Engineering Fall Homework #6: Boundary Value Problems (BVPs)

Riemann Solvers and Numerical Methods for Fluid Dynamics

Linear Solvers. Andrew Hazel

Fall Exam II. Wed. Nov. 9, 2005

2 CAI, KEYES AND MARCINKOWSKI proportional to the relative nonlinearity of the function; i.e., as the relative nonlinearity increases the domain of co

Newton s Method and Efficient, Robust Variants

Butcher tableau Can summarize an s + 1 stage Runge Kutta method using a triangular grid of coefficients

HIGH ACCURACY NUMERICAL METHODS FOR THE SOLUTION OF NON-LINEAR BOUNDARY VALUE PROBLEMS

NUMERICAL METHODS FOR ENGINEERING APPLICATION

Elliptic Problems / Multigrid. PHY 604: Computational Methods for Physics and Astrophysics II

Computation Fluid Dynamics

MASSACHUSETTS INSTITUTE OF TECHNOLOGY DEPARTMENT OF MECHANICAL ENGINEERING CAMBRIDGE, MASSACHUSETTS NUMERICAL FLUID MECHANICS FALL 2011

Advection / Hyperbolic PDEs. PHY 604: Computational Methods in Physics and Astrophysics II

Computational Fluid Dynamics-1(CFDI)

A Robust Preconditioned Iterative Method for the Navier-Stokes Equations with High Reynolds Numbers

Solving PDEs with Multigrid Methods p.1

Numerical Optimization Algorithms

Numerically Solving Partial Differential Equations

Numerical methods for the Navier- Stokes equations

AM 205: lecture 19. Last time: Conditions for optimality Today: Newton s method for optimization, survey of optimization methods

A Study on Numerical Solution to the Incompressible Navier-Stokes Equation

Basic Aspects of Discretization

2.29 Numerical Fluid Mechanics Fall 2011 Lecture 7

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

Solving Large Nonlinear Sparse Systems

Project 4: Navier-Stokes Solution to Driven Cavity and Channel Flow Conditions

Chapter 9 Implicit integration, incompressible flows

AM 205: lecture 19. Last time: Conditions for optimality, Newton s method for optimization Today: survey of optimization methods

Prospects for High-Speed Flow Simulations

The family of Runge Kutta methods with two intermediate evaluations is defined by

Numerical Methods of Applied Mathematics -- II Spring 2009

Chapter 6 - Ordinary Differential Equations

A High Order Method for Three Phase Flow in Homogeneous Porous Media

Pressure-velocity correction method Finite Volume solution of Navier-Stokes equations Exercise: Finish solving the Navier Stokes equations

10.34 Numerical Methods Applied to Chemical Engineering

Iterative Methods for Solving A x = b

Partial Differential Equations

Problem Set 4 Issued: Wednesday, March 18, 2015 Due: Wednesday, April 8, 2015

2.29 Numerical Fluid Mechanics Spring 2015 Lecture 4

Numerical Solutions for Hyperbolic Systems of Conservation Laws: from Godunov Method to Adaptive Mesh Refinement

10.34: Numerical Methods Applied to Chemical Engineering. Lecture 7: Solutions of nonlinear equations Newton-Raphson method

Optimizing Runge-Kutta smoothers for unsteady flow problems

Applied Numerical Analysis

MITOCW MITRES18_005S10_DiffEqnsMotion_300k_512kb-mp4

Chapter 5 HIGH ACCURACY CUBIC SPLINE APPROXIMATION FOR TWO DIMENSIONAL QUASI-LINEAR ELLIPTIC BOUNDARY VALUE PROBLEMS

Linearization of Differential Equation Models

Partial Differential Equations

10.34: Numerical Methods Applied to Chemical Engineering. Finite Volume Methods Constructing Simulations of PDEs

Hybrid Analog-Digital Solution of Nonlinear Partial Differential Equations

Algebraic flux correction and its application to convection-dominated flow. Matthias Möller

Introduction to Partial Differential Equations

Relaxation methods and finite element schemes for the equations of visco-elastodynamics. Chiara Simeoni

Implementation and Comparisons of Parallel Implicit Solvers for Hypersonic Flow Computations on Unstructured Meshes

A Fifth Order Flux Implicit WENO Method

Ordinary Differential Equations

Solution Methods. Steady convection-diffusion equation. Lecture 05

NEWTON-GMRES PRECONDITIONING FOR DISCONTINUOUS GALERKIN DISCRETIZATIONS OF THE NAVIER-STOKES EQUATIONS

Ordinary Differential Equations

The hybridized DG methods for WS1, WS2, and CS2 test cases

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

Numerical Methods in Physics and Astrophysics

Develpment of NSCBC for compressible Navier-Stokes equations in OpenFOAM : Subsonic Non-Reflecting Outflow

ME 608 Numerical Methods in Heat, Mass, and Momentum Transfer

Multigrid and Iterative Strategies for Optimal Control Problems

Queens College, CUNY, Department of Computer Science Numerical Methods CSCI 361 / 761 Spring 2018 Instructor: Dr. Sateesh Mane.

Fast Iterative Solution of Saddle Point Problems

Partitioned Methods for Multifield Problems

Numerical Methods for Partial Differential Equations: an Overview.

LINEAR ALGEBRA: NUMERICAL METHODS. Version: August 12,

Semi-implicit Krylov Deferred Correction Methods for Ordinary Differential Equations

Efficient Augmented Lagrangian-type Preconditioning for the Oseen Problem using Grad-Div Stabilization

Parallelizing large scale time domain electromagnetic inverse problem

RECENT DEVELOPMENTS IN COMPUTATIONAL REACTOR ANALYSIS

VISCOUS FLUX LIMITERS

Mathematical Modeling and Simulation

AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS

Solving linear systems (6 lectures)

Partial Differential Equations II

Transcription:

Some notes about PDEs -Bill Green Nov. 2015 Partial differential equations (PDEs) are all BVPs, with the same issues about specifying boundary conditions etc. Because they are multi-dimensional, they can be very CPU intensive to solve, similar to multidimensional integrals. For example, a 3-d pde (e.g. steady-state Navier Stokes) will typically require a mesh of at least (100) 3 = 10 6 points, so one is computing at least 10 6 *N variables unknowns, where the unknowns might be (for a compressible reacting flow) [ρ, T, v x, v y, v z, y1, y2, ] where y i is the mass fraction of species i. So N variables = N species +5. As the Reynolds number increases the mesh density has to increase, so this quickly becomes unmanageable. Note that while we often can reduce problems to manageable 2-d PDEs taking advantage of symmetry or making approximations, many real-world PDEs have dimensionality>3 (e.g. the Schroedinger equation, time-dependent Navier-Stokes, etc.). Like ODEs, certain PDEs are intrinsically unstable (e.g. because the physical situation is extremely sensitive to small fluctuations), and those are challenging-to-impossible to solve accurately using numerical methods, since numerical errors get amplified. One example is detonation, where a small initiation event gets amplified into a strong shock wave. Another is the growth of a tumor or a bacterial culture, where a mutation or other small change in one cell can lead to a complete change in morphology and composition of the system at later times. Another class of PDEs, called hyperbolic (see Beers page 276 for the mathematical definition) have solutions that are propagating waves. Any small fluctuation at early times propagates to later times, often with no or very minor damping. Examples include acoustics and Maxwell s equations. Special methods are needed to model these, to avoid having the undamped numerical errors accumulate into a lot of noise in the answer. If hyperbolic problems are solved using naïve numerical solution methods, one often obtains unphysical oscillations in the numerical solution. In 10.34 we focus primarily on elliptic and parabolic PDEs, where the physics (e.g. diffusion, viscosity) dampens both the real fluctuations, and the numerical noise introduced during the solution. The conceptual difference between hyperbolic, parabolic, and elliptic PDEs has to do with the flow of information. If I adjust the value of a state variable at one mesh point, does that adjustment affect the computed value at other points, i.e. does point X know what is happening at point Y? In the case of elliptic PDEs, each point is sensitive to all the others. In hyperbolic PDEs, there are regions that are not sensitive to each other at all (e.g. a supersonic shock wave is propagating so fast that it cannot feel pressure fluctuations happening behind it at all, since information about them only moves at the speed of sound). Parabolic PDEs have all points in the future sensitive to everything that happened in the past, but not vice-versa. 1

For problems with significant convection, what happens downwind is very much controlled by what already happened upwind. In that case, it is much better to use upwind differencing than centereddifferencing. Only if there is real information flow from downwind should the downwind values affect upwind values in the numerical procedure. Contrast Fig. 6.7 and Fig. 6.8 in Beers textbook, to see how important this is for avoiding numerical instabilities. Methods for solving PDEs One can directly apply all the relaxation methods (collocation, Galerkin, finite differences) much the same as in ODE-BVPs, converting the PDE into a large system of nonlinear algebraic equations. F(c)=0 This is how most elliptic PDEs are solved. The main challenge is the huge number of unknowns, and the size of the corresponding Jacobian matrix. Using a method that makes a very sparse Jacobian (e.g. using a local basis set) is key. Finding a sufficiently good initial guess can also be very challenging. There are many special methods developed to try to handle these huge systems. Note that the key step at each iteration in solving a system of nonlinear equations is to solve the equation J* c = - F Normally we would solve this by Gaussian elimination. However, when J is huge this is not practical, e.g. we may not have enough memory to even store the intermediate matrices (remember the problem of Gaussian fill-in, so even if J is sparse the intermediate matrices will not be so sparse). So instead we would like to solve this equation using direct methods, which do not require storing any large intermediate objects. Several methods have been proposed to do this. One of the most successful is Conjugate Gradient, where one rewrites the problem as a minimization min q = (F+J* c) T (F+J* c) The Conjugate Gradient method for minimization only requires evaluating J*v not solving J*v=b, and evaluating J*v does not require storing any matrices (you can compute the non-zero elements of J, use them, and delete them). However, it is an iterative method, so it does not solve this quadratic minimization problem exactly in one step like Newton-Raphson would (so at each iteration in solving the PDE problem we are going to do several sub-iterations to solve J* c=-f). Also, if many sub-iterations are required numerical noise can creep in causing problems, so people currently use a fancier version called bicgstab instead of the simple Conjugate Gradient algorithm. The performance of Conjugate Gradient is dramatically improved if the matrix J is well-conditioned (i.e. cond(j) ~ 1), so people often use preconditioners A and B to modify the matrix: (A*J*B)*v = -(A*F) B*v = c 2

There are many different ways to come up with preconditioners A and B that work well for a particular J; for some introduction see discussion in Beers textbook. Finding a good initial guess at c can also be a big problem. Sometimes the PDE system is for a steadystate solution, and the corresponding time-dependent PDE is also known. If by the physics any initial guess will eventually lead to the steady-state of interest, one can start from a poor initial guess and time-march toward the solution for a while (using the method of lines discussed below) to refine the initial guess. When the guess gets good enough that F(c_guess) < tol, then one switches from timemarching to just solving the system of non-linear equations. Method of Lines For parabolic PDEs, where the special direction is time, one popular approach is to discretize the space dimensions (e.g. replace all the spatial derivatives with finite-difference approximations). For example, the PDE equation c/ t = D 2 c/ x 2 - v c/ x + r(c) might be replaced by the finite difference equation dc(m)/dt = D {c(m-1) 2 c(m) + c(m+1)} /( x) 2 - v { c(m-1)-c(m) } / x + r(c(m)) There will be similar equations for each mesh point xm. This can be compactly written dc/dt = F(c) where c is the vector [c(1); c(2); ; c(m); c(m+1); c(m)]. Note every element of this long vector (except maybe some on the boundaries) are time dependent. It one knows all the boundary conditions at t 0, this is an ODE-IVP, and can be solved that way. This is called The Method of Lines. This is very practical for systems with one spatial dimension, where the number of spatial mesh points M might be as small as 100. It can even be done for 3-d problems, where the number of mesh points M>10 6, if an explicit ODE-IVP method can be used, in fact this is how the best existing Navier-Stokes reacting-flow solvers work (see papers by Jacqueline H. Chen). If one is using Method-of-Lines to time-march to an initial guess, there is no reason that one needs to be time-accurate : all you want to do is to get to the long-time solution (which will be close to the steadystate solution and so a good initial guess) as quickly as possible. One way to accelerate the timemarching is to use Implicit Euler with relatively large time steps: C new = C old + t * F(C new ) 3

However, note that this is still a (huge) system of nonlinear equations, and so it may need to be solved iteratively using Conjugate Gradient methods rather than Newton-Raphson with Gaussian elimination. And solving this systems of equations also needs an initial guess which perhaps we could supply using an explicit ODE-IVP solver. 4

MIT OpenCourseWare https://ocw.mit.edu 10.34 Numerical Methods Applied to Chemical Engineering Fall 2015 For information about citing these materials or our Terms of Use, visit: https://ocw.mit.edu/terms.