MA2213 Lecture 11 PDE. Topics Introduction p. 451-452 Poisson equation p. 453-466 Visualization of numerical results p. 459-466 Boundary conditions p.

Slides:



Advertisements
Similar presentations
Partial Differential Equations
Advertisements

Computational Modeling for Engineering MECN 6040
Chapter 8 Elliptic Equation.
Chapter 3 Steady-State Conduction Multiple Dimensions
PART 7 Ordinary Differential Equations ODEs
Finite Element Method Introduction General Principle
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.
CHE/ME 109 Heat Transfer in Electronics LECTURE 12 – MULTI- DIMENSIONAL NUMERICAL MODELS.
PARTIAL DIFFERENTIAL EQUATIONS
1 MECH 221 FLUID MECHANICS (Fall 06/07) Tutorial 6 FLUID KINETMATICS.
Lecture 34 - Ordinary Differential Equations - BVP CVEN 302 November 28, 2001.
Parabolic PDEs Generally involve change of quantity in space and time Equivalent to our previous example - heat conduction.
PARTIAL DIFFERENTIAL EQUATIONS
Partial differential equations Function depends on two or more independent variables This is a very simple one - there are many more complicated ones.
Chapter 13 Finite Difference Methods: Outline Solving ordinary and partial differential equations Finite difference methods (FDM) vs Finite Element Methods.
Numerical Methods for Partial Differential Equations
Differential Equations and Boundary Value Problems
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University Part 81 Partial.
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.
The Finite Difference Method This section presents a quick overview bout the finite difference method. This method can be used to solve any partial differential.
Scientific Computing Partial Differential Equations Explicit Solution of Wave Equation.
COMPUTATIONAL MODELING FOR ENGINEERING MECN 6040 Professor: Dr. Omar E. Meza Castillo Department.
1 Numerical Methods and Software for Partial Differential Equations Lecturer:Dr Yvonne Fryer Time:Mondays 10am-1pm Location:QA210 / KW116 (Black)
Scientific Computing Partial Differential Equations Introduction and
Hyperbolic PDEs Numerical Methods for PDEs Spring 2007 Jim E. Jones.
Elliptic Partial Differential Equations - Introduction
Partial Differential Equations Introduction –Adam Zornes, Deng Li Discretization Methods –Chunfang Chen, Danny Thorne, Adam Zornes.
Scientific Computing Partial Differential Equations Poisson Equation.
Finite Element Method.
1 EEE 431 Computational Methods in Electrodynamics Lecture 4 By Dr. Rasime Uyguroglu
A conservative FE-discretisation of the Navier-Stokes equation JASS 2005, St. Petersburg Thomas Satzger.
Linear Systems Iterative Solutions CSE 541 Roger Crawfis.
Scientific Computing Partial Differential Equations Implicit Solution of Heat Equation.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 8 - Chapter 29.
Solving an elliptic PDE using finite differences Numerical Methods for PDEs Spring 2007 Jim E. Jones.
1 EEE 431 Computational Methods in Electrodynamics Lecture 3 By Dr. Rasime Uyguroglu.
Introduction Examples of differential equations and related problems Analytical versus numerical solutions Ideas of numerical representations of solutions.
Engineering Analysis – Computational Fluid Dynamics –
MECN 3500 Inter - Bayamon Lecture 9 Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo
Introduction to Numerical Methods for ODEs and PDEs Lectures 1 and 2: Some representative problems from engineering science and classification of equation.
Engineering Analysis – Computational Fluid Dynamics –
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.
Discretization Methods Chapter 2. Training Manual May 15, 2001 Inventory # Discretization Methods Topics Equations and The Goal Brief overview.
Discretization for PDEs Chunfang Chen,Danny Thorne Adam Zornes, Deng Li CS 521 Feb., 9,2006.
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.
Computers in Civil Engineering 53:081 Spring 2003 Lecture #8 Roots of Equations: Systems of Equations.
Solving Partial Differential Equation Numerically Pertemuan 13 Matakuliah: S0262-Analisis Numerik Tahun: 2010.
Department of Mathematics Numerical Solutions to Partial Differential Equations Ch 12. Applied mathematics. Korea University.
1 LECTURE 6 Stability of Parabolic PDEs. 2 Aim of Lecture Last week we discussed Parabolic PDEs –Looked at Explicit and Implicit Methods –Advantages and.
1 Spring 2003 Prof. Tim Warburton MA557/MA578/CS557 Lecture 28.
Team  Spatially distributed deterministic models  Many hydrological phenomena vary spatially and temporally in accordance with the conservation.
Numerical Analysis Yu Jieun.
MA2213 Lecture 10 ODE. Topics Importance p Introduction to the theory p Numerical methods Forward Euler p. 383 Richardson’s extrapolation.
Part 8 - Chapter 29.
EEE 431 Computational Methods in Electrodynamics
Chapter 30.
Lecture 19 MA471 Fall 2003.
Introduction to Partial Differential Equations
PDEs and Examples of Phenomena Modeled
ME/AE 339 Computational Fluid Dynamics K. M. Isaac Topic2_PDE
Chapter 27.
CS6068 Applications: Numerical Methods
Numerical Methods on Partial Differential Equation
Programming assignment #1 Solving an elliptic PDE using finite differences Numerical Methods for PDEs Spring 2007 Jim E. Jones.
Presentation transcript:

