Solution of the Heat Equation for tranient conduction by LaPlace Tranform Thi notebook ha been written in Mathematica by Mark J. McCready Profeor and Chair of Chemical Engineering Univerity of Notre Dame Notre Dame IN 46556 USA Mark.J.McCready.@nd.edu http://www.nd.edu/~mjm/ It i copyrighted to the extent allowed by whatever law pertain to the World Wide Web and the Internet. I would hope that a a profeional courtey, that if you ue it, that thi notice remain viible to other uer. There i no charge for copying and diemination Verion: 3/7/98
2 heat.laplace.nb Thi notebook how how to olve tranient heat conduction in a emi-infinite lab. It i intended a a upplement to L. G. Leal (992) Laminar flow and Convective Tranport Procee, Butterworth pp 39-44. Leal mention the poible ue of linear tranform technique but doe not give example. Many tudent are not familiar with thee. Thi notebook i intended to illutrate the ue of the LaPlace tranform to olve a imple PDE, and to how how it i implemented in Mathematica. Thi problem i the heat tranfer analog to the "Rayleigh" problem that tart on page 9. Problem formulation Conider a emi-infinite lab where the ditance variable, y, goe from 0 to. The temperature i initially uniform within the lab and we can conider it to be 0. At t=0, the temperature at y=0 i uddenly increaed to. We would like to calculate the temperature a a function of time, t, within the lab. Thi problem i commonly olved by a imilarity variable technique that arie becaue the abence of a phyical length cale. In thi notebook we ue the Laplace Tranform, which i an integral tranform that effectively convert (linear) PDE, (if we wih to ue it on ay time), to a et of ODE in frequency pace. I ay a "et" of problem becaue the tranform create an explict parameter,, which i effectively a frequency and the equation need to be olved for all poitive. Equation heateq t Θ t, y y,2 Θ t, y Θ,0 t, y Θ 0,2 t, y boundary condition the boundary condition are Θ(t,y)=0 t < 0, Θ(t,y)=0 a y-->, Θ(t, y=0) = for t > 0. initialization of Mathematica, load a package Need "Calculu`LaplaceTranform` "
heat.laplace.nb 3 Here i the analyi If we ue a tranform technique, we intend to implify the problem by tranforming the pde to an ode (or an algebraic equation from an ode). Once the tranform i done, we will need to evaluate the integral that arie a the boundarie. So the boundary condition and the domain of the problem mut be in a form conducive to thi. The Laplace tranform i defined from 0 to. In thi problem both of the domain are from 0 to, however firt try to do the tranform in time. In Mathematica thi command i LaplaceTranform[heateq,t,] and the new parameter i. LaplaceTranform heateq, t, LaplaceTranform Θ t, y, t, LaplaceTranform Θ 0,2 t, y, t, Θ 0, y The firt two term make an ode in the tranformed Θ(t,y). Let' call thi Θ. The lat term, which aroe from integration by part of the Θ(t,y)/ t term, mut be evaluated from the boundary condition. The temperature for all y at t=0 i zero, thu thi term i 0. Note that the t--> boundary term i uually zero (we don't ee it in thi calculation) becaue it i multiplied by Exp[- t] (and thu Mathematica automatically make it 0). Thu we have an ode in Θ (y), and have generated an explicit parameter,. The LaplaceTranform[t,] doe not affect any y derivative. We can write eq Θ y y,2 Θ y Θ y Θ y Thi i eaily olved by doing an DSolve eq 0, Θ y, y y Θ y c y c 2 Now get the olution out of the {{ }}'. oln Θ y. an y c y c 2 We ee that we cannot tand an exponentially increaing part o that c 2 =0. Now, we need to evaluate Θ (y,) at y= 0 or at ome place that we know it. Well, we know Θ[t,y] @ y=0 (=). Thu, we can tranform thi to get a value for Θ[y=0,]. bc0 LaplaceTranform, t, Now find the value of C[] after etting C[2] = 0 and evaluating the expreion at y=0.
4 heat.laplace.nb bc0 oln. y 0, C 2 0 c Thu our olution in tranformed pace i expreion oln. C,C 2 0 General::pell : Poible pelling error: new ymbol name "expreion" i imilar to exiting ymbol "Expreion". y Plot olution in frequency pace to ee what doe What doe thi look like?? p Plot expreion.,, y, 0, 3 p2 Plot expreion., 0, y, 0, 3 p3 Plot expreion.,., y, 0, 3 Show p, p2, p3 0 8 6 4 2 0.5.5 2 2.5 3 The top plot i for = 0. It i a difficult to tell for ure, but the different value of repreent different mode. The term i roughly a frequency o that higher ' decay fater!! Examine the iue of time to "frequency" We can ee more of what mean by tranforming t n
heat.laplace.nb 5 LaplaceTranform t n,t, n n LaplaceTranform t, t, 2 LaplaceTranform t, t, Π 2 3 2 LaplaceTranform, t, So we ee the invere relation of t and -- which that i a little jutification for calling the "frequency". Plot olution in frequency pace to ee what doe Now if we make plot for different value of we get: p4 Plot expreion..,, y, 0, 3 p5 Plot expreion. 0,, y, 0, 3 p6 Plot expreion.,, y, 0, 3 Show p4, p5, p6 0.8 0.6 0.4 0.2 0.5.5 2 2.5 3
6 heat.laplace.nb The top curve i for = 0. It i een that the value of give the rate of "diffuion" which we alo expect once the olution i tranformed back. Tranform back to time Now we mut tranform back to get the olution in phyical pace. There are 3 way. One i to get a table of tranform and invere tranform. A good table i in Spiegel' math handbook (M. R. Spiegel, Mathematical Handbook, Schaum' Ouline Serie, McGraw-Hill, 968). The econd way i to ue Mathematica or Maple, the problem would be, do you believe the anwer. The third way i to do the complex integration yourelf, the problem i, would you believe the anwer?? Anyway Mathematica agree with the table expreion y an InvereLaplaceTranform expreion,, t erfc y 2 t Plot the olution in phyical pace p7 Plot an. 0, t.2, y, 0, 5 p8 Plot an. 0, t.02, y, 0, 5 p9 Plot an. 0, t 2, y, 0, 5 Show p7, p8, p9, AxeLabel y, temp temp 0.8 0.6 0.4 0.2 2 3 4 5 y Note that the bottom curve i for t =.02
heat.laplace.nb 7 p0 Plot an.., t.2, y, 0, 5 p Plot an.., t 2, y, 0, 5 p2 Plot an.., t.02, y, 0, 5 Show p0, p, p2, PlotRange All, AxeLabel y, temp temp 0.8 0.6 0.4 0.2 2 3 4 5 y Again the bottom curve i for t = 0.02. By comparing the two plot for different, we can ee that the value of the diffuivity control how fat heat tranfer occur. Why did we tranform the time variable intead of the pace variable? Now uppoe that we had initially tranformed the y variable LaplaceTranform t Θ t, y y,2 Θ t, y, y, LaplaceTranform Θ,0 t, y, y, LaplaceTranform Θ t, y, y, 2 Θ t,0 Θ 0, t, 0 Now we need to evaluate the boundary term. The firt one Θ[t,0] = for all t of interet. However, the econd one preent a bit of a problem. We don't really know the heat flux at the boundary o we don't know the derivative. Conequently, tranforming y to doe not help olve the problem!!