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

CHAPTER 12         PARTIAL DIFFERENTIAL EOUATIONS                    273



                   Cells  K3:K9  contain  constants  used  in  the  calculations;  these  cells  were
               assigned the names shown in  parentheses in column M.  The formulas in cells
               K6, K7, K8 and K9 are, respectively
                   =k/( hcap*rho)    (coefficient k in general PDE, equation 12-22)

                   =D12-C12  (AX)
                   =B14-B13  (At)

                   =e*Dt/( DxA2)     (f)
                   [In the spreadsheet, the range name f was used for the parameter Y in equation
                12-26, since r can't be used as a name in Excel.]
                   The values in cells on the edges of the table of temperatures (column C and
               column M) are the constant temperature values at the ends of the rod; the values
                in row 13 are the initial temperature of the interior of the rod.  The formula in the
               remaining  cells  in  the  body  of  the  temperature  table  (D14:L113)  is  based  on
               equation  12-22. For example, the formula in cell D14 is
                   =f*( C 1 3+E 1 3)+( 1 -2*f)*D 1 3

                   Experience has shown that the factorfmust  be less than  1/2 in order to avoid
                instability in the calculations.  For a given problem, this requires adjustment of
                both Ax  and At.



                            50





                         $ 30
                         e
                         .c..
                         ;
                         a,
                            20
                         :
                            10


                             0
                               0       20      40      60       80     100
                                                Time, seconds

                               Figure 12-6.  Temperature vs. time in a brass rod.
                    (folder 'Chapter 12 (PDE) Examples, workbook 'Parabolic PDE, sheet 'Temp distribution')
   291   292   293   294   295   296   297   298   299   300   301