Page 305 - Excel for Scientists and Engineers: Numerical Methods
P. 305

282                                        EXCEL: NUMERICAL METHODS


               Vapor Diffusion in a Tube
               Solved by Using a Custom Function
                  This example, using the same data as the preceding one, illustrates the use of
               the custom function.  The spreadsheet, not shown here, can be examined on the
               accompanying  CD-ROM.      Unlike  the  preceding  spreadsheets,  tables  of
               coefficients  and  constants  are  not  required.  The x-increment  is  2  cm,  thus
               creating a table of values that is 11 columns wide, including the boundary values.
               The function returns values identical to those shown in Figure 12-1 1.



               Hyperbolic Partial Differential Equations

                  Hyperbolic  second-order  differential  equations  result  from  problems
               involving vibration processes, and are of the form
                                              d2F  -  d2y
                                                   -
                                            p    g   q&T                         (12-30)
                   For example, the wave equation in one dimension
                                             d2y  Tg d2y
                                             -=--                                (12-31)
                                             at2    w at2
               describes the vibration  (i.e., the  lateral displacement y) of a string of length L,
               weight  W, tension  T and weightlunit length w = WIL, as a function of distance x
               along the length of the string.

               Solving Hyperbolic Partial Differential Equations:
               Replacing Derivatives with Finite Differences
                   Once  again,  we  can  solve the  problem  by  replacing  derivatives  by  finite
               differences.




               which, when rearranged, yields





                  If we set Tg(A,t)2/w(hX)2 = 1, equation  12-33 is simplified to equation  12-34.
               Interestingly, this simplified expression also yields the most accurate results.
                                                                                 (1 2-34)
                                       F.x,t+l  = Fx+l,t + Fx-l,l  - F*,I-l
   300   301   302   303   304   305   306   307   308   309   310