Finite Difference Method

Similar documents
PowerPoints organized by Dr. Michael R. Gustafson II, Duke University

SO x is a cubed root of t

APPLICATIONS OF FD APPROXIMATIONS FOR SOLVING ORDINARY DIFFERENTIAL EQUATIONS

Finite-Elements Method 2

10.34 Numerical Methods Applied to Chemical Engineering. Quiz 2

Numerical Methods - Boundary Value Problems for ODEs

MATH 333: Partial Differential Equations

Cubic Splines MATH 375. J. Robert Buchanan. Fall Department of Mathematics. J. Robert Buchanan Cubic Splines

SME 3023 Applied Numerical Methods

SKMM 3023 Applied Numerical Methods

Partial Differential Equations (PDEs) and the Finite Difference Method (FDM). An introduction

Lecture 38 Insulated Boundary Conditions

NUMERICAL METHODS. lor CHEMICAL ENGINEERS. Using Excel', VBA, and MATLAB* VICTOR J. LAW. CRC Press. Taylor & Francis Group

Ordinary Differential Equations (ODE)

ODE Runge-Kutta methods

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

CHAPTER 4. Introduction to the. Heat Conduction Model

Thomas Algorithm for Tridiagonal Matrix

Solutions Definition 2: a solution

Review for Exam 2 Ben Wang and Mark Styczynski

Lesson 9: Diffusion of Heat (discrete rod) and ode45

Ordinary Differential Equations- Boundary Value Problem

FOURIER SERIES, TRANSFORMS, AND BOUNDARY VALUE PROBLEMS

[Engineering Mathematics]

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

Ordinary Differential Equations (ode)

Finite Difference Methods for Boundary Value Problems

Lecture 24: Starting to put it all together #3... More 2-Point Boundary value problems

Module 6 : Solving Ordinary Differential Equations - Initial Value Problems (ODE-IVPs) Section 1 : Introduction

ECE2019 Sensors, Circuits, and Systems A2015. Lab #2: Temperature Sensing

Mathematical Modeling using Partial Differential Equations (PDE s)

Modeling and Experimentation: Compound Pendulum

Linear Systems of Equations. ChEn 2450

Maria Cameron Theoretical foundations. Let. be a partition of the interval [a, b].

Module 7: The Laplace Equation

Computational Fluid Dynamics Prof. Dr. SumanChakraborty Department of Mechanical Engineering Indian Institute of Technology, Kharagpur

Qualitative Analysis of Tumor-Immune ODE System

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

Bell Ringer. 1. Make a table and sketch the graph of the piecewise function. f(x) =

MECH : a Primer for Matlab s ode suite of functions

Boundary Layer Problems and Applications of Spectral Methods

Numerical Marine Hydrodynamics Summary

Solution of Non Linear Singular Perturbation Equation. Using Hermite Collocation Method

Approximate Linear Relationships

CMSC 451: Max-Flow Extensions

INTRODUCTION TO COMPUTER METHODS FOR O.D.E.

1.1 Motivation: Why study differential equations?

Solving the Heat Equation (Sect. 10.5).

! 1.1 Definitions and Terminology

Ordinary Differential Equations

Finite Differences for Differential Equations 28 PART II. Finite Difference Methods for Differential Equations

Ordinary Differential Equations

Cubic Splines; Bézier Curves

Ordinary Differential Equations (ODEs)

Modeling Data with Linear Combinations of Basis Functions. Read Chapter 3 in the text by Bishop

Maths III - Numerical Methods

Fourth Order RK-Method

1 Written and composed by: Prof. Muhammad Ali Malik (M. Phil. Physics), Govt. Degree College, Naushera

Finite difference models: one dimension

A first order divided difference

Multistep Methods for IVPs. t 0 < t < T

PowerPoints organized by Dr. Michael R. Gustafson II, Duke University

Finite Difference Methods (FDMs) 1

PowerPoints organized by Dr. Michael R. Gustafson II, Duke University

Second-Order Linear ODEs (Textbook, Chap 2)

Efficient solution of stationary Euler flows with critical points and shocks

Applied Numerical Analysis

Homework 7 Solutions

Interpolation & Polynomial Approximation. Hermite Interpolation I

Lecture IX. Definition 1 A non-singular Sturm 1 -Liouville 2 problem consists of a second order linear differential equation of the form.

SCORE BOOSTER JAMB PREPARATION SERIES II

Lecture 3: Growth Model, Dynamic Optimization in Continuous Time (Hamiltonians)

Residual Force Equations

HANDOUT E.22 - EXAMPLES ON STABILITY ANALYSIS

Ordinary Differential Equations

Chap. 3 Laplace Transforms and Applications

