Example4.8 rev 1.mw

Example 4.8  Heat Conduction in a Rectangular Slab 

Example 4.1 is solved here with the boundary and initial conditions switched.[4]  The governing equation is 

 

Typesetting:-mrow(Typesetting:-mo(Typesetting:-mrow(Typesetting:-mfrac(Typesetting:-mrow(Typesetting:-mo( 

 

                                                                            u(x,0) = 0                                                    (4.1.10) 

 

                                                                                                                                 

                                                                          Typesetting:-mrow(Typesetting:-mi((0,t) = 1 and u(∞,t) is defined  

 

The following transformation is used to combined the variable:[7] 

 

                                                                                   η=Typesetting:-mrow(Typesetting:-mfrac(Typesetting:-mrow(Typesetting:-mi( 

 

The variable n in the new coordinate η is represented by U.  The governing equation (ordinary differential equation) for U is obtained by converting the time and special derivative in equation (4.1.10)  (partial differential equation) to derivatives in the η coordinate.  The boundary conditions for U are: 

 

                                                                                    U(0) = 1                                              (4.1.12) 

 

                                                                                   U(∞) = 0                                              (4.1.13) 

 

The governing equation for U is then solved with the above boundary conditions to obtain the final solution.  Example 4.8 is solved in Maple below:  

 

> restart:
 

The with(student) package is called to facilitate variable transformations: 

> with(student):
 

The governing equation is entered here: 

> eq:=diff(u(x,t),t)-alpha*diff(u(x,t),x$2);
 

`+`(diff(u(x, t), t), `-`(`*`(alpha, `*`(diff(diff(u(x, t), x), x))))) (1)
 

First, u(x,t) is transformed to U(η(x,t)): 

> eq1:=changevar(u(x,t)=U(eta(x,t)),eq);
 

`+`(`*`((D(U))(eta(x, t)), `*`(diff(eta(x, t), t))), `-`(`*`(alpha, `*`(`+`(`*`(((`@@`(D, 2))(U))(eta(x, t)), `*`(`^`(diff(eta(x, t), x), 2))), `*`((D(U))(eta(x, t)), `*`(diff(diff(eta(x, t), x), x)))... (2)
 

The transformation for η is substituted here: 

> eq2:=expand(simplify(subs(eta(x,t)=x/2/(alpha*t)^(1/2),eq1)));
 

`+`(`-`(`/`(`*`(`/`(1, 4), `*`((D(U))(`+`(`/`(`*`(`/`(1, 2), `*`(x)), `*`(`^`(`*`(alpha, `*`(t)), `/`(1, 2)))))), `*`(x))), `*`(t, `*`(`^`(`*`(alpha, `*`(t)), `/`(1, 2)))))), `-`(`/`(`*`(`/`(1, 4), `*... (3)
 

The governing equation is further simplified here: 

> eq2:=expand(eq2*t);
 

`+`(`-`(`/`(`*`(`/`(1, 4), `*`((D(U))(`+`(`/`(`*`(`/`(1, 2), `*`(x)), `*`(`^`(`*`(alpha, `*`(t)), `/`(1, 2)))))), `*`(x))), `*`(`^`(`*`(alpha, `*`(t)), `/`(1, 2))))), `-`(`*`(`/`(1, 4), `*`(((`@@`(D, ... (4)
 

> eq2:=subs(x=eta*2*(alpha*t)^(1/2),eq2);
 

`+`(`-`(`*`(`/`(1, 2), `*`((D(U))(eta), `*`(eta)))), `-`(`*`(`/`(1, 4), `*`(((`@@`(D, 2))(U))(eta))))) (5)
 

> eq2:=convert(eq2,diff);
 

`+`(`-`(`*`(`/`(1, 2), `*`(diff(U(eta), eta), `*`(eta)))), `-`(`*`(`/`(1, 4), `*`(diff(diff(U(eta), eta), eta))))) (6)
 

The final form for the governing equation is: 

> eq2:=expand(-2*eq2);
 

`+`(`*`(diff(U(eta), eta), `*`(eta)), `*`(`/`(1, 2), `*`(diff(diff(U(eta), eta), eta)))) (7)
 

Enter the boundary condition here: 

> bc1:=U(0)=1;
 

U(0) = 1 (8)
 

> bc2:=U(infinity)=0;
 

U(infinity) = 0 (9)
 

U is solved as: 

> U:=rhs(dsolve({eq2,bc1,bc2},U(eta)));
 

`+`(1, `-`(erf(eta))) (10)
 

> U:=convert(U,erfc);
 

erfc(eta) (11)
 

Next, us as a function of x and 1 is obtained as: 

> u:=subs(eta=x/2/(alpha*t)^(1/2),U);
 

erfc(`+`(`/`(`*`(`/`(1, 2), `*`(x)), `*`(`^`(`*`(alpha, `*`(t)), `/`(1, 2)))))) (12)
 

The solution obtained can be plotted: 

> plot3d(subs(alpha=0.001,u),x=1..0,t=500..0,axes=boxed,title="Figure Exp. 4.1.17.",labels=[x,t,"u"],orientation=[-60,60]);
 

Plot
 

>