6. Introduction to Spectral method. Finite difference method – approximate a function locally using lower order interpolating polynomials. Spectral method.

Slides:



Advertisements
Similar presentations
1 Chapter 5 Numerical Integration. 2 A Review of the Definite Integral.
Advertisements

Computational Methods in Physics PHYS 3437
By S Ziaei-Rad Mechanical Engineering Department, IUT.
Asymptotic error expansion Example 1: Numerical differentiation –Truncation error via Taylor expansion.
Today’s class Romberg integration Gauss quadrature Numerical Methods
2. Numerical differentiation. Approximate a derivative of a given function. Approximate a derivative of a function defined by discrete data at the discrete.
Data mining and statistical learning - lecture 6
MATH 685/ CSI 700/ OR 682 Lecture Notes
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
Total Recall Math, Part 2 Ordinary diff. equations First order ODE, one boundary/initial condition: Second order ODE.
Ch 5.2: Series Solutions Near an Ordinary Point, Part I
12/21/2001Numerical methods in continuum mechanics1 Continuum Mechanics On the scale of the object to be studied the density and other fluid properties.
Curve-Fitting Regression
MANE 4240 & CIVL 4240 Introduction to Finite Elements Numerical Integration in 1D Prof. Suvranu De.
Curve-Fitting Polynomial Interpolation
Approximation on Finite Elements Bruce A. Finlayson Rehnberg Professor of Chemical Engineering.
Numerical Integration
MA/CS 375 Fall MA/CS 375 Fall 2002 Lecture 32.
Lesson 5 Method of Weighted Residuals. Classical Solution Technique The fundamental problem in calculus of variations is to obtain a function f(x) such.
Differential Equations and Boundary Value Problems
CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4: KFUPM.
Numerical solution of Differential and Integral Equations PSCi702 October 19, 2005.
Quadrature Greg Beckham. Quadrature Numerical Integration Goal is to obtain the integral with as few computations of the integrand as possible.
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 * :
Computational Methods in Physics PHYS 3437 Dr Rob Thacker Dept of Astronomy & Physics (MM-301C)
Chapter 4, Integration of Functions. Open and Closed Formulas x 1 =a x 2 x 3 x 4 x 5 =b Closed formula uses end points, e.g., Open formulas - use interior.
1 Chapter 5 Numerical Integration. 2 A Review of the Definite Integral.
3. Numerical integration (Numerical quadrature) .
1 Chapter 7 NUMERICAL INTEGRATION. 2 PRELIMINARIES We use numerical integration when the function f(x) may not be integrable in closed form or even in.
Orthogonal Functions Numerical Methods in Geophysics Function Approximation The Problem we are trying to approximate a function f(x) by another function.
CIS V/EE894R/ME894V A Case Study in Computational Science & Engineering HW 5 Repeat the HW associated with the FD LBI except that you will now use.
MA2213 Lecture 4 Numerical Integration. Introduction Definition is the limit of Riemann sums I(f)
Extrapolation Models for Convergence Acceleration and Function ’ s Extension David Levin Tel-Aviv University MAIA Erice 2013.
Lecture 8 Numerical Analysis. Solution of Non-Linear Equations Chapter 2.
MA/CS 375 Fall MA/CS 375 Fall 2002 Lecture 31.
Integration of 3-body encounter. Figure taken from
Fourier TheoryModern Seismology – Data processing and inversion 1 Fourier Series and Transforms Orthogonal functions Fourier Series Discrete Fourier Series.
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.
1 Finite Elements. 2 Finite elements Formally identical to spectral technique Dependent variables expanded as linear combinations of basis local, non.
5. Integration 2.Quadrature as Box Counting 3.Algorithm: Trapezoid Rule 4.Algorithm: Simpson’s Rule 5.Integration Error 6.Algorithm: Gaussian Quadrature.
Numerical Methods.
Lecture 22 Numerical Analysis. Chapter 5 Interpolation.
1 Spring 2003 Prof. Tim Warburton MA557/MA578/CS557 Lecture 23.
1 EEE 431 Computational Methods in Electrodynamics Lecture 18 By Dr. Rasime Uyguroglu
Lecture 21 MA471 Fall 03. Recall Jacobi Smoothing We recall that the relaxed Jacobi scheme: Smooths out the highest frequency modes fastest.
CHAP 3 WEIGHTED RESIDUAL AND ENERGY METHOD FOR 1D PROBLEMS
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter 27.
Techniques for Numerical Integration
1/7  4.6 Adaptive Quadrature Methods Chapter 4 Numerical Differentiation and Integration -- Adaptive Quadrature Methods   /2  /4  /8 Predict the.
The purpose of Chapter 5 is to develop the basic principles of numerical integration Usefule Words integrate, integral 积分(的), integration 积分(法), quadrature.
Runge Kutta schemes Taylor series method Numeric solutions of ordinary differential equations.
Quadrature – Concepts (numerical integration) Don Allen.
1 CHAP 3 WEIGHTED RESIDUAL AND ENERGY METHOD FOR 1D PROBLEMS FINITE ELEMENT ANALYSIS AND DESIGN Nam-Ho Kim.
Chapter 4, Integration of Functions
Nodal Methods for Core Neutron Diffusion Calculations
d-Fold Hermite-Gauss Quadrature and Computation of Special Functions
Spectral methods for stiff problems MATH 6646
Numerical Analysis Lecture 7.
Chapter 27.
NUMERICAL INTEGRATION
NUMERICAL INTEGRATION
Numerical Computation and Optimization
SKTN 2393 Numerical Methods for Nuclear Engineers
Numerical Integration
Chapter 4, Integration of Functions
Approximation of Functions
Generalized Finite Element Methods
Presentation transcript:

