# TVD Lax-Wendroff with non-constant velocity

I am dealing with a linear advection equation with a non-constant velocity, where I would like to apply a TVD Lax-Wendroff scheme in 1D.

The equation is the following:

$$$$\frac{\partial \: C(x, t)}{\partial t} = - \frac{\partial\:(\vec{v(x,t)} \:C(x, t))}{\partial x}$$$$

Which describes the advection of a concentration by a fluid, with $$C$$, the concentration, and $$\vec{v}$$, the fluid velocity.

I understand how TVD Lax-Wendroff works in 1D for a linear advection equation, where I can write the flux like a combinaison of the upwind and Lax-Wendroff fluxes for a constant velocity (see (1) or (2) p177, for example).

However, I am currently stuck on how to apply this method with a non-constant velocity.

Using a flux conservative form, in 1D, I can write, with $$v_x C = F$$:

$$$$\frac{C^{n+1}_i - C^{n}_i}{\Delta t} = - \frac{1}{\Delta x}(F^{n}_{i+1/2} - F^{n}_{i-1/2})$$$$

for a constant and positive v, the flux can be expressed as:

$$$$F^n_{i+1/2} = v u_i + \frac{\phi(r_{i+1/2})}{2} (v - \frac{v^2\Delta t}{\Delta x}) (u_{i+1} - u_{i})$$$$

with $$\phi$$ beeing the flux limiter function.

The first term is the upwind flux, and the second term is the anti-diffusive Lax-Wendroff flux.

My idea is to use staggered velocities.

I can easily replace $$v u_i$$ by $$v_{i+1/2} u_i$$ but I don't know how to discretize the velocity in the anti-diffusive term, as I don't quite understand how it was derived.

I would write something like that for the right flux:

$$$$F^n_{i+1/2} = v_{i+1/2} u_i + \frac{\phi(r_{i+1/2})}{2} (v_{i+1/2} - \frac{v_{i+1/2}^2\Delta t}{\Delta x}) (u_{i+1} - u_{i})$$$$

Does it make sense for you?

It doesn't seem to work, as it creates lots of diffusion when I am trying to implement it.

• There is no consistent and TVD discretization of the equation you are solving, since the exact solution is not TVD (in general). Jul 7 at 2:58
• But you can still use similar ideas to derive good schemes. Some are given in Leveque's finite volumes book, probably in chapter 9. Jul 7 at 3:00
• I see. This is what I feared. Thx for your reply, I will have a look on that chapter then. Jul 7 at 10:06