Traffic flow modelling - How to identify fans/shocks? 
A highway contains a uniform distribution of cars moving at maximum flux in the $x$-direction, which is unbounded
  in $x$. Measurements show that the car velocity $v$ obeys the relation: $v = 1 − ρ$, where ρ is the number
  of cars per unit length. An on-ramp is built into the highway in the region $0 ≤ x < 1$. Town planners want to
  understand whether they should limit the rate per unit length of cars, $α$, entering the highway via this on-ramp,
  to avoid traffic jams on the highway. The on-ramp is closed for all time $t < 0$, and opens for $t ≥ 0$.
Identify the presence of all key features of the problem, including any fans/shocks.

Hi, can someone please explain to me how to do such a question? I'm struggling to understand this conceptually, the process of identifying fans and shocks, what exactly I'm supposed to be looking for. Any help would be appreciated, thanks in advance.
 A: The macroscopic traffic-flow model by Lighthill-Witham-Richards (LWR) is an hydrodynamic model for traffic flow on a single infinite road. It consists in a scalar hyperbolic conservation law, which represents the conservation of cars (continuity equation):
$$
\frac{\partial}{\partial t}\rho + \frac{\partial}{\partial x}Q (\rho) = 0 \, ,
$$
where the flux $Q(\rho) = \rho\, v(\rho)$ depends only on the density of cars $\rho$. The simplest expression for the car velocity $v(\rho)$, introduced by Greenshields, reads
$$
v(\rho) = v_\max \left(1 - \frac{\rho}{\rho_\max}\right) .
$$
Therefore, the present case corresponds to $v_\max = 1$ m/s and $\rho_\max=1$ car/m. The flux function $Q (\rho) = \rho \left(1- \rho\right)$ is maximum at $\rho = 1/2$ car/m, which is assumed to be the uniform density of cars at negative times. The characteristic curves such that $\rho(x,t)=\rho(x(t),t)$ satisfy
$$
\frac{d\rho}{dt} = \frac{\partial\rho}{\partial t} + \underbrace{\frac{dx}{dt}}_{Q'(\rho)} \frac{\partial\rho}{\partial x} = \alpha \boldsymbol{1}_{0\leq x(t) < 1,\, t\geq 0} \, ,
$$
where $\alpha$ is the rate per unit length of cars entering the highway via an on-ramp. Several cases are considered:


*

*For times $t<0$, $\rho=1/2$ and $dx/dt = 1 - 2\rho = 0$. The space-time diagram is made of vertical lines, on which the car density is constant.

*When the ramp is turned on, i.e. $t\geq 0$, one has $d\rho/dt = \alpha$, i.e. $\rho = \alpha t + 1/2$ over the ramp. The characteristics satisfy $dx/dt = 1 - 2 \rho = -2\alpha t$. Therefore, over the on-ramp, the space-time diagram is made of non-crossing decreasing functions, on which the car density is not constant. Qualitatively, these curves will interact with the vertical lines in the following way:


*

*a left-going shock wave is created on the left of the ramp: the upstream cars stop suddenly;

*a left-going rarefaction wave (fan) is created on the right of the ramp: the inserted cars accelerate gradually, until they reach the maximum-flux velocity.



A more quantitative solution is possible. At this point, one can decide to solve the conservation law with source term
$$
\frac{\partial}{\partial t}\rho + \frac{\partial}{\partial x}Q (\rho) = \alpha \boldsymbol{1}_{0\leq x < 1,\, t\geq 0}
$$
numerically, or to have a look at this post.
