# Get the analytic solution of transient heat equation in Mathematica?

Posted 1 month ago
281 Views
|
2 Replies
|
3 Total Likes
|
 This is my problem: This is the transient heat transfer problem in 1D.and this is my code: I can't get the analytic solution. Anyone could help me? Thank you very much!
2 Replies
Sort By:
Posted 1 month ago
 Workaround:First we solve PDE only with first two ic's. $Version (*12.1.0 for Microsoft Windows (64-bit) (March 14, 2020)*) Heat = D[T[y, t], t] - α*D[T[y, t], {y, 2}] == 0; ic = {T[y, 0] == 0, T[0, t] == 1}; sol = DSolve[{Heat, ic}, T[y, t], {y, t}, Assumptions -> {α > 0, t > 0, y > 0}] (*{{T[y, t] -> ( y Inactive[Integrate][ E^(-(y^2/(4 t α - 4 α K[2])))/(t - K[2])^( 3/2), {K[2], 0, t}, Assumptions -> True])/( 2 Sqrt[π] Sqrt[α])}}*) sol // Activate (* Mathematica Can't find Integral ? *) (*{{T[y, t] -> ( y Inactive[Integrate][ E^(-(y^2/(4 t α - 4 α K[2])))/(t - K[2])^( 3/2), {K[2], 0, t}, Assumptions -> True])/( 2 Sqrt[π] Sqrt[α])}}*) Workaround to solve integral:  FullSimplify[ InverseMellinTransform[ Integrate[ MellinTransform[( y E^(-((A*y^2)/(4 t α - 4 α K[2])))/(t - K[2])^( 3/2))/(2 Sqrt[π] Sqrt[α]), A, s], {K[2], 0, t}, Assumptions -> {t > 0, α > 0, y > 0}], s, A] /. A -> 1, Assumptions -> {t > 0, y > 0, α > 0}] // Expand (*Erfc[y/(2 Sqrt[t α])]*) We check if this solution fulfills Boundary Condition$T(\infty ,t)=0$ Limit[Erfc[y/(2 Sqrt[t α])], y -> Infinity, Assumptions -> {α > 0, y > 0, t > 0}] (* 0 *) (*Check OK*) We check if this solution fulfills Initial Condition$T(0 ,t)=1$Limit[Erfc[y/(2 Sqrt[t α])], y -> 0, Assumptions -> {t > 0, α > 0}] (*1 *) We check if this solution fulfills Initial Condition$T(y ,0)=0\$  Limit[Erfc[y/(2 Sqrt[t α])], t -> 0, Assumptions -> {y > 0, α > 0}, Direction -> -1] (* 0 *) Check if solution is true:  Heat /. {T -> Function[{y, t}, Erfc[y/(2 Sqrt[t α])]]} (*True*) Then solution is: $$T(y,t)=\text{erfc}\left(\frac{y}{2 \sqrt{t \alpha }}\right)$$