21.2 FDM FOR 1-D SYSTEMS

We start by explaining how FDM is applied to a 1-D system for simplicity. Assume the differential equation describing our system is second order of the form

(21.8) c21e008

Note that we normalized the length such that the maximum value of x is 1. The associated boundary conditions are given by

(21.9) c21e009

(21.10) c21e010

(21.11) c21e011

where v0 describes the value of the variable at x = 0, v1 describes the value of the variable at x = 1, and f(x) describes the initial values of the variable. Note that the boundary conditions at x = 0 and x = 1 might, in the general case, depend on time as v0(t) and v1(t). Usually, a is a simple constant. In the general case, a might depend both on time and space as a(x, t).

It might prove difficult to solve the system described by Eq. 21.8 when the boundary conditions are time dependent or the medium is inhomogeneous and/or time dependent. To convert the system equation to partial difference equation, we need to approximate the derivatives vx and vxx. Using Taylor series, we can describe the first derivative as

(21.12)

(21.13)

Get Algorithms and Parallel Computing now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.