1D HeatTransfer problem reformulation

Posted 15 days ago
287 Views
|
3 Replies
|
6 Total Likes
|
 Hi, I would like to solve the 1D Heat Transfer problem for $T(x,t)$ on a rod of length $L$ that has a sinus temperature at one end and is isolated at the other end:(IBVP 1): $T_t - a^2 T_xx = 0$ withBC: $T(x=0,t) = T_1 sin(wt), T_x(x=L,t) = 0,$ and IC: $T(x,t=0) = T_0$This is easily solved using the NDSolveValue command (see below).As I am finally interested in an analytic solution of (IBVP 1), in a frist step I reformulated the initial boundary value problem using $T(x,t) = U(x,t) + f(t),$ with $f(t) = T_1 sin(wt)$arriving at the inhomogeneous (IBVP 2) with homogeneous BCs for $U(x,t):$(IBVP 2): $U_t - a^2 U_xx = Q$ with $Q=- df(t)/dt,$BC: $U(x=0,t) = 0, U_x(x=L,t) = 0,$ IC: $U(x,t=0) = T_0$To confirm the identity of (IBVP 1) with (IBVP 2), I implemented both with the NDSolve command (see below). Surprisingly, the solutions are clearly different. Is there an error in my arguments? Is there a problem with my implementation of the numerical solution in NDSolve?I noticed that an additional factor of 1000 to the souce term $Q$ makes both solutions more similar. This brings me to the question of why the source term (as the time derivative of $f(t)$) is so very small .......?Analytically, (IBVP 2) could be further analysed by Fourier sin transformation. If there is a known analytical solution of IBVP 1, I would be very happy for a hint to a reference. I would be very grateful for any suggestions. Thank you!Here is my implementation in Mathematica:
3 Replies
Sort By:
Posted 5 days ago
 Many thanks to both of you for the elegant solutions! It took me a while to understand and follow the calculations. In the end, the resulting series approximates the numerical solution (NDSolve) very well. Depending on the parameters (L, a), only the first 2 to 3 terms of the series are sufficient. Thank you very much for your help!
Posted 14 days ago
 If your equation is: $$\left\{T^{(0,1)}(x,t)-a^2 T^{(2,0)}(x,t)=0,T(0,t)=\text{T1} \sin (t w),T^{(1,0)}(L,t)=0,T(x,0)=\text{T0}\right\}$$ Mathematica can solve analytically by infinty series:  $Version (*"13.2.0 for Microsoft Windows (64-bit) (November 18, 2022)"*) DSolve[{D[T[x, t], t] - a^2*D[T[x, t], {x, 2}] == 0, T[0, t] == T1 Sin[w t], Derivative[1, 0][T][L, t] == 0, T[x, 0] == T0}, T[x, t], {x, t}] (*{{T[x, t] -> T1 Sin[t w] + Inactive[Sum][( 4 E^(-((a^2 \[Pi]^2 t (1 - 2 K[1])^2)/( 4 L^2))) (-T0 + ( 4 L^2 T1 w (-a^2 \[Pi]^2 (1 - 2 K[1])^2 + E^((a^2 \[Pi]^2 t (1 - 2 K[1])^2)/( 4 L^2)) (a^2 \[Pi]^2 Cos[t w] (1 - 2 K[1])^2 + 4 L^2 w Sin[t w])))/( 16 L^4 w^2 + a^4 \[Pi]^4 (1 - 2 K[1])^4)) Sin[(\[Pi] x (-1 + 2 K[1]))/( 2 L)])/(\[Pi] - 2 \[Pi] K[1]), {K[1], 1, \[Infinity]}]}}*) $T(x,t)=\text{T1} \sin (t w)+\underset{K[1]=1}{\overset{\infty }{\sum }}\frac{4 e^{-\frac{a^2 \pi ^2 t (1-2 K[1])^2}{4 L^2}} \left(-\text{T0}+\frac{4 L^2 \text{T1} w \left(-a^2 \pi ^2 (1-2 K[1])^2+e^{\frac{a^2 \pi ^2 t (1-2 K[1])^2}{4 L^2}} \left(a^2 \pi ^2 \cos (t w) (1-2 K[1])^2+4 L^2 w \sin (t w)\right)\right)}{16 L^4 w^2+a^4 \pi ^4 (1-2 K[1])^4}\right) \sin \left(\frac{\pi x (-1+2 K[1])}{2 L}\right)}{\pi -2 \pi K[1]}\$
Posted 15 days ago
 Hi Uwe, for me these specialized notations and input interfaces are too difficult to learn. If your question is concerned with their use and reliability, thats not my field.I break the question down to the transfomation of the T-function by adding the boundary function sin t: eq1 = {D[T[t, x], t] == D[T[t, x], x, x], T[0, x] == 0, Derivative[0, 1][T][t, 1] == 0, T[t, 0] == Sin[8 \[Pi] t]} eq2 = eq1 /. {T :> ({t, x} |-> (U[t, x] + Sin[8 \[Pi] t]))} // Simplify Out:={8*Pi*Cos[8*Pi*t] + Derivative[1, 0][U][t, x] == Derivative[0, 2][U][t, x], U[0, x] == 0, Derivative[0, 1][U][t, 1] == 0, U[t, 0] == 0} Integrate both equations T1[t_, x_] = T[t, x] /. NDSolve[eq1, T[t, x], {t, 0, 16}, {x, 0, 1}][[1]] T2[t_, x_] = U[t, x] /. NDSolve[eq2, U[t, x], {t, 0, 16}, {x, 0, 1}][[1]] The solutions are identical Manipulate[ Plot[{T1[t, x], T2[t, x] + Sin[8 \[Pi] t]}, {x, 0, 1}, PlotRange -> {-1, 1}, PlotStyle -> {{Red, Thickness[0.02]}, {Black, Thickness[0.01]}}], {t, 0, 16}] The second equation has series solution that does not seem to have a closed form. Its the typical fourier sum in x of solutions of the heat equation in a finite interval with the index k solution  ( D[#,t] -D[#,x,x]&) Exp[- k^2 t + I k x] == 0 {{U[t, x] -> Sum[(128 E^(-(1/4) (1 - 2 k)^2 \[Pi]^2 t) ((1 - 2 k)^2 \[Pi] - E^(1/4 (1 - 2 k)^2 \[Pi]^2 t) ((1 - 2 k)^2 \[Pi] Cos[8 \[Pi] t] + 32 Sin[8 \[Pi] t])) Sin[ 1/2 (-1 + 2 k) \[Pi] x])/(1024 (-1 + 2 k) \[Pi] + (-1 + 2 k)^5 \[Pi]^3), {k, 1, \[Infinity]}]