MA2213 Lecture 11 PDE

Topics Introduction p Poisson equation p Visualization of numerical results p Boundary conditions p. 453 Finite difference grid p MATLAB Program p One-dimensional heat equation p

Introduction “Many phenomena in sciences and engineering depend on more than one variable. For example, an unknown function of a real-world problem usually depends on both time t and the location of the point (x,y,z).” p. 451 Physical laws, including the conservation of energy, momentum and mass, the laws of electricity and magnetism, thermodynamics, and chemical kinetics, require that the partial derivatives of these functions satisfy certain (partial differential) equations.

Introduction Increasingly, PDE’s are used to model biological and social phenomena. The models include the “law of supply and demand” in economics that determines equilibrium prices of goods and services, the Black-Sholes equation for options prices in arbitrage-free financial markets, and laws that describe the evolution of population densities that are used in epidemiology, ecology, and population genetics.

Introduction Examples Wave equation Poisson equation Heat equation

Poisson Equation Boundary Conditions Letbe a planar domain, and denote its The boundary value problemboundary by is called a Dirichlet problem because the value of u is specified on the boundary. For simplicity we will assume that and therefore

Finite Difference Grid For the square domain we choose a grid of points example boundary points interior points

Finite Difference Approximation We approximate the PDE by For boundary points where at interior points

Finite Difference Approximation We approximate Where, at every boundary point, we define by the solutionsof

Finite Difference Equations We now choose to obtain equations for and equations for

Solution Using Gauss-Seidel for i = 2,…,n for j = 2,…,n for k = 1,…,maxit Compare this with the Jacobi method that you used for problems in slides 37,41 of Lecture 7. end % j loop end % i loop end % k loop

MATLAB Program n = 10; maxit = 60;h = 1/n; [X,Y] = meshgrid(0:h:1,0:h:1); u = zeros(n+1); f = -2*pi^2*sin(pi*X).*sin(pi*Y); figure(1); surf(X,Y,f); title([‘f = -source distribution’]) for k = 1:maxit for i = 2:n for j = 2:n u(i,j) = 0.25*(u(i-1,j)+u(i+1,j)+u(i,j+1)+u(i,j-1)-h^2*f(i,j)); end figure(2); surf(X,Y,u); title([‘computed solution’]) utrue = sin(pi*X).*sin(pi*Y); figure(3); surf(X,Y,utrue-u); title([‘error with ’ num2str(maxit) ‘ iterations’])

Source Distribution

Computed Solution with 60 iter Gauss-Seidel

Error Due Primarily to Discretization

One Dimensional Heat Equation We consider the initial value problem for a function The heat equation arises in the modeling of a number ofmodeling phenomena and is often used in financial mathematics in thefinancial mathematics modeling of options. The famous Black-Scholes option pricingoptionsBlack-Scholes model's differential equation can be transformed into the heatdifferential equation equation allowing relatively easy solutions.

One Dimensional Heat Equation The domain of the function initial value boundary value

Discretization We divide the interval [0,L] intoequal parts to obtain a grid with size (space) grid points and We also choose maximum time and divide the interval [0,T] intoequal parts to obtain a grid with sizeand (time) grid points This provides a two-dimensional grid with points

Discretization We first use approximations We define and will compute approximations

Discretization and combine them with the Heat PDE to obtain approximate equations We replaceby

Discretization to obtain linear equations that can be solved directly by

Matrix Representation Define sequences Then whereand the matrix in slide 38, L7 has eig.val. the eigenvalues satisfy

Stability The numerical roundoff error sequencesatisfies therefore the algorithm is stable if and only if the iteration matrixhas spectral radius < 1 Since this occurs for largewhen

MATLAB CODE L = 1; nx = 20; hx = L/nx; a = 1; ht = hx^2/3; % for stable % ht = hx^2; for unstable niter = 500; F = zeros(nx-1,1); F(nx-1) = ht/(hx^2); u(:,1) = zeros(nx-1,1); A = -diag(2*ones(nx-1,1)) + diag(ones(nx-2,1),1) + diag(ones(nx-2,1),-1); I = eye(nx-1); c = a*ht/(hx^2); M = I + c*A; for k = 1:niter u(:,k+1) = M*u(:,k) + F; end

Stable Solution of Heat Equation

Unstable Solution of Heat Equation