Traffic Flow Modelling - Highway Entrance Case
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$.
Calculate the characteristics, any related shocks/fans, car density and hence plot the space-time diagram. Using this diagram, give a mathematical expression for the density, $ρ(x, t)$. Hint: A complicated first-order differential equation will require solution. First determine $x(0)$ and $x'(0),$ then use the leading-order term in a series solution for $x(t)$.
Hello everyone, I'm aware that a similar question has been posted, but I'm looking for something a little different. Link of similar post : Traffic flow modelling - How to identify fans/shocks?
I believe the characteristics are $x = $ $ \left\{ \begin{array}{ll} c & x<0, x \geq 1\\ -\alpha t^2 + c & 0\leq x <1 \\ \end{array} \right. $
Where $c$ is a constant.
Now I'm having problems with the rest of the question, namely, calculating the shocks/fans as well as how to use the space-time diagram to calculate the density. I have done a few traffic modelling questions before but never the case where cars are constantly entering a highway is involved and I've yet to see such a question where a "series solution" is required. Thank you in advance for any help.
Solution 1:
The problem of the on-ramp being initially empty but suddenly becoming full seems very unrealistic but it makes an interesting problem. I think that this is the interpretation of @Ryan J: and @Harry49. and I agree with most of their results so far.
The expansion requires the PDE with source term to be solved for $x\in[0,1]$ subject to the boundary condition $\rho=1/2$ at $x=1$. That is, a boundary value rather than an initial value problem. That was an unusual switch that I took some time to realise. It is this feature that seems to distinguish this problem from all of the apparently similar questions. The message to learn is that in solving hyperbolic PDEs the correct boundary conditions can be unknown initially, and have to emerge as you learn more about the solution.
On the characteristic that departs from $x=1$ at $t=t_0$, the solution to the characteristic equations is $$x=1-\alpha(t-t_0)^2, \qquad\rho=1/2+\alpha(t-t_0)$$
Eliminating $t_0$ gives $$\rho=1/2+\sqrt{\alpha(1-x)}$$ At $x=0$ we have $$\rho=1/2+\sqrt{\alpha}$$ This will define another boundary value problem for the region $x<0$. The characteristics in this region will be straight and will carry constant values of $\rho$. A traffic jam $\rho=1$ cannot occur anywhere unless it occurs at $x=0$. The density there is given by $$\rho(0,t)=1/2+\alpha t,\qquad t<\sqrt{1/\alpha}$$ $$\qquad\qquad=1/2+\sqrt{\alpha},\qquad t>\sqrt{1/\alpha}$$ From these results we see that a traffic jam (in the sense of $\rho=1$) will form if and only if $\alpha\ge 1/4$. Although a jam in this sense can be avoided, the shockwave will extend upstream to any given distance, creating a stream between itself and the on-ramp with a density $\rho=1/2+\sqrt{\alpha}$ and that is unavoidable for any $\alpha$. That something undesirable will happen could have been anticipated since more vehicles are being added to a road already at full capacity.
I made a drawing of the characteristics for the case $\alpha=1/6$. This involved finding four non-trivial sets of curves. I did not solve for the shock exactly, but sketched in something that roughly bisects the characteristics. There is no actual traffic jam in this case, but a rapidly growing region with a density of 0.91, moving at a speed 0.09! in the general case, for any $\alpha\le 1/4$, the shock moves to the left with speed $\sqrt{\alpha}/2$. Since the velocity in the post-shock flow is $1-\sqrt{\alpha}$, this is adding to the journey time by approximately $\alpha T/(1-2\sqrt{\alpha})$ for a vehicle encountering the shock at time$T$.
Solution 2:
The initial car density is $\rho(x_0,0)=1/2$. As mentioned in the OP and in the linked post, two cases must be considered when applying the method of characteristics. The latter amounts to the coupled differential equations $\rho'(t) = \alpha\mathbf{1}_{0\leq x(t)\leq 1}$ and $x'(t) = 1-2\rho(t)$, where $\mathbf{1}$ denotes the indicator function. The initial conditions are $\rho(0) = 1/2$ and $x(0) = x_0$.
If $x_0\leq 0$ or $1 \leq x_0$, then we start with no source term. Hence, the case of the homogeneous LWR model is recovered, where the characteristics are straight lines along which $\rho$ is constant. We have $x = x_0$ and $\rho = 1/2$.
If $0 < x_0 < 1$, then we start with the source term $\alpha$. Therefore, we know $x = x_0 - \alpha t^2$ and $\rho = 1/2 + \alpha t$ up to $t = t_1 = \sqrt{x_0/\alpha}$ where $x=0$. For $t> t_1$, we have again straight lines with equation $x = -2\sqrt{\alpha x_0}(t-t_1)$, along which $\rho$ is constant and equal to $\rho_1 = 1/2 + \sqrt{\alpha x_0}$.
As noted qualitatively in the linked post, a shock wave is generated at $(x,t) = (0,0)$. The car density on the left of the shock is $\rho_L = 1/2$. On the right of the shock, the data comes from the ramp. We have $t_1 = t+x/(2\rho_1 - 1)$ and $t_1 = (\rho_1-1/2)/\alpha$, which gives the density $\rho_R = \rho_1$ on the right of the shock. The abscissa $x_s$ of the shock satisfies the Rankine-Hugoniot condition $$ x_s'(t) = 1 - (\rho_R + \rho_L) = -\frac{\alpha t}{2}\left(1 + \sqrt{1 + 2 \frac{x_s(t)}{\alpha t^2}}\right) , $$ with the initial condition $x_s(0) = 0$. If $|x_s(t)|\ll \alpha t^2$, then we can make the Taylor series approximation $x'_s(t) \simeq -\alpha t - {x_s(t)}/({2 t})$. This differential equation admits the solution $x_s(t) \simeq -\frac{2}{5}\alpha t^2$, which is indeed smaller than $\alpha t^2$ in absolute value.
A sketch in the $x$-$t$ plane shows that the shock wave will interact with the characteristic curve $x = 1-\alpha t^2$ issued from $x_0 = 1$ at some time $t>\sqrt{1/\alpha}$ (cf. answer by @PhilipRoe). Before this happens, the solution is $$ \rho(x,t) = \left\lbrace\begin{aligned} &\tfrac{1}{2} &&\text{if}\quad x < x_s(t)\\ &\tfrac{1}{2} + \tfrac{1}{2}\left(\alpha t + \sqrt{\alpha^2 t^2 + 2\alpha x_s(t)}\right) &&\text{if}\; x_s(t) < x \leq 0\\ &\tfrac{1}{2} + \alpha t &&\text{if}\; 0 \leq x \leq 1 - \alpha t^2\\ &\tfrac{1}{2} + \sqrt{\alpha (1-x)} &&\text{if}\; 1 - \alpha t^2 \leq x \leq 1\\ &\tfrac{1}{2} &&\text{if}\; 1 \leq x \end{aligned}\right. $$