1 / 14

The Finite-Difference Method

The Finite-Difference Method. Taylor Series Expansion. Suppose we have a continuous function f ( x ), its value in the vicinity of can be approximately expressed using a Taylor series as. (2.1). Using (2.1), we have derive the discrete expression for the first order derivative as.

kimball
Download Presentation

The Finite-Difference Method

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. The Finite-Difference Method Taylor Series Expansion Suppose we have a continuous function f(x), its value in the vicinity of can be approximately expressed using a Taylor series as (2.1) Using (2.1), we have derive the discrete expression for the first order derivative as (2.2)

  2. Backward f(x) Replacing x by xi+1 or xi-1, in (2.2) or substracting Taylor expansion equation for xi-1 from xi+1, we can get Central Forward x i-2 i-1 ii+1 i+2 ; we obtain Expressing

  3. The order of the higher-order terms that are deleted from the right-hand sides of the discrete equation. In numerical method, they are called “truncation errors”. General forms: FDS: The first order accurate BDS: The first order accurate CDS: The second order accurate Exercise: Derive CDS and determine its truncation error

  4. For the second order derivative, we also can use the same approach. Use the uniform grid Example: (2.3) (2.4) Eq. (2.3) + Eq. (2.4) Then, we have Centered Difference Scheme (CDS) with second order accuracy

  5. X: i=1, 2, 3….N Y: j=1,2,3…...M i,j+1 i-1,j i,j i+1,j i,j-1 Fig. 2.2: Uniform rectangular grids. Example of constructing the difference equation Select the CDS The basic idea for the finite-difference method is to replace the derivatives using the discrete approximation and convert the differential equation to a set of algebraic equations.

  6. The time derivatives FDS n-1 BDS n n+1 CDS

  7. g C x Fig. 2.3: Schematic of a propagation of a blob. 2.2. Numerical Schemes Explicitscheme: Anumerical scheme in which the numerical value at time step (n+1) is calculated directly from its previous value at the time step n. This means that once the values at the time step n are known, we can “predict” a new value at the time step (n+1) by a direct time integration. Implicit scheme: A numerical scheme in which the numerical value at the time step (n+1) is not explicitly obtained from its previous value at the time step n. This value must be solved from an algebraic equation formed at the time step n+1. Example: It is solvable, with a general form

  8. a) Leapfrog Scheme (2.5) Truncation error: for time derivative for space derivative Then, the difference equation is

  9. First-order accurate Second-order accurate b). Forward Time/Central Space Scheme (Euler Scheme) Truncation error: .

  10. First-order accurate First-order accurate c). Forward Time/Backward Space Scheme Truncation errors: Sometime, it is also called the upwind scheme for the case C > 0.

  11. First-order accurate Second-order accurate d). Forward Time/Implicit Central Space Scheme This is a fully-implicit scheme!

  12. First-order accurate Second-order accurate e). Crank-Nicolson Scheme—Semi-implicit Scheme Truncation errors:

  13. t f). Lax-Wendroff Scheme n+1 n+1/2 n x Then i-1 i+1/2 i-1/2 i i+1 Fig. 2.5: The space-time stencil used to construct the Lax-Wendroff scheme Truncation errors:

  14. QS: How could we know which scheme is better? Or How do we evaluate these schemes? Next ! Note: The next Wed is the exercise class to work on modeling project #1 Dr. Huang will be supervisor for that in-class lab work.

More Related