Example 8.7.mw
Example 8.7 Heat Conduction with an Insulator Boundary Condition
Example (8.1.17) is solved in Maple below:
| > |
 |
First, the governing equations and boundary conditions are converted to the Laplace domain and solved in the Laplace domain:
| > |
eq:=diff(u(x,t),t)=diff(u(x,t),x$2); |
 |
(1) |
 |
(2) |
 |
(3) |
 |
(4) |
| > |
eqs:=subs(laplace(u(x,t),t,s)=U(x),eqs); |
 |
(5) |
| > |
bc1:=subs(laplace(u(x,t),t,s)=U(x),bc1); |
 |
(6) |
| > |
bc2:=subs(laplace(u(x,t),t,s)=U(x),bc2); |
 |
(7) |
 |
(8) |
| > |
U(x):=c[1]*cosh(s^(1/2)*x)+c[2]*sinh(s^(1/2)*x); |
![`+`(`*`(c[1], `*`(cosh(`*`(`^`(s, `/`(1, 2)), `*`(x))))), `*`(c[2], `*`(sinh(`*`(`^`(s, `/`(1, 2)), `*`(x))))))](images/Example 8.7_10.gif) |
(9) |
| > |
eq0:=eval(subs(x=0,bc1)); |
![`*`(c[2], `*`(`^`(s, `/`(1, 2)))) = 0](images/Example 8.7_11.gif) |
(10) |
| > |
eq1:=eval(subs(x=1,bc2)); |
![`+`(`*`(c[1], `*`(cosh(`*`(`^`(s, `/`(1, 2)))))), `*`(c[2], `*`(sinh(`*`(`^`(s, `/`(1, 2))))))) = `/`(1, `*`(s))](images/Example 8.7_12.gif) |
(11) |
| > |
con:=solve({eq0,eq1},{c[1],c[2]}); |
![{c[1] = `/`(1, `*`(cosh(`*`(`^`(s, `/`(1, 2)))), `*`(s))), c[2] = 0}](images/Example 8.7_13.gif) |
(12) |
The solution obtained in the Laplace domain is:
 |
(13) |
The polynomials are:
 |
(14) |
 |
(15) |
Note that the order of q(s) is greater than the order of p(s).
| > |
A(s):=P(s)/diff(Q(s),s); |
 |
(16) |
The roots of Q(s) are found as:
 |
(17) |
| > |
_EnvAllSolutions := true; |
 |
(18) |
 |
(19) |
The roots can be taken as:
 |
(20) |
Next, the coefficients are found:
| > |
A[n]:=simplify(subs(s=mu,A(s))); |
 |
(21) |
First A0 is found:
 |
(22) |
The coefficient An for values n = 1..∞ can be found as:
| > |
A[n]:=simplify(subs(mu^(1/2)=I*(2*n-1)/2*Pi,A[n])); |
 |
(23) |
An is simplified as:
| > |
vars:={cos(1/2*(2*n-1)*Pi)=0,sin(1/2*(2*n-1)*Pi)=(-1)^(n-1)}; |
 |
(24) |
| > |
A[n]:=simplify(subs(vars,A[n])); |
 |
(25) |
The general terms in the Laplace domain solution are (see equation (8.1.16)):
 |
(26) |
The inverse Laplace transform is:
| > |
u0t:=invlaplace(u0s,s,t); |
 |
(27) |
The term in the infinite series is
 |
(28) |
| > |
unt:=invlaplace(uns,s,t); |
 |
(29) |
| > |
unt:=subs(mu=-((2*n-1)/2*Pi)^2,unt); |
 |
(30) |
The final solution is obtained as:
| > |
U:=u0t+Sum(unt,n=1..infinity); |
 |
(31) |
As in chapter 7, the initial condition is used at time, t = 0, to avoid Gibb’s phenomenon:
| > |
u:=piecewise(t=0,0,t>0,subs(infinity=20,U)); |
 |
(32) |
The following plots are obtained:
| > |
plot3d(u,x=0..1,t=0..1,axes=boxed,title="Figure Exp. 8.13.",labels=[x,t,"u"],orientation=[-150,60]); |
| > |
plot([subs(t=0,u),subs(t=0.1,u),subs(t=0.2,u),subs(t=0.3,u)],x=0..1,axes=boxed,title="Figure Exp. 8.14.",thickness=5,labels=[x,"u"]); |