# Heat transfer in a cylinder. Inhomogeneous PDE

I have a problem of heat distribution in a solid cylinder with the heater in the middle, which I take as $\exp(-r^2)$.

$$\frac{\partial u(t,r)}{\partial t}=a^2\frac{\partial^2 u(t,r)}{\partial r^2}+\frac{\partial u(t,r)}{r\partial r}+\exp(-r^2)$$

The initial and boundary conditions are the following.

1. $u(0,r)=T_s=\text{const}$,

2. $u(t,R)=T_e=\text{const}$,

3. $0{\le}r{\le}R$,

4. $a=\text{const}$.

I tried using Fourier series, but only the complex one seems to give the solution, but that gives complex values for temperature that is not what I expect.

Can anybody help me solve this? Thanks.

-
Can you include some of your working? –  Chris Taylor Nov 21 '11 at 8:04
There should be parentheses around the $\partial^2 u$ and $\partial u$ terms on the right. Apart from that I don't understand your modeling of the heater. When the heater is a cylinder of radius $H<R$ then it causes a boundary condition $u(t, H)=T_H$. –  Christian Blatter Nov 21 '11 at 11:42
What is your output? So you want this problem in matlab? –  user82658 Jun 16 '13 at 4:23

First, subtracting $T_e$ gives for $v=u-T_e$ a problem with homogeneous initial and boundary conditions. The eigenfunctions for the Laplace operator in polar coordinates are the Bessel functions of the first kind $J_0\left( \frac{\mu_n}R r \right)$, where $\mu_n$ is the $n$-th positive root of $J_0$. They are orthogonal on $[0,R]$ with the weight function $r$. Denote $$j_n(r)=\frac{J_0 \left( \frac{\mu_{n}}R x \right) }{\sqrt{\frac12} RJ_{1}(\mu_n)}$$ the normalized eigenfunctions, $\int_0^Rrj_m(r)j_n(r)\,dr=\delta_{mn}$.
The corresponding Green function for the heat equation in the polar coordinates is $$G(r,r',t)=\sum_{n=1}^\infty e^{-a^2\frac{\mu_{n}^2}{R^2}t}j_n(r)j_n(r').$$ Solution $v$ can be written out as a volume potential: $$v(r,t)=\int_0^t\int_0^RG(r,r',t-\tau)r'e^{-r'^2}\,dr'd\tau.$$ Expanding $e^{-r^2}$ into the Fourier-Bessel series $$e^{-r^2}=\sum_{n=1}^\infty c_nj_n(r),\quad r\in[0,R],$$ where $$c_n=\int_0^Rrj_n(r)e^{-r^2}\,dr,$$ we have $$v(r,t)= \int_0^t\int_0^Rr'\sum_{n=1}^\infty e^{-a^2\frac{\mu_{n}^2}{R^2}(t-\tau)}j_n(r)j_n(r')e^{-r'^2}\,dr'd\tau=$$ $$\sum_{n=1}^\infty j_n(r)\left(\int_0^t e^{-a^2\frac{\mu_{n}^2}{R^2}(t-\tau)}d\tau\right) \left(\int_0^Rr'j_n(r')e^{-r'^2}\,dr'\right)=$$ $$\frac {R^2}{a^2}\sum_{n=1}^\infty c_n\frac{1-e^{-a^2\frac{\mu_{n}^2}{R^2}t}}{\mu_n^2}j_n(r).$$