Lecture 22 MA471 Fall 2003. Advection Equation Recall the 2D advection equation: We will use a Runge-Kutta time integrator and spectral representation.

Slides:



Advertisements
Similar presentations
Finite Difference Discretization of Hyperbolic Equations: Linear Problems Lectures 8, 9 and 10.
Advertisements

5.1 Real Vector Spaces.
Numerical Methods for Partial Differential Equations CAAM 452 Spring 2005 Lecture 9 Instructor: Tim Warburton.
SE301: Numerical Methods Topic 8 Ordinary Differential Equations (ODEs) Lecture KFUPM Read , 26-2, 27-1 CISE301_Topic8L8&9 KFUPM.
Block LU Factorization Lecture 24 MA471 Fall 2003.
Digital Kommunikationselektronik TNE027 Lecture 5 1 Fourier Transforms Discrete Fourier Transform (DFT) Algorithms Fast Fourier Transform (FFT) Algorithms.
The Discrete Fourier Transform. The spectrum of a sampled function is given by where –  or 0 .
Lecture 15 Orthogonal Functions Fourier Series. LGA mean daily temperature time series is there a global warming signal?
Engineering Mathematics Class #15 Fourier Series, Integrals, and Transforms (Part 3) Sheng-Fang Huang.
1 LES of Turbulent Flows: Lecture 4 (ME EN ) Prof. Rob Stoll Department of Mechanical Engineering University of Utah Spring 2011.
1 Chapter 4 Interpolation and Approximation Lagrange Interpolation The basic interpolation problem can be posed in one of two ways: The basic interpolation.
Computational Methods in Physics PHYS 3437
Finite Element Method Introduction General Principle
Ch 7.9: Nonhomogeneous Linear Systems
Fast Fourier Transform. Agenda Historical Introduction CFT and DFT Derivation of FFT Implementation.
Reconfigurable Computing S. Reda, Brown University Reconfigurable Computing (EN2911X, Fall07) Lecture 16: Application-Driven Hardware Acceleration (1/4)
Subdivision Analysis via JSR We already know the z-transform formulation of schemes: To check if the scheme generates a continuous limit curve ( the scheme.
The Fourier series A large class of phenomena can be described as periodic in nature: waves, sounds, light, radio, water waves etc. It is natural to attempt.
Discrete Time Periodic Signals A discrete time signal x[n] is periodic with period N if and only if for all n. Definition: Meaning: a periodic signal keeps.
Numerical Methods for Partial Differential Equations CAAM 452 Spring 2005 Instructor: Tim Warburton.
Differential Equations and Boundary Value Problems
Numerical Methods for Partial Differential Equations CAAM 452 Spring 2005 Lecture 2 Instructor: Tim Warburton.
Numerical Methods for Partial Differential Equations CAAM 452 Spring 2005 Lecture 6 Various Finite Difference Discretizations for the Advection Equations.
Finite element method 1 Finite Elements  Basic formulation  Basis functions  Stiffness matrix  Poisson‘s equation  Regular grid  Boundary conditions.
Pseudospectral Methods
Numerical Methods for Partial Differential Equations
Function approximation: Fourier, Chebyshev, Lagrange
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 * :
EE3561_Unit 8Al-Dhaifallah14351 EE 3561 : Computational Methods Unit 8 Solution of Ordinary Differential Equations Lesson 3: Midpoint and Heun’s Predictor.
Transforms. 5*sin (2  4t) Amplitude = 5 Frequency = 4 Hz seconds A sine wave.
Lecture 12: Introduction to Discrete Fourier Transform Sections 2.2.3, 2.3.
1 LES of Turbulent Flows: Lecture 14 (ME EN ) Prof. Rob Stoll Department of Mechanical Engineering University of Utah Fall 2014.
1 LES of Turbulent Flows: Lecture 2 Supplement (ME EN ) Prof. Rob Stoll Department of Mechanical Engineering University of Utah Fall 2014.
MA/CS 375 Fall MA/CS 375 Fall 2002 Lecture 31.
Integration of 3-body encounter. Figure taken from
ECE 8443 – Pattern Recognition ECE 3163 – Signals and Systems Objectives: The Trigonometric Fourier Series Pulse Train Example Symmetry (Even and Odd Functions)
Numerical Methods for Partial Differential Equations CAAM 452 Spring 2005 Lecture 5 Summary of convergence checks for LMM and one-step time stepping Instructor:
1. Interpolating polynomials Polynomial of degree n,, is a linear combination of Definitions: (interval, continuous function, abscissas, and polynomial)
1 Spring 2003 Prof. Tim Warburton MA557/MA578/CS557 Lecture 8.
6. Introduction to Spectral method. Finite difference method – approximate a function locally using lower order interpolating polynomials. Spectral method.
Elliptic PDEs and the Finite Difference Method
1 Complex Images k’k’ k”k” k0k0 -k0-k0 branch cut   k 0 pole C1C1 C0C0 from the Sommerfeld identity, the complex exponentials must be a function.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter 31.
Motivation Thus far we have dealt primarily with the input/output characteristics of linear systems. State variable, or state space, representations describe.
1 Spring 2003 Prof. Tim Warburton MA557/MA578/CS557 Lecture 24.
1 Spring 2003 Prof. Tim Warburton MA557/MA578/CS557 Lecture 23.
CS 471 Final Project 2d Advection/Wave Equation Using Fourier Methods December 10, 2003 Jose L. Rodriguez
Lecture 21 MA471 Fall 03. Recall Jacobi Smoothing We recall that the relaxed Jacobi scheme: Smooths out the highest frequency modes fastest.
Fourier series, Discrete Time Fourier Transform and Characteristic functions.
The Trigonometric Fourier Series Representations
Lecture 17 - Approximation Methods CVEN 302 July 17, 2002.
Advanced Engineering Mathematics, 7 th Edition Peter V. O’Neil © 2012 Cengage Learning Engineering. All Rights Reserved. CHAPTER 4 Series Solutions.
Fast Fourier Transform (FFT) Problem: we need an efficient way to compute the DFT. The answer is the FFT. Consider a data sequence and its DFT: We can.
1 Chapter 4 Interpolation and Approximation Lagrange Interpolation The basic interpolation problem can be posed in one of two ways: The basic interpolation.
1 Spring 2003 Prof. Tim Warburton MA557/MA578/CS557 Lecture 25.
1 Spring 2003 Prof. Tim Warburton MA557/MA578/CS557 Lecture 32.
Runge Kutta schemes Taylor series method Numeric solutions of ordinary differential equations.
MA4229 Lectures 13, 14 Week 12 Nov 1, Chapter 13 Approximation to periodic functions.
Digital Image Processing Lecture 8: Fourier Transform Prof. Charlene Tsai.
Numerical Methods for Partial Differential Equations
Integral Transform Method
Boundary Element Analysis of Systems Using Interval Methods
Data Structures and Algorithms (AT70. 02) Comp. Sc. and Inf. Mgmt
Lecture 19 MA471 Fall 2003.
DFT and FFT By using the complex roots of unity, we can evaluate and interpolate a polynomial in O(n lg n) An example, here are the solutions to 8 =
Chapter 31.
Programming assignment #1 Solving an elliptic PDE using finite differences Numerical Methods for PDEs Spring 2007 Jim E. Jones.
Chapter 2 A Survey of Simple Methods and Tools
1st semester a.y. 2018/2019 – November 22, 2018
Presentation transcript:

Lecture 22 MA471 Fall 2003

Advection Equation Recall the 2D advection equation: We will use a Runge-Kutta time integrator and spectral representation in space.

Periodic Data Let’s assume we are given N values of a function f at N data points on the unit interval. For instance N=8 on a unit interval: 0 1/8 2/8 3/8 4/8 5/8 6/8 7/8 8/8

Discrete Fourier Transform We can seek a trigonometric interpolation of a function f as a linear combination of N (even) trigonometric functions: Such that:

Transform The interpolation formula defines a linear system for the unknown fhat coefficients: Or:

Code for the DFT

Code for Inverse DFT

Fast Fourier Transform See handout

Spectral Derivative We can differentiate the interpolant by:

Detail We note that the derivative of the k=(N/2) mode is technically: However, as we show on the next slide – this mode has turning points at all the data points.

Real Component of N/2 Mode i.e. the slope of the k=(N/2) mode is zero at all the 8 points..

Modified Derivative Formula So we can create an alternative symmetric derivative formula:

Spectral Differentiation Scheme 1)Use an fft to compute: 2)Differentiate in spectral space. i.e. compute:

