Page 306 - Excel for Scientists and Engineers: Numerical Methods
P. 306
CHAPTER 12 PARTIAL DIFFERENTIAL EQUATIONS 283
When employing the simplified equation, the value of At is determined by
the expression
Ax
= Jm (1 2-3 5)
Equation 12-34 calculates the value of the function at time til from values at
t and t-,. Figure 12-13 shows the stencil of the method.
-1 0 1
Xi
Figure 12-13. Stencil of the method for the solution of a hyperbolic PDE. The
solid squares represent previously calculated values of the function; the open
square represents the value to be calculated.
To begin the calculations (i.e., to calculate the value of the function at tl),
equation 12-34 requires values of the function at to = 0 and also a value at t-l.
We can get a value for the function at t-l by making use of the fact that the
function is periodic. If the initial value of the function is zero, we can use the
expression 12-36 for the first row of the calculation, and 12-34 afterwards.
FX+l,O + FX-l,O
C,l = I (1 2-36)
If the value of the function is not zero at t = 0, a different method of
beginning the solution must be used.
An Example: Vibration of a String
A string 50 cm long and weighing 0.5 g is under a tension of 33 kg. Initially
the mid-point of the string is displaced 0.5 cm from its equilibrium position and
released. We want to calculate the displacement as a function of time at 5 cm
intervals along the length of the string, using equation 12-34. From equation 12-
35 the At must be 8.8 x seconds.