Finite Difference Approach for the 1D Conservative Advection Equation with Spacially Varying Velocity

116 Views Asked by At

I am attempting to numerically solve the following conservative advection equation in 1D, using a finite difference method.

$\frac{\partial}{\partial t}u(x,t) + \frac{\partial}{\partial x}\left(v(x,t)u(x,t)\right) = 0 \hspace{1cm}$ (1)

where $u(x,t)$ is the quantity I am interested in and $v(x,t)$ is the velocity with which it is advected. I have another equation governing the evolution of $v$, so it can be assumed that at each time-step I know the value of $v$ on the whole domain, and can use this information to calculate $u$ at the next time-step. I have looked into a number of schemes but none of them seem suitable. A lot of the books and articles I have looked at deal with equations of the form:

$\frac{\partial }{\partial t}u(x,t) + \frac{\partial}{\partial x}f\left(u(x,t)\right) = 0$

but they all seem to assume that the function $f$ can be differentiated to rewrite the equation as:

$\frac{\partial }{\partial t}u(x,t) + f'(u)\frac{\partial }{\partial x}u(x,t) = 0$

However, in the case of equation (1), it does not seem clear how to do this. Writing $f(u) = vu$, one could naively suppose that $f'(u)=v(x,t)$ but implicit differentiation in (1) gives:

$\frac{\partial}{\partial t}u(x,t) + v(x,t)\frac{\partial}{\partial x}u(x,t) + u(x,t)\frac{\partial}{\partial x}v(x,t) = 0$

in which a stray $u(x,t)\frac{\partial}{\partial x}v(x,t)$ term appears. I have considered rewriting equation (1) as:

$\frac{\partial}{\partial t}u(x,t) + v(x,t)\frac{\partial}{\partial x}u(x,t) = -u(x,t)\frac{\partial}{\partial x}v(x,t)$

and considering the right hand side as a source term, but I'm not entirely sure where to go with this. My method needs to be conservative and stable. Any suggestions would be greatly appreciated!