Algebra 1. Predicting Patterns & Examining Experiments. Unit 5: Changing on a Plane Section 4: Try Without Angles

Second Order Linear Equations

arxiv: v3 [math.na] 1 Jan 2015

ECE257 Numerical Methods and Scientific Computing. Ordinary Differential Equations

5. Hand in the entire exam booklet and your computer score sheet.

551614:Advanced Mathematics for Mechatronics. Numerical solution for ODEs School of Mechanical Engineering

A Computational Approach to Study a Logistic Equation

Statistical Analysis: The Vibrating Beam Example

Commun Nonlinear Sci Numer Simulat

CHAPTER 5. Higher Order Linear ODE'S

A First Course on Kinetics and Reaction Engineering Example 26.3

c2 2 x2. (1) t = c2 2 u, (2) 2 = 2 x x 2, (3)

MA3232 Summary 5. d y1 dy1. MATLAB has a number of built-in functions for solving stiff systems of ODEs. There are ode15s, ode23s, ode23t, ode23tb.

An Introduction to Numerical Methods for Differential Equations. Janet Peterson

Hani Mehrpouyan, California State University, Bakersfield. Signals and Systems

Solution of ODEs using Laplace Transforms. Process Dynamics and Control

Solving Ordinary Differential Equations

Computing DC operating points of non-linear circuits using homotopy methods

Nonlinear Normal Modes of a Full-Scale Aircraft

Lecture 1: Overview, Hamiltonians and Phase Diagrams. ECO 521: Advanced Macroeconomics I. Benjamin Moll. Princeton University, Fall

Numerical solution of ODEs

Fundamental Solutions and Green s functions. Simulation Methods in Acoustics

Lecture 11: Fourier Cosine Series

Final year project. Methods for solving differential equations

Transcription:

Finite Difference Method for BVP ODEs Dec 3, 2014 1

Recall An ordinary differential equation is accompanied by auxiliary conditions. In the analytical method, these conditions are used to evaluate the constants of integration that result during the solution of the equation. For an nth-order equation, n conditions are required. If all the conditions are specified at the same value of the independent variable, then we are dealing with an initial-value problem. In contrast, there is another application for which the conditions are not known at a single point, but rather, are known at different values of the independent variable. Because these values are often specified at the extreme points or boundaries of a system, they are customarily referred to as boundary-value problems. 2

3

Shooting Method, Example Problem 4

Example.. The conservation of heat can be used to develop a heat balance for a long, thin rod (previous slide). If the rod is not insulated along its length and the system is at a steady state, the Temperature T along the rod can be given by the above equation. where h is a heat transfer coefficient (m 2 ) that parameterizes the rate of heat dissipation to the surrounding air and Ta is the temperature of the surrounding air. For L= 10-m rod T a = 20, T 1 = 40, T 2 = 200 h = 0.01. Using the analytical method 5

Example The second-order equation can be expressed by a change of variables as two first order ODEs: 6

Example Let s deal with the BCs: The second-order equation can be expressed as two first order ODEs: To solve these equations, we require an initial value for z. We don t have it For the shooting method, we guess a value, e.g. z(0) = 10. 7

Example Using a fourth-order RK method with a step size of 2, we obtain a value at the end of the interval of T(10) = 168.3797,which differs from the boundary condition of T(10) = 200. Therefore, we make another guess, z(0) = 20, and perform the computation again. This time, the result of T(10) = 285.8980 is obtained. GUESS Computed Value Quality? z(0)=10 T(10)=168.3797 LOW INTERPOLATE T(10)= 200 REAL z(0)=20 T(10)=285.8980 HIGH 8

Example Now interpolate!! GUESS Computed Value Quality? z(0)=10 T(10)=168.3797 LOW INTERPOLATE T(10)= 200 REAL z(0)=20 T(10)=285.8980 HIGH Linear interpolation gives you a new guess 9

Example The second-order equation can be expressed as two first order ODEs: After linear interpolation, the guess becomes. z(0) = 12.6907 10

The cartoon view 11

Finite Difference Method The main feature of the finite-difference method is to obtain discrete equations by replacing derivatives with appropriate finite divided differences. We derive and solve a finite difference system for the BVP in four steps. 1. Discretization of the domain of the problem 2. Discretization of the differential equation at the interior nodes 3. The third step is devoted to the treatment of the boundary conditions. 4. Solve the system of linear equations. The linear system is tridiagonal, and the solution of tridiagonal linear systems is a very well-studied problem. 12

13

A y b 14

Finite Difference Method for BVP The previous matrix equations can be solved easily using MATLAB For instance: % Finite Difference Method clc, clear A=[ some matrix of coefficients]; b=[some RHS vector]; y=a\b % y is the vector solution % That s it!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! % but you should graph the solution? 15