1 Introduction

The approximation of scalar nonlinear conservation laws

$$\begin{aligned} \rho _t + (\rho \, v(\rho ))_x = 0 \end{aligned}$$
(1)

via microscopic modeling is a longstanding challenge. A probabilistic approach to this problem has been proposed in a vast literature in the past decades, see e.g. [1,2,3] and the references therein. The kinetic approximation of nonlinear conservation laws has been carried out in [4].

In [5], the microscopic Lagrangian formulation of (1) via the follow-the-leader particle system

$$\begin{aligned} \dot{x}_i= v\left( \frac{\ell }{x_{i+1}-x_i}\right) \end{aligned}$$
(2)

has been rigorously derived for the first time under the assumption that v is monotone decreasing (plus some additional assumptions, see (V1) and (V2)). The derivation is restricted to nonnegative, bounded, and compactly supported solutions \(\rho \). Roughly speaking, the main result in [5] states what follows. Let \(\bar{\rho }\in \mathbf {L^{\infty }}({\mathbb {R}};{\mathbb {R}}_+)\) be compactly supported. Assume for simplicity that \(\bar{\rho }\) has unit mass. For a given integer \(n \in {\mathbb {N}}\) sufficiently large, let the minimal interval \([\bar{x}_{\min },\bar{x}_{\max }]\) containing \(\mathrm {supp}[\bar{\rho }]\) be split into n intervals containing the mass \(\ell _n \doteq 1/n\). Let the edges of those intervals \(\bar{x}_0 \doteq \bar{x}_{\min }< \bar{x}_1< \cdots< \bar{x}_{n-1} < \bar{x}_n \doteq \bar{x}_{\max }\) be the initial positions of a set of particles with equal mass \(\ell _n\). Let the particles \(x_0(t),\ldots ,x_{n-1}(t)\) evolve via (2) with \(\ell =\ell _n\), and let \(x_n(t)=\bar{x}_n + v(0) \, t\). Then, the discretized density

$$\begin{aligned} \rho ^n(t,x) \doteq \sum _{i=0}^{n-1}\frac{\ell _n}{x_{i+1}(t)-x_i(t)} ~ \mathbf {1}_{[x_i(t),x_{i+1}(t))} \end{aligned}$$

converges up to a subsequence a.e. in \(\mathbf {L^{1}_{loc}}({\mathbb {R}}_+\times {\mathbb {R}})\) to the unique entropy solution \(\rho \) to (1) with initial condition \(\bar{\rho }\), see Definition 1 below. Moreover, the empirical measure

$$\begin{aligned} \tilde{\rho }^n(t) \doteq \sum _{i=0}^{n-1} \ell _n \, \delta _{x_i(t)} \end{aligned}$$

converges to \(\rho \) in \(\mathbf {L^{1}_{loc}}({\mathbb {R}}_+\,;\, d_{1})\), where \(d_{1}\) is the 1-Wasserstein distance on \({\mathbb {R}}\).

This note aims at shortening the proof of the result in [5] (in particular by avoiding the Eulerian-to-Lagrangian coordinates change of variables), removing the assumption of initial compact support and complementing the results of [5] with some numerical simulations.

2 Preliminaries and result

Let us consider the Cauchy problem for a one-dimensional scalar conservation law

