Numerical Methods Marisa Villano, Tom Fagan, Dave Fairburn, Chris Savino, David Goldberg, Daniel Rave.

Slides:



Advertisements
Similar presentations
Boyce/DiPrima 9th ed, Ch 2.8: The Existence and Uniqueness Theorem Elementary Differential Equations and Boundary Value Problems, 9th edition, by William.
Advertisements

Computational Modeling for Engineering MECN 6040
Chapter 8 Elliptic Equation.
7 INVERSE FUNCTIONS.
Computational Methods in Physics PHYS 3437
Algebra Problems… Solutions Algebra Problems… Solutions © 2007 Herbert I. Gross Set 22 By Herbert I. Gross and Richard A. Medeiros next.
Chapter 3 Steady-State Conduction Multiple Dimensions
3.3 Differentiation Formulas
ECIV 201 Computational Methods for Civil Engineers Richard P. Ray, Ph.D., P.E. Error Analysis.
Linear Equations Please Read Entire Section 2.1, pages in the text.
8 TECHNIQUES OF INTEGRATION. There are two situations in which it is impossible to find the exact value of a definite integral. TECHNIQUES OF INTEGRATION.
College Algebra Exam 2 Material.
Please open your laptops, log in to the MyMathLab course web site, and open Daily Quiz 18. You will have 10 minutes for today’s quiz. The second problem.
Numerical Methods for Partial Differential Equations CAAM 452 Spring 2005 Lecture 9 Instructor: Tim Warburton.
Algebra 1 Ch 4.2 – Graphing Linear Equations. Objective Students will graph linear equations using a table. Students will graph linear equations using.
8 Indefinite Integrals Case Study 8.1 Concepts of Indefinite Integrals
3 DERIVATIVES.
3 DIFFERENTIATION RULES.
Slide Copyright © 2012 Pearson Education, Inc.
Ch 8.1 Numerical Methods: The Euler or Tangent Line Method
Section 2: Finite Element Analysis Theory
LIMITS AND DERIVATIVES 2. We have used calculators and graphs to guess the values of limits.  However, we have learned that such methods don’t always.
§ 4.3 Equations and Inequalities Involving Absolute Value.
SECOND-ORDER DIFFERENTIAL EQUATIONS Series Solutions SECOND-ORDER DIFFERENTIAL EQUATIONS In this section, we will learn how to solve: Certain.
Slide 7- 1 Copyright © 2012 Pearson Education, Inc.
LIAL HORNSBY SCHNEIDER
1 Spring 2003 Prof. Tim Warburton MA557/MA578/CS557 Lecture 5a.
APPLICATIONS OF DIFFERENTIATION Indeterminate Forms and L’Hospital’s Rule APPLICATIONS OF DIFFERENTIATION In this section, we will learn: How to.
Section 4.4 Indeterminate Forms and L’Hospital’s Rule Applications of Differentiation.
3 DERIVATIVES. The functions that we have met so far can be described by expressing one variable explicitly in terms of another variable.  For example,,
Chapter 3 Limits and the Derivative Section 1 Introduction to Limits.
1 EEE 431 Computational Methods in Electrodynamics Lecture 4 By Dr. Rasime Uyguroglu
3 DERIVATIVES. The functions that we have met so far can be described by expressing one variable explicitly in terms of another variable.  For example,,
DERIVATIVES 3. If it were always necessary to compute derivatives directly from the definition, as we did in the Section 3.2, then  Such computations.
We have used calculators and graphs to guess the values of limits.  However, we have learned that such methods do not always lead to the correct answer.
Integrals  In Chapter 2, we used the tangent and velocity problems to introduce the derivative—the central idea in differential calculus.  In much the.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter.
1 Discretization Methods Dr. Farzad Ismail School of Aerospace and Mechanical Engineering Universiti Sains Malaysia Nibong Tebal Pulau Pinang Week.
+ Numerical Integration Techniques A Brief Introduction By Kai Zhao January, 2011.
Chapter 5: Numerical Methods in Heat Transfer
Numerical Methods.
Solving Equations Using Tables Please view this tutorial and answer the follow-up questions on loose leaf to turn in to your teacher.
Copyright © 2013, 2009, 2006 Pearson Education, Inc. 1 1 Section 2.7 Solving Linear Inequalities Copyright © 2013, 2009, 2006 Pearson Education, Inc. 1.
Bell Work: Simplify: √500,000,000. Answer: 10,000√5.
Announcements Read Chapters 11 and 12 (sections 12.1 to 12.3)
Ch 10.6: Other Heat Conduction Problems
3 DIFFERENTIATION RULES. We have:  Seen how to interpret derivatives as slopes and rates of change  Seen how to estimate derivatives of functions given.
Advanced Engineering Mathematics, 7 th Edition Peter V. O’Neil © 2012 Cengage Learning Engineering. All Rights Reserved. CHAPTER 4 Series Solutions.
In Chapters 6 and 8, we will see how to use the integral to solve problems concerning:  Volumes  Lengths of curves  Population predictions  Cardiac.
INTEGRALS We saw in Section 5.1 that a limit of the form arises when we compute an area. We also saw that it arises when we try to find the distance traveled.
Introduction The graphs of rational functions can be sketched by knowing how to calculate horizontal and/or vertical asymptotes of the function and its.
ECE 576 – Power System Dynamics and Stability Prof. Tom Overbye Dept. of Electrical and Computer Engineering University of Illinois at Urbana-Champaign.
Chapter 3 Limits and the Derivative Section 1 Introduction to Limits.
Ordinary Differential Equations
Topics 1 Specific topics to be covered are: Discrete-time signals Z-transforms Sampling and reconstruction Aliasing and anti-aliasing filters Sampled-data.
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.
Modified Bessel Equations 홍성민. General Bessel Equation of order n: (1) The general solution of Eq.(1) Let’s consider the solutions of the 4.
3 DERIVATIVES.
Chapter 10 Limits and the Derivative
Numerical Solutions of Ordinary Differential Equations
Finite Volume Method for Unsteady Flows
Warm-up: Solve the inequality and graph the solution set. x3 + 2x2 – 9x  18 HW: pg (4, 5, 7, 9, 11, 30, 34, 46, 52, 68, 80, 81, 82, 84, 86, 88)
Copyright © Cengage Learning. All rights reserved.
topic4: Implicit method, Stability, ADI method
topic4: Implicit method, Stability, ADI method
Limits: A Numerical and Graphical Approach
topic4: Implicit method, Stability, ADI method
APPLICATIONS OF DIFFERENTIATION
6th Lecture : Numerical Methods
Chapter 2 Limits and the Derivative
Presentation transcript:

