Page 298 - Excel for Scientists and Engineers: Numerical Methods
P. 298
CHAPTER 12 PARTIAL DIFFERENTIAL EOUATIONS 275
An Example: Vapor Diffusion in a Tube
An air-filled tube 20 cm long allows water vapor to diffuse from a source
(liquid water) to a drying chamber, where the vapors are dissipated. Initially the
tube is capped so that the vapor cannot escape. The temperature of the tube is
held at 30°C. The equilibrium vapor pressure of water at this temperature is 3 1.8
mm Hg; thus the vapor pressure inside the tube is 3 1 .8 mm Hg. When the cap is
removed, the vapor will diffuse toward the drying chamber, where the water
vapor pressure is zero. We wish to model the vapor pressure along the length of
the tube as a function of time.
The diffusion equation is
*=DEE ( 12-29)
dt ax2
where p is the vapor pressure and D is the difhsion coefficient in units of cm2 s-I.
For water vapor, D = 0.1 15 cm2 s-l at 30°C.
We subdivide the length of the tube into uniform subintervals and calculate
the value of the function (here the vapor pressure p) at each interior point.
Choosing Ax = 4 yields four x values where the function value needs to be
evaluated (at x = 4, 8, 12 and 16 cm) and two boundary values where it is known
(at x = 0 and 20). Also, using Ax = 4 and Y = 1 sets At = 139 seconds.
Using equation 12-28 yields four simultaneous equations in four unknowns,
thus:
for x = 4, t = 139:
for x = 8, t = 139:
for x = 12, t = 139:
for x = 16, t = 139:
For Y = 1, the values of the coefficients for the four simultaneous equations
are shown in the spreadsheet in Figure 12-8. They are designated cl, c2, c3 and
c4 in the table. These coefficients will have different values if a different value
of Y is chosen. The constants (the values of the right-hand side of the four
equations) are also shown in Figure 12-8. The formulas in cells l15:L15 are