Consider the following equation:
$\frac{\partial T}{\partial t} = \kappa \frac{\partial^2 T}{\partial x^2} -u \frac{\partial T}{\partial x} -T \frac{\partial u}{\partial x}$
where $T$ is the temperature, $u$ is velocity and $\kappa$ is constant. Converting this by finite difference method, for example Crank-Nicolson we get:
$(-\frac{u \Delta t}{4 \Delta x}-\frac{\kappa \Delta t}{\Delta x^2})T^{j+1}_{i-1} +(1+2\frac{\kappa \Delta t}{\Delta x^2}) T^{j+1}_{i} +(\frac{u \Delta t}{4 \Delta x}-\frac{\kappa \Delta t}{\Delta x^2})T^{j+1}_{i+1} +T \frac{\Delta t}{4 \Delta x} u^{j+1}_{i+1} + T \frac{\Delta t}{4\Delta x} u^{j+1}_{i-1} = (\frac{u \Delta t}{4 \Delta x}+\frac{\kappa \Delta t}{\Delta x^2})T^{j}_{i-1} +(1-2\frac{\kappa \Delta t}{\Delta x^2}) T^{j}_{i} + (-\frac{u \Delta t}{4 \Delta x}+\frac{\kappa \Delta t}{\Delta x^2})T^{j}_{i+1} + T \frac{\Delta t}{4 \Delta x} u^{j}_{i+1} + T \frac{\Delta t}{4\Delta x} u^{j}_{i-1}$
with $i$ representing space and $j$ representing time. I am trying to determine how to numerically solve for both $T$ and $u$. I initially tried to do tridiagonal matrices and concatenate the matrices together but with no success. Has anyone come across this problem?
In general, it will not be possible to solve for both $u$ and $T$ since you just have one PDE at hand. If you are given the velocity field $u$, you can solve for $T$ or vice-versa. But otherwise, your system is not closed.