Use of Laplace Transform to Solve
Heat Conduction Problems
Author's Data: Housam BINOUS
Department of Chemical Engineering
National Institute of Applied Sciences and Technology
Tunis, TUNISIA
Email: binoushousam@yahoo.com

Reference :
M. N. Özisik, Heat Conduction, Wiley, New York, 1980.

Off[General::"spell1"]

Numerical Solution using NDSolve

α = 0.2;

sol = 
      NDSolve[{D[T[x, t], {x, 2}] ==  
            1/α D[
                T[x, t], {t, 1}], 
(D[ T[x, t], {x, 1}] /. 
                x ->  0) ==  0, T[1, t] ==  1, 
          T[x, 0] ==  Exp[-10000 (1 - x)]}, {T[x, t]}, {t, 0, 
          1}, {x, 0, 1}]

t = 0.02;

plt1 = 
      Plot[T[x, t] /. sol, {x, 0, 1}, PlotStyle -> RGBColor[1, 0, 0], 
        PlotRange ->  All]

Analytical Solution derived in the above reference
for short times

t =.

fanal = (∑_(n = 0)^20)(-1)^
                n Erfc[((1 +  2  n) - 
                      x)/(Sqrt[4 α t])] + (∑_(n = 0)^20)(-1)^
                n Erfc[((1 +  2  n) + 
                      x)/(Sqrt[4 α t])];

t = 0.02;

plt2 = 
      Plot[fanal, {x, 0, 1}, PlotStyle -> RGBColor[0, 0, 1], 
        PlotRange ->  All]

Numerical Solution using Numerical Inversion of Laplace Tranform

F[s_] := 
      Cosh[x (Sqrt[s/α])]/(s Cosh[(Sqrt[s/α])])

x = Table[i, {i, 0, 1, 0.01}];

Er = 10^-8;

σ0 = 0.001;

T = 1;

σ = σ0 - Log[Er]/(2 T)

t = 0.02;

finv = 
      Exp[σ t]/
          T (1/2 F[σ] + (∑_(k = 1)^2000)(Re[
                      F[σ + k Pi I/T]] Cos[k Pi t/T] - 
                  Im[F[σ + k Pi I/T]] Sin[
                      k Pi t/T]))

tbl = Table[Transpose[{x, %}]];

plt3 = 
      ListPlot[tbl, 
        PlotStyle -> {PointSize[0.025], RGBColor[0, 1, 0]}]

Show[plt3, plt2, plt1, PlotRange -> All]