An Introduction to Numerical Methods

Slides:



Advertisements
Similar presentations
Agenda Semiconductor materials and their properties PN-junction diodes
Advertisements

3.6 Support Vector Machines
Formulation of linear hydrodynamic stability problems
© 2008 Pearson Addison Wesley. All rights reserved Chapter Seven Costs.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2003 Chapter 3 Data Transmission.
THE FINITE ELEMENT METHOD
1 Copyright © 2013 Elsevier Inc. All rights reserved. Appendix 01.
UNITED NATIONS Shipment Details Report – January 2006.
Finite Difference Discretization of Hyperbolic Equations: Linear Problems Lectures 8, 9 and 10.
Sigal Gottlieb, UMass Dartmouth: SAMSI workshop November 15, 2007 STRONG STABILITY PRESERVING RUNGE-KUTTA & MULTI-STEP TIME DISCRETIZATIONS Sigal Gottlieb,
Numerical methods III (Advection: the semi-Lagrangian technique)
Finite differences Finite differences.
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.
Summary of Convergence Tests for Series and Solved Problems
REVIEW: Arthropod ID. 1. Name the subphylum. 2. Name the subphylum. 3. Name the order.
Mathematics for Economics Beatrice Venturi 1 Economics Faculty CONTINUOUS TIME: LINEAR DIFFERENTIAL EQUATIONS Economic Applications LESSON 2 prof. Beatrice.
Mathematics for Economics Beatrice Venturi 1 Economics Faculty CONTINUOUS TIME: LINEAR DIFFERENTIAL EQUATIONS Economic Applications LESSON 2 prof. Beatrice.
Pole Placement.
Notes 18 ECE Microwave Engineering Multistage Transformers
VOORBLAD.
1 Analysis of Random Mobility Models with PDE's Michele Garetto Emilio Leonardi Politecnico di Torino Italy MobiHoc Firenze.
1. 2 No lecture on Wed February 8th Thursday 9 th Feb 14: :00 Thursday 9 th Feb 14: :00.
Constant, Linear and Non-Linear Constant, Linear and Non-Linear
Factor P 16 8(8-5ab) 4(d² + 4) 3rs(2r – s) 15cd(1 + 2cd) 8(4a² + 3b²)
Basel-ICU-Journal Challenge18/20/ Basel-ICU-Journal Challenge8/20/2014.
ME 302 DYNAMICS OF MACHINERY
© 2012 National Heart Foundation of Australia. Slide 2.
Abbas Edalat Imperial College London Contains joint work with Andre Lieutier (AL) and joint work with Marko Krznaric (MK) Data Types.
Understanding Generalist Practice, 5e, Kirst-Ashman/Hull
S Transmission Methods in Telecommunication Systems (5 cr)
1 Motion and Manipulation Configuration Space. Outline Motion Planning Configuration Space and Free Space Free Space Structure and Complexity.
Splines I – Curves and Properties
ECON 397 Macroeconometrics Cunningham
12 October, 2014 St Mungo's Academy 1 ADVANCED HIGHER MATHS REVISION AND FORMULAE UNIT 1.
Rational Functions and Models
Copyright © Cengage Learning. All rights reserved.
Eric Prebys, FNAL.  We have focused largely on a kinematics based approach to beam dynamics.  Most people find it more intuitive, at least when first.
©Brooks/Cole, 2001 Chapter 12 Derived Types-- Enumerated, Structure and Union.
12 System of Linear Equations Case Study
Copyright © 2014 John Wiley & Sons, Inc. All rights reserved.
PSSA Preparation.
Lial/Hungerford/Holcomb/Mullins: Mathematics with Applications 11e Finite Mathematics with Applications 11e Copyright ©2015 Pearson Education, Inc. All.
Computer Vision Lecture 7: The Fourier Transform
Copyright © 2014 John Wiley & Sons, Inc. All rights reserved.
State Variables.
Math Review with Matlab:
Copyright © Cengage Learning. All rights reserved.
Computational Methods II (Elliptic)
Copyright © Cengage Learning. All rights reserved.
Chapter 8 Elliptic Equation.
Numerical Integration of Partial Differential Equations (PDEs)
Introduction to Numerical Methods I
Numerical Methods for Partial Differential Equations
MATH 685/ CSI 700/ OR 682 Lecture Notes Lecture 10. Ordinary differential equations. Initial value problems.
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 * :
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.
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.
Engineering Analysis – Computational Fluid Dynamics –
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.
The story so far… ATM 562 Fovell Fall, Convergence We will deploy finite difference (FD) approximations to our model partial differential equations.
Lecture 2. Finite Difference (FD) Methods Conservation Law: 1D Linear Differential Equation:
1 EEE 431 Computational Methods in Electrodynamics Lecture 13 By Dr. Rasime Uyguroglu
Lecture 4: Numerical Stability
Introduction to Numerical Methods I
ივანე ჯავახიშვილის სახელობის
21th Lecture - Advection - Diffusion
6th Lecture : Numerical Methods
Presentation transcript:

An Introduction to Numerical Methods For Weather Prediction by Joerg Urban office 012 Based on lectures given by Mariano Hortal Numerical methods

Shallow water equations in 1 dimension Non linear equations h advection adjustement diffusion u … velocity along x direction h … absolute height g … acceleration due to gravity K …diffusion coefficient Velocity is equal in layers vertical direction (shallow) Numerical methods

Linearization u=U0+u’ h=H +h’ Const. + perturb. in the x-comp. of velocity Const. + perturb. in the height of the free surface Small perturbations Substitute and drop products of perturbations Numerical methods

Classification of PDE’s Boundary value problems D open domain ΓD f, g: known function; L, B: differential operator φ: unknown function of x boundary Initial value problems (most important to us) φ: unknown function of t t t=0 Numerical methods

Classification of PDE’s (II) Initial and boundary value problems Eigenvalue problems φ: unknown eigenfunction λ: eigenvalue of operator L Numerical methods

Existence and uniqueness of solutions ; y(t0)=y0 (initial value problem) Does it have a solution? Does it have only one solution? Do we care? If it has one and only one solution it is called a well posed problem Numerical methods

Picard’s Theorem Let and be continuous in the rectangle then, the initial-value problem Has a unique solution y(t) on the interval Finding the solution (not analytical) Numerical methods (finite dimensions) Numerical methods

Discretization Finite differences Spectral Finite elements Transform the continuous differential equation into a system of ordinary algebraic equations where the unknowns are the numbers fj Numerical methods

The Lax-Richtmeyer theorem Convergence Consistency Stability Lax-Richtmeyer theorem Discretized solution ---------> continuous solution discretization finer and finer Discretized equation ---------> continuous equation Discretized solution bounded If a discretization scheme is consistent and stable then it is convergent, and vice versa Numerical methods

Finite Differences - Introduction 1 2 j-1 j j+1 N N+1 <------------------------------- L ----------------------------------> Taylor series expansion: Numerical methods

Finite differences approximations forward approximation Consistent if … are bounded backward approximation adding both centered differences Consistent if … are bounded Numerical methods

Finite differences approximations (2) Also fourth order approximation to the first derivative Using the Taylor expansion again we can easily get the second derivative: second order approximation of the second derivative Numerical methods

The linear advection equation + initial and boundary conditions We start with a guess: Substituting we get: Eigenvalue problems for With periodic B.C. λ can only have certain (imaginary) values where k is the wave number The general solution is a linear combination of several wave numbers Numerical methods

The linear advection equation (2) The analytic solution is then: Propagating with speed U0 No dispersion For a single wave of wave number k the frequency is ω=kU0 Energy: For periodic B.C.: Numerical methods