6. Introduction to Spectral method. Finite difference method – approximate a function locally using lower order interpolating polynomials. Spectral method – approximate a function using global higher order interpolating polynomials. Using spectral method, a higher order approximation can be made with moderate computational resources.

In spectral methods, a function f(x) is approximated by its projection to the polynomial basis Difference between f(x) and the approximation P N f(x) is called the truncation error. For a well behaved function f(x), the truncation error goes to zero as increasing N. Ex) an approximation for a function u(x) = cos 3 (  x/2) – (x+1) 3 /8

Gaussian integration (quadrature) formula is used to achieve high precision. Gauss formula is less convenient since it doesn’t include end points of I = [a,b].

Gauss-Lobatto formula. Since we have two less free parameters compare to the Gauss formula, the degree of precision for the Gauss-Lobatto formula is D = 2N – 1. Since N – 1 roots are used for { x i }, the basis is For I = [-1,1] and w(x) = 1, x i are roots of  N-1 = P’ N (x)=0.

``Exact’’ spectral expansion differs from numerically evaluated expansion. The Interpolant of f(x), I N f, is called the spectral approximation of f(x). Abscissas used in the Gauss quadrature formula {x i } are also called collocation points. Exc 6-1) Show that the value of interpolant agrees with the function value at each collocation points,

A set of function values at collocation points is called configuration space. A set of coefficients of the spectral expansion is called coefficient space. The map between configuration space and coefficient space is a bijection (one to one and onto). Ex) a derivative is calculated using a spectral expansion in the coefficient space.

Difference in P N f (analytic) and I N f (interpolant).

Error in interpolant. Error in derivative.

Choice for the polynomials: 1) Legendre polynomials.  n (x) = P n (x). Interval I = [-1,1], and weight w(x) = 1.

Some linear operations to the Legendre interpolant. Exc 6-2) Show the above relations using recursion relations for P n (x).

2) Chebyshev polynomials.  n (x) = T n (x). Interval I = [-1,1], and weight

Some linear operations to the Chebyshev interpolant. Exc 6-3) Show the above relations using recursion relations for T n (x).

Convergence property For C 1 – functions, the error decays faster than any power of N. (evanescent error)

Differential equation solver. Consider a system differential equations of the following form. L and B are linear differential operators. i.e. satisfies boundary condition exactly, and Numerically constructed function is called admissible solution, if Weighted residual method requires that, for N+1 test functions  n (x)

Recall: Notation for the spectral expansion. Gauss type quadrature formula (including Radau, Lobatto) is used. Continuum.

Three types of solvers. Depending on the choice of the spectral basis  n and the test function  n, one can generate various different types of spectral solvers. A manner of imposing boundary conditions also depend on the choice. (i)The Tau-method. Choose  n as one of the orthogonal basis such as P n (x), T n (x). Choose the test function  n the same as the spectral basis  n. (ii)The collocation method. Choose  n as one of the orthogonal basis such as P n (x), T n (x). Choose the test function  n =  ( x – x n ) fpr any spectral basis  n. (iii)The Galerkin method. Choose the spectral basis  n and the test function  n as some linear combinations of orthogonal polynomial basis G n that satisfies the boundary condition. The basis G n is called Galerkin basis. ( G n is not orthogonal in general. )

(i)The Tau-method. Choose the test function  n the same as the spectral basis  n. Then solve A few of these equations with the largest n are replaced by the boundary condition. (The number is that of the boundary condition.) (Note: here we have N+1 equations for N+1 unknowns.) Linear operator, L, acting on the interpolant can be replaced by a matrix L nm. Therefore becomes

(i)The Tau-method (continued). Boundary condition: suppose operator on the boundary B is linear,

A test problem. Consider 2 point boundary value problem of the second order ODE, This boundary value problem has unique exact solution, Example: Apply Tau-method to the test problem with the Chebyshev basis.

Example: Apply Tau-method to the test problem with the Chebyshev (Continued) Boundary conditions The spectral expansion of the R.H.S becomes Replace two largest componets (n = 4 and 3) of with the two boundary conditions. Done!

Note the difference from the Tau method. LHS double sum. RHS not a spectral coefficients The boundary points are also taken as the collocation points. (Lobatto) The equations at the boundaries are replaced by the boundary conditions. This is rewritten, or, (ii)The collocation method. Choose  n as one of the orthogonal basis such as P n (x), T n (x). Choose the test function  n =  ( x – x n ) fpr any spectral basis  n. Then solve, Ex). A test problem with Chebyshev basis. Exc 6-4) Make a spectral code to solve the same test problem using the collocation method. Try both of Chebyshev and Legendre basis. Estimate the norm ||I N f – f || for the different N.

– The Galerkin basis is not orthogonal in general. – It is usually better to construct G n that relates to a certain orthogonal basis  n in a simple manner (no general recipe for the construction.) (iii)The Galerkin method. Choose the spectral basis  n and the test function  n as some linear combinations of orthogonal polynomial basis G n that satisfies the boundary condition. The basis G n is called Galerkin basis. Ex) – Highest order of the basis should be N – 1 to maintain a consistent degree of approximation. (so the highest basis appears is T N (x). )

The interpolant is defined by Ex)Consider the case with two point boundary value problem. Number of collocation points is N + 1. Since two boundary condition is imposed on the Galerkin basis {G n } {G n }: N – 1 are basis, n= 0, …, N – 2. Assume that {G n } can be constructed from a linear combination of the orthogonal basis {  n }. Then we may introduce a matrix M mn such that Taking the test function  n the same as Galerkin basis G n, Finally, using transformation matrix M mn again, we spectral coefficients Exc 6-5) Show that this equation is wrtten

A comparison of erros of the different method.