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

Similar documents
Introduction to Partial Differential Equations

First order wave equations. Transport equation is conservation law with J = cu, u t + cu x = 0, < x <.

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

Absolute Value Equations and Inequalities. Use the distance definition of absolute value.

2. Conservation of Mass

Partial Fractions. Calculus 2 Lia Vas

Homogenization with stochastic differential equations

Diffusion - The Heat Equation

Finite difference method for elliptic problems: I

Introduction to First Order Equations Sections

Lecture 16 Methods for System of Linear Equations (Linear Systems) Songting Luo. Department of Mathematics Iowa State University

Updated: January 16, 2016 Calculus II 7.4. Math 230. Calculus II. Brian Veitch Fall 2015 Northern Illinois University

Lecture 9 - Carrier Drift and Diffusion (cont.), Carrier Flow. September 24, 2001

MATH 312 Section 8.3: Non-homogeneous Systems

Path integrals for classical Markov processes

Numerical Solutions to Partial Differential Equations

Math 106 Fall 2014 Exam 2.1 October 31, ln(x) x 3 dx = 1. 2 x 2 ln(x) + = 1 2 x 2 ln(x) + 1. = 1 2 x 2 ln(x) 1 4 x 2 + C

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

PDEs, part 1: Introduction and elliptic PDEs

Fundamentals of Transport Processes Prof. Kumaran Indian Institute of Science, Bangalore Chemical Engineering

Finite Difference and Finite Element Methods

11.2 Basic First-order System Methods

Density Modeling and Clustering Using Dirichlet Diffusion Trees

Mathematical Methods - Lecture 9

Introduction to PDEs and Numerical Methods: Exam 1

Outline. 1 Boundary Value Problems. 2 Numerical Methods for BVPs. Boundary Value Problems Numerical Methods for BVPs

Math background. Physics. Simulation. Related phenomena. Frontiers in graphics. Rigid fluids

Introduction to Partial Differential Equations

PDE Solvers for Fluid Flow

1. Solve each linear system using Gaussian elimination or Gauss-Jordan reduction. The augmented matrix of this linear system is

MATH34032 Mid-term Test 10.00am 10.50am, 26th March 2010 Answer all six question [20% of the total mark for this course]

Quasi-linear first order equations. Consider the nonlinear transport equation

Mechanical Engineering. Postal Correspondence Course HEAT TRANSFER. GATE, IES & PSUs

Heat Transfer: Physical Origins and Rate Equations. Chapter One Sections 1.1 and 1.2

Diffusion of a density in a static fluid

Computational Fluid Dynamics Prof. Sreenivas Jayanti Department of Computer Science and Engineering Indian Institute of Technology, Madras

Math 240 Calculus III

Integration of Rational Functions by Partial Fractions

Homework #3 Solutions

Maths for Signals and Systems Linear Algebra in Engineering

Section 5.6 Integration by Parts

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

Erkut Erdem. Hacettepe University February 24 th, Linear Diffusion 1. 2 Appendix - The Calculus of Variations 5.

Lecture 8 - Carrier Drift and Diffusion (cont.), Carrier Flow. February 21, 2007

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

Math 345 Intro to Math Biology Lecture 21: Diffusion

Lecture 3: 1. Lecture 3.

Partial Differential Equations, Winter 2015

Integration of Rational Functions by Partial Fractions

Existence Theory: Green s Functions

Transforming Nonhomogeneous BCs Into Homogeneous Ones

Numerical Solutions to Partial Differential Equations

Chapter 3 Second Order Linear Equations

INTRODUCTION TO PDEs

Lesson 3: Linear differential equations of the first order Solve each of the following differential equations by two methods.

Math 4377/6308 Advanced Linear Algebra

Webster s horn model on Bernoulli flow

Tutorial 2. Introduction to numerical schemes

Discretization- Finite difference, Finite element methods

Numerical Methods - Numerical Linear Algebra

Iterative Methods for Ax=b

Exploring Substitution

9.5. Polynomial and Rational Inequalities. Objectives. Solve quadratic inequalities. Solve polynomial inequalities of degree 3 or greater.

Solving Linear Systems of Equations

Local vs. Nonlocal Diffusions A Tale of Two Laplacians

MATH 32A: MIDTERM 2 REVIEW. sin 2 u du z(t) = sin 2 t + cos 2 2

Math 24 Spring 2012 Questions (mostly) from the Textbook

YORK UNIVERSITY. Faculty of Science Department of Mathematics and Statistics MATH M Test #2 Solutions

Advection Diffusion Problems with Pure Advection Approximation in Subregions

Chapter 5: Integrals

Introduction to Mass Transfer

Conceptual Model of Diffusion

Math 2142 Homework 5 Part 1 Solutions

MATH 3511 Lecture 1. Solving Linear Systems 1

surface area per unit time is w(x, t). Derive the partial differential

MATH SOLUTIONS TO PRACTICE PROBLEMS - MIDTERM I. 1. We carry out row reduction. We begin with the row operations

An Introduction to Numerical Methods for Differential Equations. Janet Peterson

8.3 Partial Fraction Decomposition

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

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