Space discretization centered second-order approximation Try: results in whose solution is with c The phase speed c depends on k dispersion U0 kΔx= π ---> λ=2Δx ==> c=0 kΔx π Numerical methods

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

Time discretization Try Substituting we get In addition to our 2nd order centered approx. for the space derivative we use a 1st order forward approx. for the time derivative: Try Courant-Friedrich- Levy number Substituting we get 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 Numerical methods 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 Numerical methods

Stability analysis Energy method We have defined We have discretized t and hence the discretized analog of E(t) is En For periodic boundary conditions φn N+1≡ φn1 If En=const, than the scheme is stable Numerical methods

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 En+1 > En unstable α > 0 => U0 > 0 upwind α < 1 U0 Δt/ Δx < 1 CFL cond. damped En+1 < En if Numerical methods

Von Neumann method Consider a single wave if |λk| < 1 the scheme is damping for this wave number 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 Numerical methods

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, we find α < 0 downwind α > 1 CFL limit α(α-1) > 0 unstable -1/4 < α(α-1) < 0 => 0 ≤ α ≤ 1 stable damped scheme Numerical methods

Stability of some schemes (cont) Leapfrog Using von Neumann we find |α|≤1 as stability condition As a reminder α is the Courant-Friedrich-Levy number: Numerical methods

Stability of some schemes (cont) Lax Wendroff scheme From a Taylor expansion in t we get: Substitution the advection equation we: Discretization: Applying Von Neumann we can find that |α| ≤1 -----> stable Numerical methods

Stability of some schemes (cont) Implicit centered scheme We replace the space derivation by the average value of the centred space derivation at time level n-1 and n+1 using von Neumann Always neutral, however an Expensive implicit equation need to solved Dispersion worse than leapfrog Numerical methods

“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 Downwind scheme (unstable) x, x’ … point where the information comes from (xj-U0Δt) Interval used for the computation of ∂φ/∂x U0Δt j-1 j j+1 x Upwind scheme (conditionally stable) x if α < 1 x’ if α > 1 x’ x j-1 j j+1 Leapfrog (conditionally stable) CFL number ==> fraction of Δx traveled in Δt seconds x’ x Implicit (unconditionally stable) j-1 j j+1 Numerical methods

Dispersion and group velocity Vf= ω/k vg=∂ω/∂k Leapfrog vg vf U0 K-N ωΔt Implicit Numerical methods π/2 π

Effect of dispersion Initial Leapfrog implicit Numerical methods

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

Non linear advection equation Continuous form u(x,t) u(x,0) x x Change in shape even for the continuous form One Fourier component ukeikx no longer moving with constant speed but interacting with other components Fourier decomposition valid at each individual time but it changes amplitude with time No analytical solution! Numerical methods

Energy conservation Define again: == Discretization in space periodic B.C. First attempt: Second attempt: terms joined by arrows cancel from consecutive j’s Numerical methods

Aliassing Consider the product Minimum wavelength Aliasing occurs when the non-linear interactions in the advection term produce a wave which is too short to be represented on the grid. Consider the product in the interval 0≤x ≤2π Minimum wavelength 1 2 n N+1 Maximum wave number representable with the discretized grid <---------------L-------------> Numerical methods

Aliassing (cont.) wave number k  wave number 2kM-k Trigonometrical manipulations lead to: sin(kxj)=-sin[(2kM-k)xj] Therefore, it is not possible to distinguish wave numbers k and (2kM-k) on the grid. wave number k  wave number 2kM-k x x x Numerical methods

Non-linear instability If k1+k2 is misrepresented as k1 there is positive feedback, which causes instability k1 = 2kM - (k1+k2) ----------> 2k1=2kM-k2 2kM 2k1  kM 2Δx ≤ λ1 ≤ 4Δx These wavelengths keep storing energy and total energy is not conserved We can remove energy from the smallest wavelengths by - Fourier filtering - Smoothing - Diffusion - Use some other discretization (e.g. semi-Lagrangian) Numerical methods