cont 3) Then: 4) Summary: a) fft transform data to compute coefficients b) scale Fourier coefficients c) inverse fft (ifft) scaled coefficients

Final Twist Matlab stores the coefficients from the fast Fourier transform in a slightly odd order: The derivative matrix will now be a matrix with diagonal entries:

Spectral Differentiation Code 1)DFT data 2)Scale Fourier coefficients 3)IFT scaled coefficients

Two-Dimensional Fourier Transform We can now construct a Fourier expansion in two variables for a function of two variables.. The 2D inverse discrete transform and discrete transform are:

Advection Equation Recall the 2D advection equation: We will use a Runge-Kutta time integrator and spectral representation in space.

Runge-Kutta Time Integrator We will now discuss a particularly simple Runge-Kutta time integrator introduced by Jameson-Schmidt-Turkel The idea is each time step is divided into s substeps, which taken together approximate the update to s’th order.

Side note: Jameson-Schmidt- Turkel Runge-Kutta Integrator Taylor’s theorem tell’s us that We will compute an approximate update as:

JST Runge-Kutta The numerical scheme will look like We then factorize the polynomial derivative term:

Factorized Scheme

JST + Advection Equation We now use the PDE definition +

Now Use Spectral Representation A time step now consists of s substages. Each stage involves: a)Fourier transforming the ctilde using a fast Fourier transform (fft) b)Scaling the coefficients to differentiate in Fourier space c)Transforming the derivatives back to physical values at the nodes by inverse fast Fourier transform (ifft). d)Finally updating ctilde according to the advection equation. At the end we update the concentration.

Matlab Implementation First set up the nodes and the differentiation scalings.

24) Compute dt 26) Initiate concentration 28-29) compute advection vector 32-45) full Runge- Kutta time step 35) fft ctilde 37) x- and y- differentiation in Fourier space 40-41) transform back to physical values of derivatives 43) Update ctilde

FFT Resources Check out: for the fastest Fourier transform in the Westhttp:// Great list of links: – FFT for irregularly spaced data: –

Lab Exercise 1)Download example DFT code from website. 2)Benchmark codes as a function of N 3)Write your own version using an efficient FFT (say fftw) which: 1) FFT’s data 2)Scales coefficients 3)IFFT’s scaled coeffients 4)Write an advection code using the JST Runge- Kutta time integrator. This is the scalar version of Project 4