Hierarchical Modeling of Complicated Systems

Evaluation of the rate constant and deposition velocity for the escape of Brownian particles over potential barriers

7x 5 x 2 x + 2. = 7x 5. (x + 1)(x 2). 4 x

CLEMSON U N I V E R S I T Y

Physics 351 Wednesday, April 22, 2015

Chapter 3. September 11, ax + b = 0.

Math 211. Lecture #6. Linear Equations. September 9, 2002

MATH 225 Summer 2005 Linear Algebra II Solutions to Assignment 1 Due: Wednesday July 13, 2005

Calculus II Practice Test Problems for Chapter 7 Page 1 of 6

Fourier transforms. c n e inπx. f (x) = Write same thing in an equivalent form, using n = 1, f (x) = l π

First order Partial Differential equations

Introduction to Partial Differential Equations

Thermal Systems. Basic Modeling Elements. Interconnection Relationships. Derive Input/Output Models. Resistance. Capacitance

2t t dt.. So the distance is (t2 +6) 3/2

Integration of Differential Equations

The method of lines (MOL) for the diffusion equation

Lab Project 4a MATLAB Model of Oscillatory Flow

B.3 Solving Equations Algebraically and Graphically

Partial Fraction Decomposition Honors Precalculus Mr. Velazquez Rm. 254

Discrete Projection Methods for Incompressible Fluid Flow Problems and Application to a Fluid-Structure Interaction

Transcription:

Finite difference method for solving Advection-Diffusion Problem in 1D Author : Osei K. Tweneboah MATH 5370: Final Project

Outline 1 Advection-Diffusion Problem Stationary Advection-Diffusion Problem in 1D 2 Solution of the Stationary Advection-Diffusion Problem in 1D Centered-Difference method for the Stationary Advection-Diffusion Problem in 1D 3 Numerical Results 4 Discussion of Results 5 Conclusions

Advection-Diffusion Problem Background of the Advection-Diffusion Problem The advection-diffusion equation describes physical phenomena where particles, energy, or other physical quantities are transferred inside a physical system due to two processes: diffusion and advection. Advection is a transport mechanism of a substance or conserved property by a fluid due to the fluid s bulk motion. Diffusion is the net movement of molecules or atoms from a region of high concentration to a region of low concentration. The advection-diffusion equation is a relatively simple equation describing flows, or alternatively, describing a stochastically-changing system.

1D Advection-Diffusion Problem (Cont.) General form of the 1D Advection-Diffusion Problem The general form of the 1D advection-diffusion is given as: where, du 2 dt = ɛd U dx 2 adu dx + F (1) U is the variable of interest t is time ɛ is the diffusion coefficient a is the average velocity F describes sources or sinks of the quantity U. In Equation 1, the four terms represent the transient, diffusion, advection and source or sink term respectively.

Advection-Diffusion Problem (Cont.) Stationary Advection-Diffusion Problem in 1D The stationary advection-diffusion equation describes the steady-state behavior of an advection-diffusive system. In steady-state, du dt = 0, so Equation 1 reduces to, ɛ d 2 U dx 2 + adu dx = F (x). (2) In Equation 2, the three terms represent the diffusion, advection and source or sink term respectively.

Solution of the Stationary Advection-Diffusion Problem in 1D Computers are often used to numerically approximate the solution of the advection-diffusion equation typically using the finite difference method (FDM) and the finite element method (FEM). The FDM are numerical methods for solving differential equations by approximating them with difference equations, in which finite differences approximate the derivatives. FDMs are thus discretization methods. The FEM is a numerical technique for finding approximate solutions to boundary value problems for partial differential equations. It uses subdivision of a whole problem domain into simpler parts, called finite elements, and variational methods from the calculus of variations to solve the problem by minimizing an associated error function.

Solution of the Stationary Advection-Diffusion Problem in 1D (Cont.) Stationary Advection-Diffusion Problem in 1D ɛ d 2 U dx 2 + a(x)du = F (x), 0 < x < 1, (3) dx U(0) = α, U(1) = β, a(x) > a 0 > 0. (4) Where the data is chosen according to: ( ) exp (1 x) ɛ exp ( 1 ) ɛ U(x) = x 1 exp ( 1 ) (5) ɛ a(x) = 1 (6)

Solution of the Stationary Advection-Diffusion Problem in 1D (Cont.) In order to numerically solve Equation 3, we need to determine the unknown function F (x) and unknown constants α and β. In order to determine the unknown constants α and β, we plug 0 and 1 into Equation 5. Thus we have, ( exp U(0) = 0 ) exp ( 1 ) ɛ 1 exp ( 1 ) = 0 = α (7) ɛ (1 0) ɛ and U(1) = 1 ( exp ) exp ( 1 ) ɛ 1 exp ( 1 ) = 0 = β (8) ɛ (1 1) ɛ

