Conservative second order interpolation from Lagrangian grid to Eulerian grid

62 Views Asked by At

I was solving an advection equation of the following form; $$\partial_{t}f+\partial_{x}(v(x)f)=0$$ with a Lagrangian where grid is advected instead of the distribution function $f$ with velocity $v(x)$ in the following way; $$\frac{dx}{dt}=v(x).$$ Now I need to interpolate the distribution function from the Lagrangian advected grid to the initial grid such that the total area under the curve ($\mathcal{N}$) stays conserved, $$\int_{x_{min}}^{x_{max}}f\,dx=\mathcal{N}$$ I tried with naive Piece-wise Linear approach with boundary being set to 0 and found that the integration does not stay conserved. The boundary setting to 0 prescription is arbitrary as I do not have a distribution function value beyond boundary and in Lagrangian scheme boundary condition is not required. Any help regarding a numerical interpolation routine which can make the integration conserved would be highly appreciated.

1

There are 1 best solutions below

3
On

You have to be careful here. A conservation law (as the one you consider) states that the temporal change of the quantity $f$

$$ \frac{d}{dt} \int_{x_\min}^{x_\max} f(t, x) dx $$

is determined according to the fluxes at the boundary:

$$ \frac{d}{dt} \int_{x_\min}^{x_\max} f(t, x) dx + v(x_\max) f(t, x_\max) - v(x_\min) f(t, x_\min)= 0.$$ In other words, the substance is not disappearing or being generated within your domain for some other reason.

However, for general $v(x), f(t, x_\max), f(t, x_\min)$ you cannot expect that

$$ \frac{d}{dt} \int_{x_\min}^{x_\max} f(t, x) dx = 0.$$ (This is in fact what you are asking, just differentiated with respect to time).

This is intuitively clear if you consider e.g. a pipe-flow when there is a higher outflow velocity than inflow velocity: The amount of substance cannot stay the same over time.

To test your implementation, you might want to consider periodic conditions: $v(x_\min) = v(x_\max), f(t, x_\min) = f(t, x_\max)$. In that case, you should have that the integral of $f$ is indeed constant.