Example4.3 rev 1.mw

Example 4.3  Heat Conduction with Flux Boundary Conditions 

In the previous two examples, the temperature (dependent variable) at x = 0 was specified.  The same technique can be applied for eh case where the derivative of the dependent variable is known at the boundary x = 0 (flux boundary conditions).  Consider the transient heat conduction problem in a slab.[4]  The governing equation in dimensionless form is 

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

 

                                                                            u(x,0) = 0 

                                                                              

                                                   

                                                                           Typesetting:-mfrac(Typesetting:-mrow(Typesetting:-mo((0,t) = - k and u(∞,t) is defined                                  (4.1.3) 

 

The flux boundary condition has to be considered while taking the Laplace transform.  Equation (4.1.3)  is solved in Maple below: 

> restart:with(linalg):with(inttrans):with(plots):
 

> 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)
 

> u(x,0):=0;
 

0 (2)
 

> bc1:=diff(u(x,t),x)=-k;
 

diff(u(x, t), x) = `+`(`-`(k)) (3)
 

> bc2:=u(infinity,t)=defined;
 

u(infinity, t) = defined (4)
 

> eqs:=laplace(eq,t,s):
 

> eqs:=subs(laplace(u(x,t),t,s)=U(x),eqs);
 

`*`(s, `*`(U(x))) = `*`(alpha, `*`(diff(diff(U(x), x), x))) (5)
 

> bc1:=laplace(bc1,t,s);
 

diff(laplace(u(x, t), t, s), x) = `+`(`-`(`/`(`*`(k), `*`(s)))) (6)
 

The boundary condition in the Laplace domain is: 

> bc1:=subs(laplace(u(x,t),t,s)=U(x),bc1);
 

diff(U(x), x) = `+`(`-`(`/`(`*`(k), `*`(s)))) (7)
 

> bc1:=subs(x=0,convert(bc1,D));
 

(D(U))(0) = `+`(`-`(`/`(`*`(k), `*`(s)))) (8)
 

> U(x):=rhs(dsolve({eqs,bc1},U(x)));
 

`+`(`-`(`/`(`*`(`+`(`*`(k, `*`(`^`(alpha, `/`(1, 2)))), `-`(`*`(_C2, `*`(`^`(s, `/`(3, 2)))))), `*`(exp(`/`(`*`(`^`(s, `/`(1, 2)), `*`(x)), `*`(`^`(alpha, `/`(1, 2))))))), `*`(`^`(s, `/`(3, 2))))), `*... (9)
 

> eqc:=coeff(U(x),exp(1/alpha^(1/2)*s^(1/2)*x));
 

`+`(`-`(`/`(`*`(`+`(`*`(k, `*`(`^`(alpha, `/`(1, 2)))), `-`(`*`(_C2, `*`(`^`(s, `/`(3, 2))))))), `*`(`^`(s, `/`(3, 2)))))) (10)
 

> _C2:=solve(eqc,_C2);
 

`/`(`*`(k, `*`(`^`(alpha, `/`(1, 2)))), `*`(`^`(s, `/`(3, 2)))) (11)
 

> U(x):=eval(U(x));
 

`/`(`*`(k, `*`(`^`(alpha, `/`(1, 2)), `*`(exp(`+`(`-`(`/`(`*`(`^`(s, `/`(1, 2)), `*`(x)), `*`(`^`(alpha, `/`(1, 2)))))))))), `*`(`^`(s, `/`(3, 2)))) (12)
 

> u:=invlaplace(U(x),s,t);
 

`*`(k, `*`(`^`(alpha, `/`(1, 2)), `*`(invlaplace(`/`(`*`(exp(`+`(`-`(`/`(`*`(`^`(s, `/`(1, 2)), `*`(x)), `*`(`^`(alpha, `/`(1, 2)))))))), `*`(`^`(s, `/`(3, 2)))), s, t)))) (13)
 

The dimensionless temperature profile is given by: 

> u:=convert(u,erfc);
 

`*`(k, `*`(`^`(alpha, `/`(1, 2)), `*`(invlaplace(`/`(`*`(exp(`+`(`-`(`/`(`*`(`^`(s, `/`(1, 2)), `*`(x)), `*`(`^`(alpha, `/`(1, 2)))))))), `*`(`^`(s, `/`(3, 2)))), s, t)))) (14)
 

> pars:={alpha=0.001,k=1};
 

{alpha = 0.1e-2, k = 1} (15)
 

Plots are made for particular values of parameters: 

> plot3d(subs(pars,u),x=1..0,t=300..0,axes=boxed,title="Figure Exp. 4.1.7.",labels=[x,t,"u"],orientation=[-60,60]);
 

Plot
 

> plot([subs(pars,t=1,u),subs(pars,t=10,u),subs(pars,t=100,u),subs(pars,t=200,u)],x=0..1,axes=boxed,title="Figure Exp. 4.1.8.",thickness=5,labels=[x,"u"],legend=["t=1","t=10","t=100","t=200"]);
 

Plot_2d
 

>