Numerical Methods Marisa Villano, Tom Fagan, Dave Fairburn, Chris Savino, David Goldberg, Daniel Rave

An Overview The Method of Finite Differences Error Approximations and Dangers Approxmations to Diffusions Crank Nicholson Scheme Stability Criterion

Finite Differences Best known numerical method of approximation Marisa Villano

Finite Differences Approximating the derivative with a difference quotient from the Taylor series Function of One Variable Choose mesh size Δx Then u j ~ u(jΔx)

First Derivative Approximations Backward difference: (u j – u j-1 ) / Δx Forward difference: (u j+1 – u j ) / Δx Centered difference: (u j+1 – u j-1 ) / 2Δx

Taylor Expansion u(x + Δx) = u(x) + u΄(x)Δx + 1/2 u˝(x)(Δx) + 1/6 u˝΄(x)(Δx) + O(Δx) u(x – Δx) = u(x) – u΄(x)Δx + 1/2 u˝(x)(Δx) - 1/6 u˝΄(x)(Δx) + O(Δx)

Taylor Expansion u΄(x) = u(x) – u(x – Δx) + O(Δx) Δx u΄(x) = u(x + Δx) – u(x) + O(Δx) Δx u΄(x) = u(x + Δx) – u(x – Δx) + O(Δx) 2Δx 2

Second Derivative Approximation Centered difference: (u j+1 – 2u j + u j-1 ) / (Δx) Taylor Expansion u˝(x) = u(x + Δx) – 2u(x) + u(x – Δx) + O(Δx) (Δx) 2 2 2

Function of Two Variables u(jΔx, nΔt) ~ u j Backward difference for t and x (jΔx, nΔt) ~ (u j – u j ) / Δt (jΔx, nΔt) ~ (u j – u j ) / Δx n nn-1 n ∂u ∂t ∂u ∂x

Function of Two Variables Forward difference for t and x (jΔx, nΔt) ~ (u j – u j ) / Δt (jΔx, nΔt) ~ (u j – u j ) / Δx n+1 n n ∂u ∂t ∂u ∂x

Function of Two Variables Centered difference for t and x (jΔx, nΔt) ~ (u j – u j ) / (2Δt) (jΔx, nΔt) ~ (u j – u j ) / (2Δx) n+1 n-1 ∂u ∂t ∂u ∂x

Error Truncation Error: introduced in the solution by the approximation of the derivative Local Error: from each term of the equation Global Error: from the accumulation of local error Roundoff Error: introduced in the computation by the finite number of digits used by the computer

