Example4 1 Rev.mw
Example 4.1 Heat Conduction in a Rectangular Slab
Consider the following transient heat conduction problem in a slab.[1-3] The governing equation is:
=α
u(x,0) = 1
u(0,t) = 0 and u(∞,t) is defined (4.1.1)
where α is the thermal diffusivity (m2/s). Equation (4.1.1) is solved below using Maple:
| > |
restart:with(linalg):with(inttrans):with(plots): |
The governing equation is stored in the equation:
| > |
eq:=diff(u(x,t),t)=alpha*diff(u(x,t),x$2); |
 |
(1) |
Enter the initial condition here:
 |
(2) |
The boundary condition at x = 0 is entered here:
 |
(3) |
Enter the second boundary condition here:
| > |
bc2:=u(infinity,t)=defined; |
 |
(4) |
The governing equation and the boundary condition at x = 0 are converted to the Laplace domain:
 |
(5) |
The given partial differential equation is transformed to an ordinary differential equation in the Laplace domain since
| > |
eqs:=subs(laplace(u(x,t),t,s)=U(x),eqs); |
 |
(6) |
where U(x) is the dependent variable in the Laplace domain:
 |
(7) |
| > |
bc1:=subs(laplace(u(0,t),t,s)=U(0),bc1); |
 |
(8) |
Next, the dependent variable in the Laplace domain is solved using the 'dsolve' command since (see chapter 3.1.6):
| > |
U(x):=rhs(dsolve({eqs,bc1},U(x))); |
 |
(9) |
The constant _C2 is found using the boundary condition at x = ∞. The dependent variable U(x) is defined at x = ∞. In the above expression
becomes ∞ as x tends to ∞. Hence, in the above expression, the coefficient of
| > |
eqc:=coeff(U(x),exp(1/alpha^(1/2)*s^(1/2)*x)); |
 |
(10) |
 |
(11) |
This simplifies the solution since:
 |
(12) |
The solution obtained in the Laplace domain is converted to the time domain since:
| > |
u:=invlaplace(U(x),s,t); |
 |
(13) |
This solution can be further simplified since:
 |
(14) |
The solution obtained can be plotted for a particular value of the parameter α since:
| > |
plot3d(subs(alpha=0.001,u),x=1..0,t=500..0,axes=boxed,title="Figure Exp. 4.1.1.",labels=[x,t,"u"],orientation=[120,60]); |
The same plot is made for a different value of α here:
| > |
plot3d(subs(alpha=0.1,u),x=1..0,t=50..0,axes=boxed,title="Figure Exp. 4.1.2.",labels=[x,t,"u"],orientation=[120,60]); |
Next, the dimensionless temperature u is plotted versus x for different values of time as shown below:
| > |
pfs:=plot([subs(alpha=0.001,t=1,u),subs(alpha=0.001,t=10,u),subs(alpha=0.001,t=100,u),subs(alpha=0.001,t=200,u)],x=0..1,axes=boxed,title="Figure Exp. 4.1.3.",thickness=4,labels=[x,"u"]); |
![PLOT(CURVES([[0., 0.], [0.5449288540e-2, 0.969820238e-1], [0.1089857708e-1, .1925365108], [0.1634786562e-1, .2852986527], [0.2179715416e-1, .3740245283], [0.2653855098e-1, .4470999194], [0.3127994780e...](images/Example4 1 Rev_21.gif) |
(15) |
| > |
pts:=textplot([[0.12,evalf(subs(alpha=0.001,t=1,x=0.08,u)),"t=1"],[0.25,evalf(subs(alpha=0.001,t=10,x=0.2,u)),"t=10"],[0.58,evalf(subs(alpha=0.001,t=100,x=0.5,u)),"t=100"],[0.69,evalf(subs(alpha=0.001,t=200,x=0.6,u)),"t=200"]]); |
![PLOT(TEXT([.12, `+`(`-`(`*`(1., `*`(invlaplace(`/`(`*`(exp(`+`(`-`(`*`(2.529822128, `*`(`^`(s, `/`(1, 2)))))))), `*`(s)), s, 1)))), 1.)],](images/Example4 1 Rev_22.gif) |
(16) |
An animation in time can be made since:
| > |
animate(subs(alpha=0.001,u),x=0..1,t=1..500,thickness=4,title="Figure Exp. 4.1.4.",axes=boxed,labels=[x,"u"]);
|