Group Abstract Group Abstract

Message Boards Message Boards

1D HeatTransfer problem reformulation

POSTED BY: Uwe Schlink
3 Replies

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 BY: Uwe Schlink

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 BY: Mariusz Iwaniuk

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]}]
POSTED BY: Roland Franzius
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard