$\renewcommand{\Re}{\operatorname{Re}}$ $\renewcommand{\Im}{\operatorname{Im}}$ $\newcommand{\erf}{\operatorname{erf}}$ $\newcommand{\dag}{\dagger}$ $\newcommand{\const}{\mathrm{const}}$ $\newcommand{\arcsinh}{\operatorname{arcsinh}}$ ###[Appendix A. Derivation of a PDE describing traffic flow](id:sect-2.1.A) ----------- The purpose of this discussion is to derive a toy-model PDE that describes a congested one-dimensional highway (in one direction). Let * $\rho(x,t)$ denote the traffic density: the number of cars per kilometer at time $t$ located at position $x$; * $q(x,t)$ denote the traffic flow: the number of cars per hour passing a fixed place $x$ at time $t$; * $N(t,a,b)$ denote the number of cars between position $x=a$ and $x=b$ at time $t$. It is directly implied by definition of $\rho(x,t)$ is \begin{equation} N(t,a,b)=\int_{a}^{b}\rho(t,x) dx. \label{eq-2.1A.1} \end{equation} By definition of $q$ and conservation of cars we have: \begin{multline} \frac{\partial N}{\partial t}(t,a,b)=\lim\_{h \rightarrow 0} \frac{N(t+h,a,b)-N(t,a,b)}{h} \\\\ =\lim_{h \rightarrow 0} \frac{h(q(t,a)-q(t,b))}{h} =q(t,a)-q(t,b) \label{eq-2.1A.2} \end{multline} Differentiating (\ref{eq-2.1A.1}) with respect to $t$ \begin{equation\*} \frac{\partial N}{\partial t}=\int\_{a}^{b}\rho_t(t,x) dx \end{equation\*} making it equal to (\ref{eq-2.1A.2}) we get the integral form of "conservation of cars": \begin{equation\*} \int_{a}^{b}\rho_t(t,x) dx=q(t,a)-q(t,b). \end{equation\*} Since $a$ and $b$ are arbitrary, it implies that $\rho_t=-q_x$. The PDE \begin{equation} \rho_t+q_x=0 \label{eq-2.1A.3} \end{equation} is conservation of cars equation. After equation (\ref{eq-2.1A.3}) or more general equation \begin{equation} \rho_t+ \rho_x=f(x,t) \label{eq-2.1A.4} \end{equation} (where $f=f\_{in}-f\_{out}$, $f\_{in}dx dt$ and $f\_{out}dx dt$ are numbers of cars entering/exiting highway for time $dt$ at the segment of the length $dx$) has been derived we need to connect $\rho$ and $q$. The simplest is $q=c \rho$ with a constant $c$: all cars are moving with the same speed $c$. Then (\ref{eq-2.1A.3}) becomes \begin{equation} \rho_t+ c \rho_x=0. \label{eq-2.1A.5} \end{equation} However more realistic would be $c=c(\rho)$ being monotone decreasing function of $\rho$ with $c(0)=c_0$ (speed on empty highway) and $c(\bar{\rho})=0$ where $\bar{\rho}$ is a density where movement is impossible. Assume that $q(\rho) = c(\rho)\rho$ has a single maximum at $\rho^\*$. Then \begin{equation} \rho_t+ v \rho_x=0. \label{eq-2.1A.6} \end{equation} with \begin{equation} v=v(\rho)= q'(\rho) = c(\rho)+ c' (\rho)\rho \label{eq-2.1A.7} \end{equation} where $'$ is a derivative with respect to $\rho$. Therefore $\rho$ remains constant along *integral line* $x - v(\rho) t=\const$. $v=v(\rho)$ is the *group speed* namely the speed with which point where density equals given density $\rho$ is moving. Here $v(\rho)< c(\rho)$ (because $c'<0$), so group speed is less than the speed of the cars (simply cars may join the group from behind and leave it from its front). Further $v>0$ as $\rho<\rho^\*$ and $v<0$ as $\rho>\rho^\*$; in the latter case the group moves backward: the jam grows faster than it moves. Also the integral lines may intersect (loose and faster moving group catches up with dense and slower group). When it happens $\rho$ becomes discontinuous, (\ref{eq-2.1A.3}) still holds but (\ref{eq-2.1A.6}) fails (it is no more equivalent to (\ref{eq-2.1A.3}) ) and the theory becomes really complicated. ->![traffic](./F2.1.A-1.svg)<- **[Remark 1.](id:remark-2.1.A.1)** In the toy-model of gas dynamics $c(\rho)=\rho$, or more general $c'(\rho)>0$ and $v(\rho)>c(\rho)$. ______ [$\Leftarrow$](./S2.1.html)  [$\Uparrow$](../contents.html)  [$\Rightarrow$](./S2.2.html)