The Dangers of the Finite Difference Method Evidence from an example in 8.1 Dave Fairburn

Example from 8.1 Consider u t = u xx u(x,0) = h(x) We will use the finite difference method to approximate the solution Forward difference for u t Centered difference for u xx Re-write equation in terms of the finite difference approximations

Finite Difference Eqn. u j n+1 - u j n = u n j+1 - 2u j n + u n j-1 tx() 2 Error: The local truncation error is O(t) from the left hand side and is O(x) 2 from the right hand side.

Assumptions Assume that we choose a small change in x, and that the denominator on both sides of the equation are equal. We are now left with the scheme: u j n+1 = u n j+1 - u n j + u n j-1 Solving u with this scheme is now easy to do once we have the initial data.

Initial Data Let u(x,0) = h(x) = a step function with the following properties: h(x) = 0 for all j except for j = 5, so h j = …. Initially, only a certain section, which is at j = 5 is equal to the value of 1. “j” serves as the counter for the x values.

How to solve? We know u 0 j = 1 at j = 5 and 0 at all other j initially (given by superscript 0). We can plug into our scheme to solve for u 1 j at all j’s. u 1 j = u 0 j-1 - u 0 j + u 0 j+1 u 1 5 = -1; u 1 4 = 1; u 1 6 = 1 Now we can continue to increase the # of iterations, n, and create a table…

Solution for 4 iterations j values n-valuesn-values

Analysis of Solution Is this solution viable? Maximum principle states that the solution must be between 0 and 1 given our initial data At n = 4, our solution has already ballooned to u = 19! Clearly, there are cases when the finite difference method can pose serious problems.

Charting the Error Assume the solution is constant and equal to 0.5 (halfway between the possible 0 and 1)

Lessons Learned While the finite difference method is easy and convenient to use in many cases, there are some dangers associated with the method. We will investigate why the assumption that allowed us to simplify the scheme could have been a major contributor to the large error.

Approximations of Diffusions Neumann Boundary Conditions and the Crank-Nicolson Scheme Chris Savino

Approximations of Diffusions Errors have accumulated from the approximations of the derivatives using the previous scheme The problem is the choice of the mesh Δt to the mesh Δx Let s= can solve scheme

Neumann Boundary Conditions 0 x l Simplest Approximations are

To get smallest error, we use centered differences for the derivatives on the boundary Introduce ghost points Boundary Conditions become

Crank-Nicolson Scheme Can avoid any restrictions on stability conditions Unconditionally stable no matter what the value of s is.

Centered Second Difference: Pick a number theta between 0 and 1 Theta scheme:

We analyze the scheme by plugging in a separated solution Therefore

Must Check stability condition If then Therefore is always true

If then there is no restriction on the size of s for stability to hold The scheme is unconditionally stable When theta = ½ it is called the Crank-Nicolson scheme If theta < ½ then the scheme is stable if

Stability Criterion Approximations of the diffusion equation, u t =u xx David Goldberg

Stability Criterion The method of finite differences gives an answer, but it does not guarantee that this answer is meaningful. Values must be chosen appropriately, to ensure that the results make sense and are applicable to real world scenarios. This condition, that values must satisfy in order to be worthwhile, is called the “stability criterion.”

Example As per the book, take, for instance, the diffusion problem:

Example, continued As can be easily shown, the graph of φ(x) looks like this.

Example, continued In attempting to use the method of finite differences, we are using a forward difference for u t and a centered difference for u xx. This means that It is important to note here that the superscript n denotes a counter on the t variable, and the subscript j denotes a counter on the x variable.

Example, continued In order to make the calculations a bit cleaner, we are introducing a variable, s, which is defined by Rearranging, we have It would be nice if we could just plug in values and get a valid result…

Example, continued However, putting in different values can lead to the results being close to, or far from, that actual answer. For instance, letting ∆x=π/20, and letting s=5/11, we get a relatively nice result. Letting s=5/9 does not get such a nice result. So what, of significance, changes?

Example, Continued As it turns out, changing the value of s can significantly change the validity of the solution. To see why, we return to our equation.

Example, continued Since the left hand side is a function of T and the right hand side is a function of X, they must be equal to a constant.

Example, continued This is a discrete version of an ODE, which when solved gives

Example, finished Thus, to achieve stability,. This is why setting s=5/9 didn’t give a valid result. It is to be noted that usually the necessary criterion is that, but that in this case it was irrelevant. So the stability criterion must be worked out before one can effectively use the method of finite differences.

Approximations of Diffusions Example from 8.2 Daniel Rave

Summary Breif Review of Methods Wide Applicability Importance of Stability