Solution of the Stationary Advection-Diffusion Problem in 1D (Cont.) Similarly, in order to determine the unknown function F (x) we substitute Equation 5 into Equation 3 and we get, [ exp( 1 ɛ ɛ ) exp( x ɛ ) ] [ ɛ 2 (1 exp ( 1 ) + 1 exp( 1 ɛ ) exp( x ɛ ) ] ɛ ) ɛ(1 exp ( 1 ) = 1 = F (x) ɛ ) Therefore our problem reduces to: Stationary Advection-Diffusion Problem in 1D ɛ d 2 U dx 2 + du = 1, 0 < x < 1, (9) dx U(0) = 0, U(1) = 0. (10)

Solution of the Stationary Advection-Diffusion Problem in 1D (Cont.) We now employ FDM to numerically solve the Stationary Advection-Diffusion Problem in 1D (Equation 9). We will employ FDM on an equally spaced grid with step-size h. We set x i±1 = x i ± h, h = x n+1 x 0 n and x 0 = 0, x n+1 = 1. A finite difference method comprises a discretization of the differential equation using the grid points x i, where the unknowns U i (for i = 0,..., n + 1) are approximations to U(x i ).

Solution of the Stationary Advection-Diffusion Problem in 1D (Cont.) U (x) is approximated by the centered-difference: (D o U)(x) = U(x + h) U(x h) 2h U i+1 U i 1 2h U (x) is approximated by the central difference approximations: (D + D U)(x) = U(x + h) 2U(x) + U(x h) h 2 U i+1 2U i + U i 1 h 2 From Equation 9, we approximate the diffusion term by the second order central-difference operator and the advection term by the centered-difference operator.

Centered-Difference method for the Stationary Advection-Diffusion Problem in 1D Implementation of Centered-difference method for Advection-Diffusion Problem in 1D ɛ U i+1 2U i + U i 1 h 2 U 0 = 0, U n+1 = 0. + U i+1 U i 1 2h = 1, on [0, 1] Combining terms with the same indices, we get: where, A = 1 2h ɛ, B = 2ɛ h 2 h 2 AU i+1 + BU i + CU i 1 = f (x i ) = 1, (11) and C = 1 2h ɛ h 2

Centered Difference method for the Stationary Advection-Diffusion Problem in 1D (Cont.) From Equation 11, we have a tridiagonal linear system of n equations with n unknowns, which can be written in the form AU = F (12) where U = [U 1, U 2,..., U n ] T is the unknown vector and b c 0 a b c a b c A =......... a b c 0 a b, F = f (x 1 ) f (x 2 ) f (x 3 ). f (x n 1 ) f (x n ) (13)

Numerical Results A C + + module was developed to generate the approximated solution U h by solving the tridiagonal system. The tridiagonal system is solved in two steps. The first step is using the process of Gaussian Elimination to obtain a triangular matrix. The second step is using back substitution to solve for the unknown vectors.

Numerical Results (Cont.) We will briefly present some numerical results for the advection-diffusion problem. We will consider three(3) different cases where the number of grid points are chosen as n = 50, 25 and 2. For each grid point, we will change the choice of the diffusion coefficient ɛ to 1, 0.5, 0.1 and 0.01. The exact solution and approximated solution are plotted on the same window for different values of ɛ on [0, 1].

Numerical Results (Cont.) Figure: n = 50, ɛ = 1, 0.5, 0.1 and 1

Numerical Results (Cont.) Figure: n = 25, ɛ = 1, 0.5, 0.1 and 1

Numerical Results (Cont.) Figure: n = 2, ɛ = 1, 0.5, 0.1 and 1

Discussion of Results In order to explain the figures obtained on the previous slides, we perform some analysis on the behavior of the centered-difference approximation for the Advection-Diffusion Problem in 1D. We rewrite Equation 11 as a difference equation in the form where, a = 1 2h ɛ, b = 2ɛ h 2 h 2 au i+1 + bu i + cu i 1 = 1, (i 1) (14) and c = 1 2h ɛ h 2

Discussion of Results (Cont.) The analysis is performed on the homogeneous solution of our difference equation (Equation 14). To find the homogeneous solution, we assume a trial solution U i = x i. Substituting U i = x i, U i+1 = x i+1 and U i 1 = x i 1 into the homogeneous part of Equation 14 gives which has solution, ax i+1 + bx i + cx i 1 = 0 = ax 2 + bx + c = 0 x 1,2 = b ± b 2 4ac 2a (15)

Discussion of Results (Cont.) Plugging the values of a, b and c into Equation 15, gives x 1 = 1 and x 2 = 2ɛ h 2ɛ + h (16) Thus the complimentary solution is U h = C 1 + C 2 ( 2ɛ h 2ɛ + h )i, (i 1) (17)

Discussion of Results (Cont.) The solution obtained suggest that, if ɛ > 0.01, the approximate solution is consistent with the exact solution. However, if ɛ 0.01 the approximate solution oscillates. This is because, for ɛ 0.01, x 2 in Equation 16 is negative.

Conclusions In this project, we discussed the centered-difference method for the Advection-Diffusion problem in 1D. We analyzed the approximated solution U h and we concluded that this method performs well for large values of ɛ. However, it fails to approximate the solution for small values of ɛ. We presented some analytical behavior of the problem which explains the presence of oscillations in the approximated solution for small values of ɛ.

Thank You!