DOC PREVIEW
CSUN ME 501B - Numerical Methods for PDEs

This preview shows page 1-2 out of 6 pages.

Save
View full document
Premium Document
Do you want full access? Go Premium and unlock all 6 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Introduction to Numerical Analysis March 16 2009 Outline Numerical Methods for PDEs Review midterm solutions Review basic material on numerical calculus Larry Caretto Expressions for derivatives error and error order Mechanical Engineering 501B Seminar in Engineering Analysis Numerical methods for the diffusion equation March 16 2009 Explicit and Implicit First and second order time derivatives 2 Finite Difference Grids Numerical Analysis Want to express derivatives and integrals in terms of discrete data points Use different methods Develop interpolation polynomial and integrate or differentiate this result Use Taylor series to get expressions for derivatives Want expressions and measure of error with their use Subdivide region into discrete points Spacing between the points may be uniform or non uniform Example grid for xmin x xmax with N 1 nodes numbered from zero to N Initial node value x0 xmin Final grid node value xN xmax Nodal spacing xi xi xi 1 i 1 N Uniform spacing h xi xmin xmax N N 1 nodes give N spaces 3 Finite Difference Grids II Finite Difference Grids III Grid notation for four independent variables x y z and t xN xmax xi xi 1 xi x0 xmin y0 ymjn yM ymax yj yj 1 yj z0 zmin zK zmax zk zk 1 zk t0 tmin tL tmax tn tn 1 tn Non uniform grid illustrated below x N x1 x2 x3 xN 1 x2 x3 xN 2 xN 1 xN x0 x1 Two space dimensions require x and y grids M 1 y nodes xN xmax xi xi 1 xi x0 xmin y0 ymjn yM ymax yj yj 1 yj Dependent variable u x y z t at discrete points u xi yj zk tn Use notation below for this value of u Most general case has three space dimensions x y z and time 5 ME 501B Engineering Analysis 4 n u ijk u xi y j z k t n 6 1 Introduction to Numerical Analysis March 16 2009 Derivative Expressions Truncation Error Obtain from differentiating interpolation polynomials or from Taylor series Series expansion for f x about x a f x f a df 1 d2 f x a dx x a 2 dx 2 Note d0f dx0 f and 0 1 x a 2 1 d3 f 3 dx 3 x a If we truncate series after m terms 1 dn f n n 0 n dx m f x x a 3 x a 1 dn f n n 0 n dx f x x a n x a x a 1 dn f n n m 1 n dx x a n x a Derivative Expressions fi df dx x xi f i x xi 1 d2 f 2 dx 2 d2 f dx 2 kh 2 f xi kh f xi x xi fi n x xi df dx kh x xi f i k f i f i kh 1 d3 f 3 dx 3 1 d m 1 f m 1 dx m 1 x a m 1 x 8 Combine all definitions for compact series notation xi k xi x0 i k h x0 ih kh kh x a n x a Derivative Expressions II Look at finite difference grid with equal spacing h x so xi x0 ih Want Taylor series for fi k f xi k in terms of fi f xi and derivatives at x xi df dx 1 dn f n n m 1 n dx unknown between x and a 7 f xi kh f xi Terms used Truncation error m Can write truncation error as single term at unknown location derivation based on the theorem of the mean m What is error from truncating series x a n kh 3 x xi dn f dx n 1 d2 f 2 dx 2 kh 2 x xi 1 d3 f 3 dx 3 kh 3 x xi f i kh 2 f i kh 3 2 3 Use this formula to get expansions for various grid locations about x xi and use results to get derivative expressions x xi 9 Derivative Expressions III Apply general equation for k 1 and k 1 f i k f i f i kh Derivative Expressions IV f i kh 2 f i kh 3 2 3 f i h 2 f i h 3 f h 2 f i h 3 2 3 f i 1 f i f i h i 2 3 f f f h f h f f f i i 1 i i i i 1 i Ah Forward h 2 3 h f i 1 f i f i h fi f i f i 1 f i h f i h f f i 1 i Ah h 2 3 h Backward 11 ME 501B Engineering Analysis 10 Subtract fi 1 and fi 1 expressions f i h 2 f i h 3 f h 2 f i h 3 2 3 f i 1 f i f i h i 2 3 2 f h 3 2 f i h 5 f i 1 f i 1 2 f i h i 3 5 f i 1 f i f i h fi f i 1 f i 1 f i h 2 f i h 4 f f i 1 i 1 Ah 2 h 3 5 2h Result called central difference expression 12 2 Introduction to Numerical Analysis March 16 2009 Order of the Error Order of the Error Notation Write the error term for nth error term as O hn Forward and backward derivative have error term that is proportional to h Central difference error is proportional to h2 Error proportional to hn called nth order Reducing step size by a factor of a reduces nth order error by an h 2 1 2 h1 Big oh notation O denotes order Recognizes that factor multiplying hn may change slightly with h First order forward f f f i i 1 i O h h n Second order central Second order forward and backward difference first derivatives fi f i 2 4 f i 1 3 f i h2 f i 2h 3 14 Derivative order first second etc Order of the error typically second although higher orders used Forward backwards and central difference expressions typically use central except at boundaries Derive by Taylor series manipulations See results on page 271 of Hoffman 15 16 Order of Error Examples Roundoff Error Possible in derivative expressions from subtracting close differences Example f x ex f x ex h ex h 2h and error at x 1 is e1 h e1 h 2h e Table 1 in introduction notes shows first derivative error for ex around x 1 Using first and second order forward and second order central differences Step h 0 4 0 2 and 0 1 Error ratio for doubling step size 4 01 to 4 02 for central differences 2 07 to 2 15 for first order forward differences 4 32 to 4 69 for second order forward log 2 1 log 2 log 1 n h2 log h2 log h1 log h 1 ME 501B Engineering Analysis f i 1 …


View Full Document

CSUN ME 501B - Numerical Methods for PDEs

Download Numerical Methods for PDEs
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Numerical Methods for PDEs and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Numerical Methods for PDEs and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?