I'm trying to solve the following pde. It's the 1d heat equation for a rod with changing Area with Neumann Boundary conditions.
$$\frac{\partial T}{\partial t} = \frac{\partial^2 T}{\partial x^2}+\frac{A'(x)}{A(x)}\frac{\partial T}{\partial x} $$
$T(x,0) = 0$ ; $\frac{\partial T(0,t)}{\partial x}=R$ ; $\frac{\partial T(L,t)}{\partial x}=Q$
So far I've been using matlab and pdepe to solve it. However, I need to solve it thousands of times and computational speed is getting in the way of this. I was hopping to find a faster way. I know that a closed-form solution is impossible to find. I'm still unsure if it's possible to solve it using a series expansion. If $A$ is represented as a Fourier series on a finite domain. I didn't get very far with this.
I had an idea of using separation of variables, to solve the time-dependent terms analytically and to use a numerical solution for my x terms. However, I'm not sure if this is possible as separation of variables would require one of the functions to be periodic.
Any advice on how to proceed would be much appreciated. Maths was never my strong suit, but this problem has really captivated me.
use separation of variables $T(x,t)=f(x)g(t)$ and series solution for $f(x)$.
Homogenize the boundary condition at $x=0$ first by :
$T(x,t)=u(x,t)-R$
And solve for $u(x,t)$.