Finite differences Finite differences.

Slides:



Advertisements
Similar presentations
Courant and all that Consistency, Convergence Stability Numerical Dispersion Computational grids and numerical anisotropy The goal of this lecture is to.
Advertisements

Finite Difference Discretization of Hyperbolic Equations: Linear Problems Lectures 8, 9 and 10.
An Introduction to Numerical Methods
Numerical methods III (Advection: the semi-Lagrangian technique)
ECMWF Governing Equations 3 Slide 1 Numerical methods IV (time stepping) by Nils Wedi (room 007; ext. 2657) In part based on previous material by Mariano.
Computational Modeling for Engineering MECN 6040
Chapter 8 Elliptic Equation.
RAMS/BRAMS Basic equations and some numerical issues.
Remark: foils with „black background“ could be skipped, they are aimed to the more advanced courses Rudolf Žitný, Ústav procesní a zpracovatelské techniky.
Numerical Integration of Partial Differential Equations (PDEs)
Atms 4320 Lab 2 Anthony R. Lupo. Lab 2 -Methodologies for evaluating the total derviatives in the fundamental equations of hydrodynamics  Recall that.
CE 498/698 and ERS 685 (Spring 2004) Lecture 121 Lecture 12: Control-Volume Approach (time-variable) CE 498/698 and ERS 685 Principles of Water Quality.
Introduction to Numerical Methods I
Parabolic PDEs Generally involve change of quantity in space and time Equivalent to our previous example - heat conduction.
PDEs & Parabolic problems Jacob Y. Kazakia © Partial Differential Equations Linear in two variables: Usual classification at a given point (x,y):
Computational Fluid Dynamics I PIW Numerical Methods for Parabolic Equations Instructor: Hong G. Im University of Michigan Fall 2005.
Numerical Methods for Partial Differential Equations
Numerical Methods Marisa Villano, Tom Fagan, Dave Fairburn, Chris Savino, David Goldberg, Daniel Rave.
MATH 685/ CSI 700/ OR 682 Lecture Notes Lecture 10. Ordinary differential equations. Initial value problems.
Numerical Methods for Partial Differential Equations CAAM 452 Spring 2005 Lecture 6 Various Finite Difference Discretizations for the Advection Equations.
Numerical Methods for Partial Differential Equations
1 The Spectral Method. 2 Definition where (e m,e n )=δ m,n e n = basis of a Hilbert space (.,.): scalar product in this space In L 2 space where f * :
Finite Differences Finite Difference Approximations  Simple geophysical partial differential equations  Finite differences - definitions  Finite-difference.
Taylor-Galerkin Schemes
Hyperbolic PDEs Numerical Methods for PDEs Spring 2007 Jim E. Jones.
Introduction to Numerical Methods for ODEs and PDEs Methods of Approximation Lecture 3: finite differences Lecture 4: finite elements.
Lecture 3.
1 EEE 431 Computational Methods in Electrodynamics Lecture 4 By Dr. Rasime Uyguroglu
1 Computational Methods Dr. Farzad Ismail School of Aerospace and Mechanical Engineering Universiti Sains Malaysia Nibong Tebal Pulau Pinang Week.
1 Discretization Methods Dr. Farzad Ismail School of Aerospace and Mechanical Engineering Universiti Sains Malaysia Nibong Tebal Pulau Pinang Week.
7. Introduction to the numerical integration of PDE. As an example, we consider the following PDE with one variable; Finite difference method is one of.
MECH593 Introduction to Finite Element Methods Eigenvalue Problems and Time-dependent Problems.
台灣師範大學機電科技學系 C. R. Yang, NTNU MT -1- Chapter 11 Numerical Integration Methods in Vibration Analysis 11.
Engineering Analysis – Computational Fluid Dynamics –
Engineering Analysis – Computational Fluid Dynamics –
16.920J/SMA 5212 Numerical Methods for PDEs Lecture 5 Finite Differences: Parabolic Problems B. C. Khoo Thanks to Franklin Tan SMA-HPC ©2002 NUS.
HEAT TRANSFER FINITE ELEMENT FORMULATION
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.
Requirements of High Accuracy Computing 1) Adopted numerical scheme must resolve all physical time and length scales. 2) Numerical scheme must be neutrally.
The story so far… ATM 562 Fovell Fall, Convergence We will deploy finite difference (FD) approximations to our model partial differential equations.
Towards Future Navier-Stokes Schemes Uniform Accuracy, O(h) Time Step, Accurate Viscous/Heat Fluxes Hiroaki Nishikawa National Institute of Aerospace.
Lecture 2. Finite Difference (FD) Methods Conservation Law: 1D Linear Differential Equation:
Introduction In 1904, Bjerknes pointed out that the future state of the atmosphere could be predicted by integrating the partial differential equations.
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.
Time Integration Schemes Bill Skamarock NCAR/MMM 1.Canonical equations for scheme analyses. 2.Time-integration schemes used in NWP models.
Lecture I & II: Foundations of Numerical HydroDynamics
1 Flutter Computation Examples – Simple Cases Flutter Computation Examples A binary aeroelastic system has the following expression Find the stiffness.
1 EEE 431 Computational Methods in Electrodynamics Lecture 13 By Dr. Rasime Uyguroglu
Computational Methods for Kinetic Processes in Plasma Physics
EEE 431 Computational Methods in Electrodynamics
Lecture 4: Numerical Stability
Introduction to Numerical Methods I
Convection-Dominated Problems
Chapter 30.
Modeling of Traffic Flow Problems
ივანე ჯავახიშვილის სახელობის
Simple FD Gerard T. Schuster.
21th Lecture - Advection - Diffusion
Objective Numerical methods Finite volume.
topic4: Implicit method, Stability, ADI method
topic4: Implicit method, Stability, ADI method
topic4: Implicit method, Stability, ADI method
topic11_shocktube_problem
LATTICE VIBRATIONS.
topic4: Implicit method, Stability, ADI method
6th Lecture : Numerical Methods
Derivatives and Gradients
Presentation transcript:

Finite differences Finite differences

Introduction 1 2 j-1 j j+1 N N+1 <------------------------------- L ----------------------------------> Taylor series expansion: Finite differences

Finite differences approximations = forward approximation Consistent if , ,…. are bounded = backward approximation adding both == centered differences Finite differences

Finite differences approximations (2) Also === fourth order approximation to the first derivative === Second order approximation to the second derivative Finite differences

The linear advection equation + initial and boundary conditions Analytical solution Substituting we get Eigenvalue problems for the operators With periodic B.C. λ can only have certain (imaginary) values where k is the wavenumber The general solution is a linear combination of several wavenumbers Finite differences

The linear advection equation (2) The solution is then: Propagating with speed U0 No dispersion For a single wave of wavenumber k, the frequency is ω=kU0 Energy conservation If periodic B.C. Finite differences

Space discretization ; substituting whose solution is with c centered second-order approximation ; substituting whose solution is with c U0 The phase speed c depends on k; dispersion kΔx= π ---> λ=2Δx ==> c=0 kΔx  Finite differences

Group velocity =-U0 for kΔx=π Continuous equation Discretized equation =-U0 for kΔx=π Approximating the space operator introduces dispersion Finite differences

Time discretization Try Substituting we get first-order forward approx. Try Substituting we get \--v--/ α (Courant-Friedrich-Levy number) If b>0, φjn increases exponentially with time (unstable) If b<0, φjn decreases exponentially with time (damped) If b=0, φjn maintains its amplitude with time (neutral) ω=a+ib Finite differences Also another dispersion is introduced, as we have approximated the operator ∂/ ∂t

Three time level scheme (leapfrog) This scheme is centered (second order accurate) in both space and time exponential Try a solution of the form If |λk| > 1 solution unstable if |λk| = 1 solution neutral if |λk| < 1 solution damped Substituting physical mode Δx--->0 Δt --->0 computational mode Finite differences

Stability analysis Energy method define Discretized analog : En Periodic boundary conditions Discretized analog : En φn N+1≡ φn1 If En=const, stable Finite differences

Example of the energy method upwind if U0>0 downwind if U0<0 x j-1 j α=0 ==> U0=0 no motion α=1 Δt= Δx/U0 En+1=En if if En+1 > En -------> unstable α > 0 ==> U0 > 0 (upwind) α < 1 U0 Δt/ Δx < 1 (CFL condition) En+1 < En Finite differences damped

Von Neumann method Consider a single wave if |λk| < 1 the scheme is damping for this wavenumber k if |λk| = 1 k the scheme is neutral if |λk| > 1 for some value of k, the scheme is unstable alternatively if Im(ω) > 0 scheme unstable if Im(ω) = 0 scheme neutral if Im(ω) < 0 scheme damping Vf= ω/k vg=∂ω/∂k Finite differences

Matrix method Let for a two-time-level scheme is called the amplification matrix And call the eigenvectors of Expanding the initial condition In terms of these eigenvectors and applying n times the amplification matrix exponential therefore Finite differences

Stability of some schemes Forward in time, centered in space (FTCS) scheme Upwind or downwind using Von Neumann, we find scheme unstable upwind if U0 > 0 downwind if U0 < 0 Using Von Neumann: α < 0 downwind α > 1 CFL limit α(α-1) > 0 ------> unstable Finite differences -1/4 < α(α-1) < 0==> 0 ≤ α ≤ 1 -------------> stable damped scheme

Stability of some schemes (cont) Leapfrog Using von Neumann we find |α|≤1 as stability condition Finite differences

Stability of some schemes (cont) Lax Wendroff (Taylor in t) From Applying Von Neumann we can find that |α| ≤1 -----> stable Equivalent to x Finite differences j j+1/2 j+1

Stability of some schemes (cont) Implicit centered scheme Krank-Nicholson where using von Neumann Always neutral Dispersion worse than leapfrog where Always neutral Dispersion better than implicit. No computational mode Finite differences

“Intuitive” look at stability If the information for the future time step “comes from” inside the interval used for the computation of the space derivative, the scheme is stable Otherwise it is unstable U0Δt Downwind scheme x--> point where the information comes from (xj-U0Δt) x j-1 j j+1 Interval used for the computation of ∂φ/∂x Upwind scheme o x x ----> α < 1 o ----> α > 1 j-1 j j+1 CFL number ==> fraction of Δx traveled in Δt seconds o x Leapfrog Implicit j-1 j j+1 Finite differences

Dispersion and group velocity Leapfrog vg vf U0 K-N Implicit ωΔt Finite differences π/2 π

Effect of dispersion Initial Leapfrog implicit Finite differences

Two-dimensional advection equation Using von Neumann, assuming a solution of the form we obtain using we obtain, for |λ| to be ≤1 the condition where Δs= Δx= Δy This is more restrictive than in one dimension by a factor Finite differences