# [SOLVED]traffic flow wave equation

#### dwsmith

##### Well-known member
Suppose that along a stretch of highway the net flow of cars entering (per unit length) can be taken as a constant $\beta_0$.
The governing equation of motion is then
$$\frac{\partial\rho}{\partial t} + c(\rho)\frac{\partial\rho}{\partial x} = \beta_0$$
where
$$c(\rho) = u_{\text{max}}\left(1 - \frac{2\rho}{\rho_{\text{max}}}\right).$$

Show that the variation of the initial density distribution is given by
$$\rho = \beta_0t + \rho(x_0,0)$$
along a characteristic emanating from $x = x_0$ described by
$$x = x_0 + u_{\text{max}}\left(1 - \frac{2\rho(x_0,0)}{\rho_{\text{max}}}\right)t - \beta_0\frac{u_{\text{max}}}{\rho_{\text{max}}}t.$$

What I have done so far is:
$\frac{dt}{dr} = 1\Rightarrow t = r + c$ but when $t = 0$, we have $t = r$.

$\frac{dx}{dr} = c(\rho)\Rightarrow x = tu_{\text{max}}\left(1-\frac{2\rho}{\rho_{\text{max}}}\right)+c$ but when $t=0$, we have
$$x = tu_{\text{max}}\left(1-\frac{2\rho}{\rho_{\text{max}}}\right) + x_0.$$

$\frac{d\rho}{dr} = \beta_0\Rightarrow \rho = t\beta_0 + c$

How do I get to
$$\rho(x,t) = t\beta_0 +\rho(x_0,0)$$
and their characteristic?

#### Sudharaka

##### Well-known member
MHB Math Helper
Hi dwsmith,

$\frac{d\rho}{dr} = \beta_0\Rightarrow \rho = t\beta_0 + c$

How do I get to
$$\rho(x,t) = t\beta_0 +\rho(x_0,0)$$
and their characteristic?
$\rho = t\beta_0 + c$

When, $$t=0$$ we have, $$\rho(x=x_{0},t=0)=\rho(x_{0},0)$$. Therefore,

$\rho=t\beta_{0}+\rho(x_{0},0)$

$\frac{dx}{dr} = c(\rho)\Rightarrow x = tu_{\text{max}}\left(1-\frac{2\rho}{\rho_{\text{max}}}\right)+c$ but when $t=0$, we have
$$x = tu_{\text{max}}\left(1-\frac{2\rho}{\rho_{\text{max}}}\right) + x_0.$$
This is incorrect. Note that $$\rho$$ depends on $$t$$ but you have considered it as a constant when integrating. The correct method is to substitute for $$\rho$$ first so as to obtain,

$\frac{dx}{dr}=\frac{dx}{dt}=c(\rho)=u_{\text{max}}\left(1 - \frac{2\rho}{\rho_{\text{max}}}\right)$

$\Rightarrow \frac{dx}{dt}=u_{\text{max}}\left(1 - \frac{2\rho(x_{0},0)}{\rho_{\text{max}}}\right)-\frac{2\beta_{0}u_{\text{max}}t}{\rho_{\text{max}}}$

Integration gives,

$x=x_{0}+u_{\text{max}}\left(1 - \frac{2\rho(x_{0},0)}{\rho_{\text{max}}}\right)t-\frac{\beta_{0}u_{\text{max}}t^{\color{red}2}}{ \rho_{\text{max}}}$

Kind Regards,
Sudharaka.

#### dwsmith

##### Well-known member
$\Rightarrow \frac{dx}{dt}=u_{\text{max}}\left(1 - \frac{2\rho(x_{0},0)}{\rho_{\text{max}}}\right)-\frac{2\beta_{0}u_{\text{max}}t}{\rho_{\text{max}}}$
Where did this piece come from?

$$\frac{2\beta_{0}u_{\text{max}}t}{\rho_{\text{max}}}$$

#### Sudharaka

##### Well-known member
MHB Math Helper
Where did this piece come from?

$$\frac{2\beta_{0}u_{\text{max}}t}{\rho_{\text{max}}}$$
Substitute $$\rho=t\beta_{0}+\rho(x_{0},0)$$ for $$\rho$$ in $$\frac{dx}{dt}=c(\rho)=u_{\text{max}} \left(1 - \frac{2\rho}{\rho_{\text{max}}}\right)$$

#### dwsmith

##### Well-known member
Substitute $$\rho=t\beta_{0}+\rho(x_{0},0)$$ for $$\rho$$ in $$\frac{dx}{dt}=c(\rho)=u_{\text{max}} \left(1 - \frac{2\rho}{\rho_{\text{max}}}\right)$$
How can I use Mathematica to sketch the space time diagram?

#### Sudharaka

##### Well-known member
MHB Math Helper
How can I use Mathematica to sketch the space time diagram?
I have never used Mathematica so I won't be able to answer your question. By space-time diagram do you mean the graph between $$x$$ and $$t$$ ?

#### dwsmith

##### Well-known member
I have never used Mathematica so I won't be able to answer your question. By space-time diagram do you mean the graph between $$x$$ and $$t$$ ?
Yes

#### Sudharaka

##### Well-known member
MHB Math Helper
In that case it is a parabola. But do you have any specific values for the constants, $$x_{0},\,u_{\text{max}},\,\rho(x_{0},0),\,\rho_{ \text{max}}\mbox{ and }\beta_{0}$$ ?

#### dwsmith

##### Well-known member
In that case it is a parabola. But do you have any specific values for the constants, $$x_{0},\,u_{\text{max}},\,\rho(x_{0},0),\,\rho_{ \text{max}}\mbox{ and }\beta_{0}$$ ?

No.

#### Sudharaka

##### Well-known member
MHB Math Helper
Then it seems problematic as to how you would graph this equation in any mathematical software. What you can only say is that the graph between $$x$$ and $$t$$ is parabolic.