$$\begin{aligned} {\left\{ \begin{array}{ll} \rho _t + f(\rho )_x = 0,&{} (t,x)\in (0,+\infty )\times {\mathbb {R}},\\ \rho (0,x)=\bar{\rho }(x), &{} x\in {\mathbb {R}}, \end{array}\right. } \end{aligned}$$
(3)

where \(f(\rho ) \doteq \rho \, v(\rho )\). The initial datum \(\bar{\rho }\) and the velocity map \(v :{\mathbb {R}}_+ \rightarrow {\mathbb {R}}\) satisfy the basic assumptions

In some cases, we require the additional (optional) assumptions

For simplicity, we shall normalise the total mass and assume \(\Vert \bar{\rho }\Vert _{\mathbf {L^{1}}({\mathbb {R}})} = 1\). We introduce the notation \(v_{\max } \doteq v(0)\) and we shall assume for simplicity that \(v_{\max }>0\).

Definition 1

Let \(\bar{\rho }\) satisfy (I1). We say that \(\rho \) is a weak solution to (3) if \(\rho \in \mathbf {L^{\infty }}\left( (0,+\infty );\mathbf {L^{\infty }}\cap \mathbf {L^{1}}({\mathbb {R}})\right) \) and for all \(\phi \in \mathbf {C_c^{\infty }}((0,+\infty ) \times {\mathbb {R}})\)

$$\begin{aligned} \iint _{{\mathbb {R}}_+\times {\mathbb {R}}} \, \Bigl [\rho (t,x)\varphi _t(t,x) + f(\rho (t,x)\varphi _x(t,x)\Bigr ] \mathrm{{d}}x\mathrm{{d}}t +\int _{\mathbb {R}}\bar{\rho }(x) \phi (0,x)dx= 0. \end{aligned}$$

A weak solution \(\rho \in \mathbf {L^{\infty }}({\mathbb {R}}_+\times {\mathbb {R}})\) to the Cauchy problem (3) is called entropy solution to the Cauchy problem (3) if

$$\begin{aligned} \iint _{{\mathbb {R}}_+\times {\mathbb {R}}} \, \Bigl [|\rho (t,x)-k| \, \varphi _t(t,x) + \mathrm {sign}(\rho (t,x) - k) \bigl [ f(\rho (t,x)) - f(k)\bigr ] \varphi _x(t,x)\Bigr ] \mathrm{{d}}x\mathrm{{d}}t\ge 0 \end{aligned}$$

for all \(\varphi \in \mathbf {C_c^{\infty }}((0,+\infty ) \times {\mathbb {R}})\) with \(\varphi \ge 0\) and for all \(k\ge 0\).

We point out that the above definition is slightly weaker than the definition in [6]. The next theorem collects the uniqueness result in [6] and its variant in [7].

Theorem 1

[6, 7] Assume that (I1) and (V1) are satisfied. Then there exists a unique entropy solution according to Definition 1.

We now introduce the approximation scheme. For future use, we introduce the notation

$$\begin{aligned} R \doteq \Vert \bar{\rho }\Vert _{\mathbf {L^{\infty }}({\mathbb {R}})}. \end{aligned}$$

For a given \(n\in \mathbb {N}\) sufficiently large, we set \(\ell _n \doteq 1/n\). Let \(\bar{x}^n_1\) be defined by

$$\begin{aligned} \bar{x}^n_1 \doteq \sup \left\{ x\in {\mathbb {R}}:\int _{-\infty }^x\bar{\rho }(x) \mathrm{{d}}x<\ell _n\right\} , \end{aligned}$$

and the points \(\bar{x}^n_i\) with \(i \in \{2,\ldots ,n-1\}\) be defined recursively by

$$\begin{aligned} \bar{x}^n_i = \sup \left\{ x\in {\mathbb {R}}:\int _{\bar{x}^n_{i-1}}^x\bar{\rho }(x) \mathrm{{d}}x<\ell _n\right\} . \end{aligned}$$

It follows that \(\bar{x}^n_1< \bar{x}^n_2< \cdots < \bar{x}^n_{n-1}\). Moreover

$$\begin{aligned}&\int _{-\infty }^{\bar{x}^n_1}\bar{\rho }(x) \mathrm{{d}}x = \int _{\bar{x}^n_{i-1}}^{\bar{x}^n_{i}}\bar{\rho }(x) \mathrm{{d}}x = \int _{\bar{x}^n_{n-1}}^{+\infty }\bar{\rho }(x) \mathrm{{d}}x = \ell _n,&i \in \{2,\ldots ,n-1\}. \end{aligned}$$
(4)

We let the \((n-1)\) particles defined above evolve according to the follow-the-leader system of ODEs

$$\begin{aligned}&{\left\{ \begin{array}{ll} \dot{x}_i^n(t)=v(R^n_i(t)), &{} i \in \{1,\ldots ,n-2\}, \\ \displaystyle {\dot{x}_{n-1}^n(t)=v_{\max }}, \\ x^n_i(0) = \bar{x}^n_i, &{} i \in \{1,\ldots ,n-1\}, \end{array}\right. }&R^n_i(t) \doteq \frac{\ell _n}{x^n_{i+1}(t)-x^n_i(t)}. \end{aligned}$$
(5)

The discrete maximum principle in [5, Lemma 1] ensures that the solution \((x_i^n)_{i=1}^{n-1}\) to (5) is well defined, since the particles \((x^n_i)_{i=1}^{n-1}\) strictly preserve their initial order. More precisely, we have the following lemma.

Lemma 1

(Discrete maximum principle [5]) Assume (I1) and (V1) are satisfied. Then, for all \(t \in {\mathbb {R}}_+\), the solution to (5) satisfies

$$\begin{aligned} x^n_{i+1}(t)-x^n_i(t)\ge \frac{\ell _n}{R},\quad i \in \{1,\ldots , n-2\}. \end{aligned}$$

We have split the initial condition into n regions with equal mass \(\ell _n\). We have then defined the motion of \((n-1)\) particles. This permits to reconstruct a time-depending (piecewise constant) density within the interval \([x^n_1(t),x^n_{n-1}(t)]\), which will consist of \((n-2)\) constant values on as many intervals. Under the natural assumption that a mass \(\ell _n\) will be maintained on each interval, we still need to assign mass to two points outside the interval \([x^n_1(t),x^n_{n-1}(t)]\) in order to obtain a time-depending density with unit mass. To perform this task, we set two artificial particles \(x_0^n(t)\) and \(x_n^n(t)\) as follows

$$\begin{aligned} x^n_0(t) \doteq 2x^n_{1}(t)-x^n_2(t),\quad x^n_n(t) \doteq 2x^n_{n-1}(t)-x^n_{n-2}(t), \end{aligned}$$
(6)

and let \(R^n_0(t) \doteq R^n_1(t)\) and \(R^n_{n-1}(t) \doteq R^n_{n-2}(t)\) for all \(t\ge 0\). We then set

$$\begin{aligned} \rho ^n(t,x) \doteq \sum _{i=0}^{n-1}R^n_i(t) ~ \mathbf {1}_{[x^n_{i}(t),x_{i+1}^n(t))}(x) = \sum _{i=0}^{n-1} \frac{\ell _n}{x^n_{i+1}(t)-x^n_i(t)} ~ \mathbf {1}_{[x^n_{i}(t),x_{i+1}^n(t))}(x). \end{aligned}$$
(7)

We notice that \(\int _{\mathbb {R}}\rho ^n(t,x) \mathrm{{d}}x = n \, \ell _n =1\) and that \(\rho ^n(t,\cdot )\) is compactly supported for all n and for all t. For future use we compute

$$\begin{aligned} {\left\{ \begin{array}{ll} \dot{R}^n_i(t)=-\dfrac{R^n_i(t)^2}{\ell _n} \, \bigl [v(R^n_{i+1}(t))-v(R^n_i(t))\bigr ], &{}i \in \{1,\ldots ,n-3\},\\ \dot{R}^n_{n-2}(t)=-\dfrac{R^n_{n-2}(t)^2}{\ell _n} \, \bigl [v_{\max }-v(R^n_{n-2}(t))\bigr ]. \end{array}\right. } \end{aligned}$$
(8)

Remark 1

In case \(\mathrm {supp}[\bar{\rho }]\) is bounded either from above or from below, it is possible to improve the above construction. In the former case, the particle \(x^n_n\) can be set on \(\max \{\mathrm {supp}[\bar{\rho }]\}\) initially and let evolve with maximum speed \(v_{\max }\), and the preceding particle \(x^n_{n-1}\) let evolve according to \(\dot{x}^n_{n-1}(t)=v(\ell _n/(x^n_n(t)-x^n_{n-1}(t)))\). In the latter case, the particle \(x^n_0\) can be set on \(\min \{\mathrm {supp}[\bar{\rho }]\}\) initially and let evolve according to \(\dot{x}^n_{0}(t)=v(\ell _n/(x^n_1(t)-x^n_{0}(t)))\). In [5] both these conditions are required for the initial datum and such construction is applied.

Our result, which extends the one in [5], reads as follows.

Theorem 2

Assume that (I1) and (V1) are satisfied. Moreover, assume that at least one of the two conditions (I2) and (V2) is also satisfied. Then, \(\rho ^n\) converges (up to a subsequence) almost everywhere and in \(\mathbf {L^{1}_{loc}}\) on \({\mathbb {R}}_+\times {\mathbb {R}}\) to the unique entropy solution \(\rho \) to the Cauchy problem (3) according to Definition 1.

The result in [5] also states the convergence of the empirical measure \(\tilde{\rho }^n(t) \doteq \sum _{i=1}^{n} \ell _n \, \delta _{x_i^n(t)}\) towards the entropy solution \(\rho \). We conjecture that the result holds also in the case of not compactly supported initial datum, with the additional hypothesis of finite first moment. For the sake of brevity, we shall skip that part in this note.

Remark 2

Condition (V2) can be also motivated as follows. The ODE system (8) can be roughly rewritten as

$$\begin{aligned} \dot{R}^n_i(t)=-\dfrac{R^n_i(t)^2}{\ell _n} \, \bigl [v(R^n_{i+1}(t))-v(R^n_i(t))\bigr ] = -R^n_i(t)\, \frac{v(R^n_{i+1}(t))-v(R^n_i(t))}{x^n_{i+1}(t)-x^n_i(t)}, \end{aligned}$$

which mimics the ‘Lagrangian’ continuum equation

$$\begin{aligned} \frac{D\rho }{D t} + \rho v'(\rho ) \frac{D\rho }{D x} = 0, \end{aligned}$$
(9)

where \(\frac{D\rho }{D t}\) is a material time derivative, and x is still the Eulerian space variable. The equation (9) can be seen as a conservation law with flux having \(\rho v'(\rho )\) as first derivative. Condition (V2) requires \(\rho v'(\rho )\) to be monotone non-increasing, i.e. (9) having concave flux.

3 Proof of the main result

In this section we prove Theorem 2. Clearly, the result in Lemma 1 ensures that \(\Vert \rho ^n(t,\cdot )\Vert _{\mathbf {L^{\infty }}({\mathbb {R}})}\le R\) for all \(t\ge 0\). For notational simplicity, whenever it is clear from the context, we shall omit the n-dependence in the approximating scheme. Moreover, as our result is a slight extension of the one in [5], we shall often shorten proofs and refer to the corresponding results in [5], still trying to keep this note as much self-contained as possible.

As usual in the context of scalar conservation laws, a uniform control of the \(\mathbf {BV}\) norm is necessary in order to gain enough compactness of the approximating scheme. In our case, the compactness can be obtained in two distinct ways. The first one is a uniform \(\mathbf {BV}\) contraction property for \(\rho ^n\), and it obviously requires \(\mathbf {BV}\) initial data.

Proposition 1

Assume that (I1), (I2) and (V1) are satisfied. Then, for all \(n\in \mathbb {N}\) one has

$$\begin{aligned} \mathrm {TV}[\rho ^n(t,\cdot )]\le \mathrm {TV}[\rho ^n(0,\cdot )]\le \mathrm {TV}[\bar{\rho }]. \end{aligned}$$

Proof

The estimate \(\mathrm {TV}[\rho ^n(0,\cdot )]\le \mathrm {TV}[\bar{\rho }]\) is a simple exercise. We now compute

$$\begin{aligned} \frac{d}{dt}\mathrm {TV}[\rho ^n(t,\cdot )]&= \frac{d}{dt} \left[ R_1(t)+R_{n-2}(t)+\sum _{i=1}^{n-3}|R_i(t)-R_{i+1}(t)|\right] \\&= \dot{R}_1(t)+\dot{R}_{n-2}(t)+ \sum _{i=1}^{n-3} \mathrm {sign}\bigl (R_i(t)-R_{i+1}(t)\bigr ) \bigl [\dot{R}_i(t)-\dot{R}_{i+1}(t)\bigr ]\\&= \bigl [ 1+\mathrm {sign}\bigl (R_1(t)-R_2(t)\bigr ) \bigr ] \dot{R}_1(t) + \bigl [ 1-\mathrm {sign}\bigl (R_{n-3}(t)-R_{n-2}(t)\bigr ) \bigr ] \dot{R}_{n-2}(t)\\&\quad + \sum _{i=2}^{n-3} \, \bigl [ \mathrm {sign}\bigl (R_i(t)-R_{i+1}(t)\bigr ) - \mathrm {sign}\bigl (R_{i-1}(t)-R_i(t)\bigr ) \bigr ] \dot{R}_i(t). \end{aligned}$$

By plugging (8) into the above computation and employing the assumption (V1) one can easily prove that the above quantity is not positive. \(\square \)

The second way to achieve compactness is via the following discrete Oleinik-type inequality. Here we do not require the extra assumption (I2) on the initial condition, but we need the assumption (V2) on the velocity map.

Proposition 2

Assume that (I1), (V1) and (V2) are satisfied. Then, for all \(t\ge 0\) one has

$$\begin{aligned} \frac{\dot{x}^n_{i+1}(t)-\dot{x}^n_i(t)}{x^n_{i+1}(t)-x^n_i(t)}\le \frac{1}{t},\quad i\in \{0,\ldots ,n-1\}. \end{aligned}$$
(10)

Proof

Due to (6), it suffices to prove (10) for \(i\in \{1,\ldots ,n-2\}\). We start by observing that this is equivalent to prove

$$\begin{aligned} z_i(t) \doteq t \, R_i(t) \Bigl [\dot{x}_{i+1}(t)-\dot{x}_i(t)\Bigr ] \le \ell _n,\quad i\in \{1,\ldots ,n-2\}. \end{aligned}$$

We shall prove the above estimate inductively on i by using the Eq. (8). We drop the time dependency for simplicity.

We start by proving \(z_{n-2}= t \, R_{n-2} [ v_{\max }-v(R_{n-2})] \le \ell _n\). We have, due to (8) and (V1), that

$$\begin{aligned} \dot{z}_{n-2}&= R_{n-2} \, \bigl [v_{\max }-v(R_{n-2})\bigr ] + t \, \dot{R}_{n-2} \, \bigl [ v_{\max }-v(R_{n-2})-R_{n-2} \, v'(R_{n-2})\bigr ]\\&= R_{n-2} \, \bigl [ v_{\max }-v(R_{n-2})\bigr ] - t \, \frac{R_{n-2}^2}{\ell _n} \, \bigl [ v_{\max }-v(R_{n-2})\bigr ] \bigl [v_{\max }-v(R_{n-2})-R_{n-2} \, v'(R_{n-2})\bigr ]\\&\le R_{n-2} \, \bigl [ v_{\max }-v(R_{n-2}) \bigr ] \left[ 1-\frac{z_{n-2}}{\ell _n}\right] . \end{aligned}$$

Since \(z_{n-2}(0)=0\), a simple comparison argument shows that \(z_{n-2}(t)\le \ell _n\) for all times.

Next we prove that the inequality \(z_{i+1}(t)\le \ell _n\) being true for all \(t\ge 0\) and for some \(i\in \{1,\ldots ,n-3\}\) implies \(z_i(t) = t \, R_i(t) \, [ v(R_{i+1}(t)) - v(R_i(t)) ] \le \ell _n\) for all \(t\ge 0\). We use the positive part \((z)_+ \doteq \max \{z,0\}\) and recall that \(\mathrm {sign}_+(z_i) = \mathrm {sign}_+(v(R_{i+1})-v(R_i))= \mathrm {sign}_+(R_i-R_{i+1})\) for any \(i\in \{1,\ldots ,n-3\}\). Let us compute

$$\begin{aligned} \frac{d}{dt}(z_i)_+ =&~ R_i \, \bigl ( v(R_{i+1})-v(R_i)\bigr )_+ + t \, \dot{R}_i \, \bigl ( v(R_{i+1})-v(R_i)\bigr )_+ \\&~ + t \, R_i \, \bigl [ v'(R_{i+1}) \, \dot{R}_{i+1}- v'(R_{i}) \, \dot{R}_{i} \, \bigr ] \, \mathrm {sign}_+\bigl (v(R_{i+1})-v(R_i)\bigr )\\ =&~ R_i \bigl ( v(R_{i+1})-v(R_i)\bigr )_+ \Biggl [1-\frac{(z_i)_+}{\ell _n}\Biggr ] - v'(R_{i+1}) \, R_i \, R_{i+1} \frac{z_{i+1}}{\ell _n} \, \mathrm {sign}_+(z_i) \\ {}&+ v'(R_i) \, R_i^2 \frac{(z_i)_+}{\ell _n}. \end{aligned}$$

The inequality \(z_{i+1}\le \ell _n\) and the assumption (V2) imply

$$\begin{aligned} \frac{d}{dt}(z_i)_+ \le R_i \left[ \phantom {\frac{(z_i)_+}{\ell _n}} \, \bigl (v(R_{i+1})-v(R_i)\Bigr )_+ -v'(R_i) \, R_i\right] \left[ 1-\frac{(z_i)_+}{\ell _n}\right] . \end{aligned}$$

We observe that the first squared bracket on the right-hand-side of the above estimate is nonnegative. Therefore, a comparison argument similar to that used before shows that \(z_i(t)\le \ell _n\) for all times \(t\ge 0\). Hence, the proof is complete. \(\square \)

For \(i\in \{1,\ldots ,n-2\}\), the estimate (10) reads

$$\begin{aligned} \frac{v(R^n_{i+1}(t))-v(R^n_{i}(t))}{x^n_{i+1}(t)-x^n_i(t)}\le \frac{1}{t}, \end{aligned}$$

which recalls the one-sided Lipschitz condition in [8] and characterises entropy solutions to (1) for genuine nonlinear fluxes.

The result in Proposition 2 implies a uniform bound for \(\rho ^n\) in \(\mathbf {BV_{loc}}((0,+\infty )\times {\mathbb {R}})\). In this sense, the \(\mathbf {L^{\infty }}\rightarrow \mathbf {BV}\) smoothing effect featured by genuinely nonlinear scalar conservation laws is intrinsically encoded in the particle scheme (5). In what follows, we denote by \(\mathrm {TV}(f;\,U)\) the (local) total variation of a function f on the subset \(U\subset {\mathbb {R}}\).

Proposition 3

Assume that (I1), (V1) and (V2) are satisfied. Let \(\delta >0\) and \(a<b\). Then, the quantity

$$\begin{aligned} \sup _{t\ge \delta }\mathrm {TV}\bigl (\rho ^n(t,\cdot );\,[a,b]\bigr ) \end{aligned}$$

is uniformly bounded with respect to n.

Proof

Fix \(t \ge \delta \). We assume that \(x_0^n(t) \le a < b \le x_n^n(t)\), leaving to the reader the study of the remaining cases. We introduce then

$$\begin{aligned}&I^n_a(t) \doteq \max \bigl \{i\in \{0,\ldots ,n\}:x^n_i(t)\le a \bigr \},&I^n_b(t) \doteq \max \bigl \{i\in \{0,\ldots ,n\}:x^n_i(t)\le b \bigr \}. \end{aligned}$$

We consider

$$\begin{aligned}&\sigma ^n(t,x) \doteq v(\rho ^n(t,x)) - \dfrac{1}{t} \, X^n(t),&X^n(t,x) \doteq \sum _{i=0}^{n-1}x_i^n(t) ~ \mathbf {1}_{[x_i^n(t),x_{i+1}^n(t))}(x). \end{aligned}$$

We point out that \(\sigma ^n(t,\cdot )\) is non-increasing in \((x^n_0(t), x^n_n(t))\). Indeed, by (6)

$$\begin{aligned}&\sigma ^n(t,x^n_i(t)^-) - \sigma ^n(t,x^n_i(t)^+) = \dfrac{1}{t} [x^n_i(t) - x^n_{i-1}(t)] \ge 0,&i \in \{1,n-1\}, \end{aligned}$$

and the ODEs in (5) together with the inequality (10) show that \(\sigma ^n(t,\cdot )\) is non-increasing in \((x^n_1(t), x^n_{n-1}(t))\).

By (7) we can estimate the total variation of \(v(\rho ^n(t,\cdot ))\) on [ab] as follows

$$\begin{aligned}&\mathrm {TV}\Bigl (v(\rho ^n(t,\cdot ));\, [a,b]\Bigr ) =\left| v(R^n_{I^n_a(t)+1}) - v(R^n_{I^n_a(t)})\right| +\mathrm {TV}\Bigl (v(\rho ^n(t,\cdot ));\, [x^n_{I^n_a(t)+1},x^n_{I^n_b(t)}]\Bigr ) \\&\quad \le \Bigl [v_{\max } - v(R)\Bigr ] +\mathrm {TV}\Bigl (\sigma ^n(t,\cdot );\, [x^n_{I^n_a(t)+1},x^n_{I^n_b(t)}]\Bigr ) +\frac{1}{t} \, \mathrm {TV}\Bigl (X^n(t,\cdot );\, [x^n_{I^n_a(t)+1},x^n_{I^n_b(t)}]\Bigr ) \\&\quad = \Bigl [v_{\max } - v(R)\Bigr ] +\Bigl [\sigma ^n(t,x^n_{I^n_a(t)+1})-\sigma ^n(t,x^n_{I^n_b(t)})\Bigr ] + \frac{1}{t} \, \bigl [X^n(t,x^n_{I^n_b(t)})-X^n(t,x^n_{I^n_a(t)+1})\Bigr ] \\&\quad = \Bigl [v_{\max } - v(R)\Bigr ] +\Bigl [v(\rho ^n(t,x^n_{I^n_a(t)+1}))-v(\rho ^n(t,x^n_{I^n_b(t)}))\Bigr ] +\frac{2}{t} \, \Bigl [x^n_{I^n_b(t)} - x^n_{I^n_a(t)+1}\Bigr ] \\&\quad \le 2\left[ v_{\max } - v(R) +\frac{b-a}{\delta }\right] . \end{aligned}$$

Since v is monotone and continuous on \({\mathbb {R}}_+\), we get the assertion. \(\square \)

Propositions 1 and 3 provide the needed compactness of \(\rho ^n\) with respect to the space variable. Typically, in the context of scalar conservation laws (e.g. the wave-front tracking scheme) an \(\mathbf {L^{1}}\) uniform Lipschitz continuity estimate provides sufficient control of the time oscillations. In our case, we are only able to provide a uniform time continuity estimate with respect to the 1-Wasserstein distance, which nevertheless will suffice to achieve strong \(\mathbf {L^{1}}\) compactness (with respect to both space and time).

We first recall the following concepts on the one dimensional 1-Wasserstein distance. Let \(\mu \) be a probability measure on \({\mathbb {R}}\). We define the pseudo-inverse variable \(X_\mu \in \mathbf {L^{1}}([0,1])\) as

$$\begin{aligned} X_\mu (z) \doteq \inf \{x\in {\mathbb {R}}:\mu ((-\infty ,x])>z\}. \end{aligned}$$

Given two probability measures \(\mu \) and \(\nu \) on \({\mathbb {R}}\), we set

$$\begin{aligned} W_1(\mu ,\nu ) \doteq \Vert X_{\mu }-X_{\nu }\Vert _{\mathbf {L^{1}}([0,1])}. \end{aligned}$$

By (7) we have that

$$\begin{aligned} X_{\rho ^n(t,\cdot )}(z) = \sum _{i=0}^{n-1} \, \Bigl [x^n_i(t) + \left( z-i\,\ell \right) R^n_i(t)^{-1}\Bigr ] ~ \mathbf {1}_{[i\ell ,(i+1) \, \ell )}(z). \end{aligned}$$

Proposition 4

Assume (I1) and (V1) are satisfied. There exists a constant C independent of n, such that \(W_1(\rho ^n(t,\cdot ),\rho ^n(s,\cdot )) \le C|t-s|\) for any \(t,s>0\).

Proof

For \(0<s<t\) we compute

$$\begin{aligned} W_1(\rho ^n(t,\cdot ),\rho ^n(s,\cdot ))&= \Vert X_{\rho ^n(t,\cdot )}-X_{\rho ^n(s,\cdot )}\Vert _{\mathbf {L^{1}}([0,1])}\\&= \sum _{i=0}^{n-1}\int _{i\ell }^{(i+1) \, \ell } \, \left| x^n_i(t)-x^n_i(s)+(z-i\,\ell )\left( R^n_i(t)^{-1} - R^n_i(s)^{-1}\right) \right| \mathrm{{d}}z\\&\le \sum _{i=0}^{n-1} \ell \, |x^n_i(t)-x^n_i(s)| + \sum _{i=0}^{n-1}\left| R^n_i(t)^{-1} - R^n_i(s)^{-1}\right| \int _{i\ell }^{(i+1) \, \ell }(z-i\,\ell )\mathrm{{d}}z\\&\le \max \{v_{\max },|v(R)|\} \, |t-s| + \sum _{i=0}^{n-1}\frac{\ell ^2}{2}\int _{s}^{t}\left| \frac{d}{d\tau }\left( R^n_i(\tau )^{-1}\right) \right| \mathrm{{d}}\tau , \end{aligned}$$

and by using (8) and (6)

$$\begin{aligned} W_1(\rho ^n(t,\cdot ),\rho ^n(s,\cdot ))&\le \max \{v_{\max },|v(R)|\} \, |t-s| \\&\quad +\sum _{i=1}^{n-3} \ell \int _{s}^{t} |v(R^n_{i+1}(\tau ))-v(R^n_i(\tau ))| \mathrm{{d}}\tau +\ell \int _{s}^{t} |v_{\max } - v(R^n_{n-2}(\tau ))| \mathrm{{d}}\tau \\&\le \Bigl [\max \{v_{\max },|v(R)|\} + 2 [v_{\max } - v(R)] \Bigr ] \, |t-s|. \end{aligned}$$

\(\square \)

Theorem 3

(Generalised Aubin-Lions lemma) Let \(T>0\), \(a,b\in {\mathbb {R}}\) be fixed with \(a<b\) and v satisfy (V1). Let \(\rho ^n\) be a sequence in \(\mathbf {L^{\infty }}((0,T);\,\mathbf {L^{1}}({\mathbb {R}}))\) with \(\rho ^n(t,\cdot ) \ge 0\) and \(\Vert \rho ^n(t,\cdot )\Vert _{\mathbf {L^{1}}({\mathbb {R}})}=1\) for all \(n \in {\mathbb {N}}\) and for all \(t\in [0,T]\). Assume further that

  1. (A)

    \(\sup _{n\in {\mathbb {N}}} \left[ \int _0^T \left[ \Vert v(\rho ^n(t,\cdot ))\Vert _{\mathbf {L^{1}}([a,b])} + \mathrm {TV}(v(\rho ^n(t,\cdot ));\,[a,b])\right] \mathrm{{d}}t\right] < +\infty \),

  2. (B)

    there exists a constant \(C>0\) independent of n such that \(W_1(\rho ^n(t,\cdot ),\rho ^n(s,\cdot ))\le C|t-s|\) for all \(s,t\in (0,T)\).

Then, \(\rho ^n\) is strongly relatively compact in \(\mathbf {L^{1}}([0,T]\times [a,b])\).

The proof of Theorem 3 is presented in the Appendix.

Conclusion of the proof of Theorem 2

Propositions 1 and  3 show that \(\rho ^n\) satisfies the assumption (A) of Theorem 3 on the time interval \([\delta ,T]\) for arbitrary \(0<\delta <T\) when beside (I1) and (V1), we assume either (I2) or (V2). The result in Proposition 4 implies that \(\rho ^n\) satisfies assumption (B) of Theorem 3. Hence, by a simple diagonal argument stretching the time interval \([\delta ,T]\) to (0, T], one easily gets that \(\rho ^n\) has a subsequence (still denoted \(\rho ^n\)) converging almost everywhere in \(\mathbf {L^{1}_{loc}}((0,T)\times {\mathbb {R}})\). Let \(\rho \) be the limit of said subsequence.

  • Step 1: \(\varvec{\rho }\) is a weak solution to (3). Let \(\varphi \in \mathbf {C_c^{\infty }}({\mathbb {R}}_+\times {\mathbb {R}})\). By (7) we compute

    $$\begin{aligned}&\iint _{{\mathbb {R}}_+\times {\mathbb {R}}} \, \Bigl [ \rho ^n(t,x) \, \varphi _t(t,x) + \rho ^n(t,x) \, v(\rho ^n(t,x)) \, \varphi _x(t,x) \Bigr ] \mathrm{{d}}x \mathrm{{d}}t\\&\quad = \sum _{i=0}^{n-1}\int _{{\mathbb {R}}_+} R^n_i(t)\left[ \int _{x^n_i(t)}^{x^n_{i+1}(t)} \varphi _t(t,x) \mathrm{{d}}x +v(R^n_i(t)) \Bigl [ \varphi (t,x_{i+1}^n(t)) - \varphi (t,x_{i}^n(t))\Bigr ] \right] \mathrm{{d}}t\\&\quad = \sum _{i=0}^{n-1}\int _{{\mathbb {R}}_+} R^n_i(t) \Biggl [ \frac{d}{dt}\left( \int _{x^n_i(t)}^{x^n_{i+1}(t)}\varphi (t,x)\mathrm{{d}}x\right) +\Bigl [ \dot{x}_i^n(t) - v(R^n_i(t)) \Bigr ] \varphi (t,x^n_i(t))\\&\qquad -\Bigl [ \dot{x}^n_{i+1}(t) - v(R^n_i(t)) \Bigr ] \varphi (t,x^n_{i+1}(t)) \Biggr ] \mathrm{{d}}t\\&\quad = \sum _{i=0}^{n-1}\int _{{\mathbb {R}}_+} \, \Biggl [ -\dot{R}^n_i(t)\left( \int _{x^n_i(t)}^{x^n_{i+1}(t)} \varphi (t,x) \mathrm{{d}}x\right) + R^n_i(t) \Bigl [ \dot{x}_i^n(t)-v(R^n_i(t)) \Bigr ] \varphi (t,x^n_i(t)) \\&\qquad - \dfrac{R^n_i(t)^2}{\ell } \, \Bigl [ \dot{x}^n_{i+1}(t)-v(R^n_i(t)) \Bigr ] \Biggl [\int _{x^n_i(t)}^{x^n_{i+1}(t)} \varphi (t,x^n_{i+1}(t)) \mathrm{{d}}x\Biggr ] \Biggr ]\mathrm{{d}}t -\int _{{\mathbb {R}}} \rho ^n(0,x) \, \varphi (0,x) \mathrm{{d}}x. \end{aligned}$$

    By (4) and the definition of \(R^n_i\) we have that

    and clearly the above quantity goes to zero as \(n \rightarrow + \infty \). Now we have to consider two separate cases.

  • Case 1\(\bar{\rho }\) is compactly supported. In this case, we can use the improved construction of the particle scheme described in Remark 1 and the equations analogous to (8) and (5) as follows. Assuming that \(\mathrm {supp}[\varphi ]\subset [\delta ,T]\times {\mathbb {R}}\) for some \(0<\delta <T\), we obtain

    $$\begin{aligned}&\Biggl |\iint _{{\mathbb {R}}_+\times {\mathbb {R}}} \, \bigl [\rho ^n(t,x) \, \varphi _t(t,x) + \rho ^n(t,x) \, v(\rho ^n(t,x)) \, \varphi _x(t,x)\bigr ] \mathrm{{d}}x \mathrm{{d}}t \Biggr | \\&\quad =\Biggl | \sum _{i=0}^{n-2}\int _0^T \frac{R^n_i(t)^2}{\ell } \, \bigl [v(R^n_{i+1}(t)) - v(R^n_i(t))\bigr ] \left[ \int _{x^n_i(t)}^{x^n_{i+1}(t)} \bigl [\varphi (t,x)-\varphi (t,x^n_{i+1}(t))\bigr ] \mathrm{{d}}x\right] \mathrm{{d}}t \\&\qquad + \int _0^T \frac{R^n_{n-1}(t)^2}{\ell } \, \bigl [v_{\max }-v(R^n_{n-1}(t))\bigr ] \left[ \int _{x^n_{n-1}(t)}^{x^n_{n}(t)} \bigl [\varphi (t,x)-\varphi (t,x^n_{n}(t))\bigr ] \mathrm{{d}}x\right] \mathrm{{d}}t \Biggr | \\&\quad \le \frac{T \, \mathrm {Lip}[\varphi ] \, \ell }{2}\sup _{t\in [\delta ,T]} \left[ \sum _{i=0}^{n-2} \, \bigl |v(R^n_{i+1}(t))-v(R^n_i(t))\bigr | + \bigl |v_{\max }-v(R^n_{n-1}(t))\bigr | \right] \\&\quad \le \frac{T \, \mathrm {Lip}[\varphi ] \, \ell }{2} \left[ v_{\max } - v(R)+\sup _{t\in [\delta ,T]} \mathrm {TV}\bigl (v(\rho ^n(t,\cdot ));\,J(T)\bigr )\right] , \quad \quad \quad \quad \quad \quad \quad \quad \spadesuit \end{aligned}$$

    where \(J(T) \doteq \bigl [\min \{\mathrm {supp}[\bar{\rho }]\} + v(R) \, T , \max \{\mathrm {supp}[\bar{\rho }]\} + v_{\max } \, T \bigr ]\). Hence, by Proposition 3 the right hand side in (\(\spadesuit \)) tends to zero as \(n\rightarrow +\infty \), and, since \(\rho ^n\) tends to \(\rho \) almost everywhere up to a subsequence, we have that \(\rho \) is a weak solution to the Cauchy problem (3) for positive times.

  • Case 2\(\bar{\rho }\) is NOT compactly supported. For simplicity we shall assume that \(\mathrm {supp}[\bar{\rho }]\) is unbounded both from above and from below. The remaining cases are minor variations of this one. Assume \(\mathrm {supp}[\varphi ]\subset [\delta ,T]\times [a,b]\) for some \(0<\delta <T\) and for some \(a<b\). Let \(n\in {\mathbb {N}}\) be sufficiently large so that \(\bar{x}^n_1 < a-v_{\max } \, T\) and \(\bar{x}^n_{n-1} > b-v(R) \, T\). Such a choice is possible because \(\mathrm {supp}[\bar{\rho }]\) is unbounded both from above and from below, which implies that the sequence \(\mathrm {supp}[\rho ^n(0,\cdot )]\) is not uniformly bounded with respect to \(n\in {\mathbb {N}}\) both from above and from below. Such assumptions imply that \(x_1^n(t)<a\) and \(x^n_{n-1}(t)>b\) for all \(t\in [0,T]\). We have

    $$\begin{aligned}&\Biggl |\iint _{{\mathbb {R}}_+\times {\mathbb {R}}} \left[ \rho ^n(t,x) \, \varphi _t(t,x) + \rho ^n(t,x) \, v(\rho ^n(t,x)) \, \varphi _x(t,x)\right] \mathrm{{d}}x \mathrm{{d}}t \Biggr |\\&\quad = \Biggl |\sum _{i=1}^{n-2} \int _{{\mathbb {R}}_+} R^n_i(t)\left[ \int _{x^n_i(t)}^{x^n_{i+1}(t)} \varphi _t(t,x) \mathrm{{d}}x +v(R^n_i(t)) \Bigl [ \varphi (t,x_{i+1}^n(t)) - \varphi (t,x_{i}^n(t))\Bigr ] \right] \mathrm{{d}}t \Biggr | \end{aligned}$$

    for all \(\varphi \in \mathbf {C_c^{\infty }}({\mathbb {R}}_+\times {\mathbb {R}})\) and the assertion can be obtained as in case 1 (we omit the details).

  • Step 2: \(\varvec{\rho }\) satisfies the entropy inequality in Definition 1. Let \(\varphi \in \mathbf {C_c^{\infty }}((0,+\infty ) \times {\mathbb {R}})\) with \(\varphi \ge 0\) and \(k\ge 0\). By (7)

    $$\begin{aligned}&\iint _{{\mathbb {R}}_+\times {\mathbb {R}}} \, \biggl [|\rho (t,x)-k| \, \varphi _t(t,x) + \mathrm {sign}(\rho (t,x) - k) \Bigl [ f(\rho (t,x)) - f(k)\Bigr ] \varphi _x(t,x)\biggr ] \mathrm{{d}}x\mathrm{{d}}t \\&\quad = \int _{{\mathbb {R}}_+} \int _{-\infty }^{x_0^n(t)} \, \biggl [k \, \varphi _t(t,x) + f(k) \, \varphi _x(t,x)\biggr ] \mathrm{{d}}x\mathrm{{d}}t\\&\qquad +\int _{{\mathbb {R}}_+} \int ^{+\infty }_{x_n^n(t)} \, \biggl [k \, \varphi _t(t,x) + f(k) \, \varphi _x(t,x)\biggr ] \mathrm{{d}}x\mathrm{{d}}t \\&\qquad +\sum _{i=0}^{n-1} \int _{{\mathbb {R}}_+} \Biggl [|R^n_i(t)-k| \left( \int _{x^n_{i}(t)}^{x_{i+1}^n(t)} \varphi _t(t,x) \mathrm{{d}}x \right) \\&\qquad + \mathrm {sign}(R^n_i(t) - k) \Bigl [ f(R^n_i(t)) - f(k)\Bigr ] \Bigl [\varphi (t,x_{i+1}^n(t)) - \varphi (t,x_{i}^n(t)) \Bigr ] \Biggr ] \mathrm{{d}}t \\&\quad = k \int _{{\mathbb {R}}_+} \, \Bigl [ \bigl [ v(k) - \dot{x}_0^n(t) \bigr ] \varphi (t,x_0^n(t)) - \bigl [ v(k) - \dot{x}_n^n(t) \bigr ] \varphi (t,x_n^n(t)) \Bigr ] \mathrm{{d}}t \\&\qquad +\sum _{i=0}^{n-1} \int _{{\mathbb {R}}_+} \mathrm {sign}(R^n_i(t) - k) \Biggl [ \Bigl [R^n_i(t)-k\Bigr ] \, \dfrac{d}{dt} \left( \int _{x^n_{i}(t)}^{x_{i+1}^n(t)} \varphi (t,x) \mathrm{{d}}x \right) \\&\qquad + \Bigl [ f(R^n_i(t)) - f(k) - (R^n_i(t) - k) \, \dot{x}_{i+1}^n(t) \Bigr ] \varphi (t,x_{i+1}^n(t)) \\&\qquad - \Bigl [ f(R^n_i(t)) - f(k) - (R^n_i(t) - k) \, \dot{x}_{i}^n(t) \Bigr ] \varphi (t,x_{i}^n(t)) \Biggr ] \mathrm{{d}}t \\&\quad = k \int _{{\mathbb {R}}_+} \, \Bigl [ \bigl [ v(k) - \dot{x}_0^n(t) \bigr ] \varphi (t,x_0^n(t)) - \bigl [ v(k) - \dot{x}_n^n(t) \bigr ] \varphi (t,x_n^n(t)) \Bigr ] \mathrm{{d}}t \\&\qquad +\sum _{i=0}^{n-1} \int _{{\mathbb {R}}_+} \mathrm {sign}(R^n_i(t) - k) \Biggl [ -\dot{R}^n_i(t) \, \left( \int _{x^n_{i}(t)}^{x_{i+1}^n(t)} \varphi (t,x) \mathrm{{d}}x \right) \\&\qquad - \Bigl [ R^n_i(t) \bigl [ \dot{x}_{i+1}^n(t) - v(R^n_i(t)) \bigr ] - k \bigl [ \dot{x}_{i+1}^n(t) - v(k) \bigr ] \Bigr ] \varphi (t,x_{i+1}^n(t)) \\&\qquad + \Bigl [R^n_i(t) \bigl [ \dot{x}_{i}^n(t) - v(R^n_i(t)) \bigr ] - k \bigl [ \dot{x}_{i}^n(t) - v(k) \bigr ] \Bigr ] \varphi (t,x_{i}^n(t)) \Biggr ] \mathrm{{d}}t. \end{aligned}$$

    Now we have to consider two separate cases.

  • Case 1\(\bar{\rho }\) is compactly supported. In this case, we can use the improved construction of the particle scheme described in Remark 1 and the equations analogous to (8) and (5) as follows. Assuming that \(\mathrm {supp}[\varphi ]\subset [\delta ,T]\times {\mathbb {R}}\) for some \(0<\delta <T\), we obtain

    $$\begin{aligned}&\iint _{{\mathbb {R}}_+\times {\mathbb {R}}} \, \Biggl [|\rho (t,x)-k| \, \varphi _t(t,x) + \mathrm {sign}(\rho (t,x) - k) \Bigl [ f(\rho (t,x)) - f(k)\Bigr ] \varphi _x(t,x)\Biggr ] \mathrm{{d}}x\mathrm{{d}}t \\&\quad = k \int _{{\mathbb {R}}_+} \, \Bigl [ \bigl [ v(k) - v(R^n_0(t)) \bigr ] \varphi (t,x_0^n(t)) - \bigl [ v(k) - v_{\max } \, \bigr ] \varphi (t,x_n^n(t)) \Bigr ] \mathrm{{d}}t \\&\qquad +\sum _{i=0}^{n-2} \int _{{\mathbb {R}}_+}\! \mathrm {sign}(R^n_i(t) - k) \Biggl [ \dfrac{R^n_i(t)^2}{\ell _n} \Bigl [v(R^n_{i+1}(t))-v(R^n_i(t))\Bigr ] \\&\qquad \times \,\Biggl [ \int _{x^n_{i}(t)}^{x_{i+1}^n(t)} \bigl [ \varphi (t,x) - \varphi (t,x_{i+1}^n(t)) \bigr ]\mathrm{{d}}x \Biggr ] \\&\qquad + k \Bigl [ \bigl [ v(R_{i+1}^n(t)) - v(k) \bigr ] \varphi (t,x_{i+1}^n(t)) - \bigl [ v(R_{i}^n(t)) - v(k) \bigr ] \varphi (t,x_{i}^n(t)) \Bigr ] \Biggr ] \mathrm{{d}}t \\&\qquad +\int _{{\mathbb {R}}_+} \mathrm {sign}(R^n_{n-1}(t) - k) \Biggl [ \dfrac{R^n_{n-1}(t)^2}{\ell _n} \, \Bigl [v_{\max }-v(R^n_{n-1}(t))\Bigr ]\\ {}&\qquad \times \Biggl [ \int _{x^n_{n-1}(t)}^{x_{n}^n(t)} \, \bigl [ \varphi (t,x) - \varphi (t,x_{n}^n(t)) \bigr ] \mathrm{{d}}x \Biggr ] \\&\qquad +k \Bigl [ \bigl [v_{\max } - v(k) \bigr ] \varphi (t,x_{n}^n(t)) - \bigl [ v(R_{n-1}^n(t)) - v(k) \bigr ] \varphi (t,x_{n-1}^n(t)) \Bigr ] \Biggr ] \mathrm{{d}}t. \end{aligned}$$

    We already proved, see (\(\spadesuit \)), that

    $$\begin{aligned}&\sum _{i=0}^{n-2} \int _{{\mathbb {R}}_+} \mathrm {sign}(R^n_i(t) - k) \dfrac{R^n_i(t)^2}{\ell _n} \, \Bigl [v(R^n_{i+1}(t))-v(R^n_i(t))\Bigr ]\\ {}&\quad \times \,\Biggl [ \int _{x^n_{i}(t)}^{x_{i+1}^n(t)} \, \bigl [ \varphi (t,x) - \varphi (t,x_{i+1}^n(t)) \bigr ]\mathrm{{d}}x \Biggr ] \mathrm{{d}}t \\&\quad +\int _{{\mathbb {R}}_+} \mathrm {sign}(R^n_{n-1}(t) - k) \dfrac{R^n_{n-1}(t)^2}{\ell _n} \, \Bigl [v_{\max }-v(R^n_{n-1}(t))\Bigr ]\\ {}&\quad \times \,\Biggl [ \int _{x^n_{n-1}(t)}^{x_{n}^n(t)} \, \bigl [ \varphi (t,x) - \varphi (t,x_{n}^n(t)) \bigr ] \mathrm{{d}}x \Biggr ] \mathrm{{d}}t \end{aligned}$$

    converges to zero as \(n\rightarrow +\infty \). Hence, to conclude it suffices to observe that

    $$\begin{aligned}&k \Biggl [ \bigl [ v(k) - v(R^n_0(t)) \bigr ] \varphi (t,x_0^n(t)) - \bigl [ v(k) - v_{\max } \, \bigr ] \varphi (t,x_n^n(t)) \\&\qquad +\sum _{i=0}^{n-2} \mathrm {sign}(R^n_i(t) - k) \, \Bigl [ \bigl [ v(R_{i+1}^n(t)) - v(k) \bigr ] \varphi (t,x_{i+1}^n(t)) \\ {}&\qquad - \bigl [ v(R_{i}^n(t)) - v(k) \bigr ] \varphi (t,x_{i}^n(t)) \Bigr ] \\&\qquad +\mathrm {sign}(R^n_{n-1}(t) - k) \Bigl [ \bigl [v_{\max } - v(k) \bigr ] \varphi (t,x_{n}^n(t)) - \bigl [ v(R_{n-1}^n(t)) - v(k) \bigr ] \varphi (t,x_{n-1}^n(t)) \Bigr ] \Biggr ] \\&\quad = k \Biggl [ \sum _{i=1}^{n-1} \bigl [ \mathrm {sign}(R^n_{i-1}(t) - k) - \mathrm {sign}(R^n_i(t) - k) \bigr ] \bigl [ v(R_{i}^n(t)) - v(k) \bigr ] \varphi (t,x_{i}^n(t)) \\&\qquad + \bigl [ 1 +\mathrm {sign}(R^n_0(t) - k) \bigr ] \bigl [ v(k) - v(R^n_0(t)) \bigr ] \varphi (t,x_{0}^n(t)) \\&\qquad +\bigl [1+\mathrm {sign}(R^n_{n-1}(t) - k)\bigr ] \bigl [v_{\max } - v(k) \bigr ] \varphi (t,x_{n}^n(t)) \Biggr ] \ge 0. \end{aligned}$$
  • Case 2\(\bar{\rho }\) is NOT compactly supported. For simplicity we shall assume that \(\mathrm {supp}[\bar{\rho }]\) is unbounded both from above and from below. The remaining cases are minor variations of this one. Then, with the same notations and assumptions used in case 2 of step1, we have

    $$\begin{aligned}&\iint _{{\mathbb {R}}_+\times {\mathbb {R}}} \, \biggl [|\rho (t,x)-k| \, \varphi _t(t,x) + \mathrm {sign}(\rho (t,x) - k) \Bigl [ f(\rho (t,x)) - f(k)\Bigr ] \varphi _x(t,x)\Biggr ] \mathrm{{d}}x\mathrm{{d}}t \\&\quad = \sum _{i=1}^{n-2} \int _{{\mathbb {R}}_+} \Biggl [|R^n_i(t)-k| \left( \int _{x^n_{i}(t)}^{x_{i+1}^n(t)} \varphi _t(t,x) \mathrm{{d}}x \right) \\&\qquad + \mathrm {sign}(R^n_i(t) - k) \Bigl [ f(R^n_i(t)) - f(k)\Bigr ] \Bigl [\varphi (t,x_{i+1}^n(t)) - \varphi (t,x_{i}^n(t)) \Bigr ] \Biggr ] \mathrm{{d}}t \end{aligned}$$

    for all \(\varphi \in \mathbf {C_c^{\infty }}((0,+\infty ) \times {\mathbb {R}})\) and the assertion can be obtained as in the above case 1 (we omit the details).\(\square \)

4 Numerical simulations

This section is devoted to present numerical simulations for the particle method described above. We compare the numerical simulations with the exact solutions obtained by the method of characteristics.

Fig. 1
figure 1

The evolution of \(\rho ^n\) with initial datum (11). The cirles in the bottom (in blue in the pdf version of the paper) denote particle location, while the stars in the top (in red in the pdf version of the paper) denote the computed density

The particle system (5) is solved using the Runge-Kutta MATLAB solver ODE23, with the initial mesh size determined by the total number of particles N and the initial density values. In Fig. 1 we take \(N=200\) particles and the initial datum

$$\begin{aligned} \bar{\rho }(x)={\left\{ \begin{array}{ll} 0.4 &{}\text {if } -1\le x\le 0, \\ 0.8 &{}\text {if } 0< x\le 1, \\ 0 &{} \text {otherwise}, \end{array}\right. } \end{aligned}$$
(11)

and final time \(t=0.5\). In Fig. 2 we compare the simulation with \(N=400\) particles with exact solutions at final time \(t=0.5\).

Fig. 2
figure 2

Comparison between the exact solution (continuous blue line in the pdf version of the paper) and \(\rho ^n(t,x)\) (plus in red in the pdf version of the paper) for \(N=400\) particles and initial datum (11)

For several values of N, we do a quantitative evaluation through the discrete \(\mathbf {L^{1}}\)-error, computed as the difference between approximated and exact solutions. The results are collected in Table 1.

Table 1 Discrete \(\mathbf {L^{1}}\)-errors corresponding to different numbers of particles N