- #1
Carla1985
- 94
- 0
I am creating a traffic flow model, modelling the flow of traffic as fluid with density and velocity. I am using the method of characteristics to solve the model but I have run into a problem.
The model I have is:
$\frac{\partial\rho}{\partial t}+c(\rho)\frac{\partial\rho}{\partial x}=0$, $\rho(x,0)=f(x)$, $v=v(\rho)$, $c(\rho)=v+\frac{\partial v}{\partial \rho}\rho$
$\rho$ is density, $\rho_c$ is some density between 0 and max density which I have set at 1. $v$ is velocity.
so using:
\(\displaystyle
v(\rho)= \left\{
\begin{array}{1 1}
\ 70 && 0\leq\rho<\rho_c \\
&& \\
\frac{70}{\rho \ln(\frac{1}{\rho_c})}\ln(\frac{1}{\rho}) && \rho\leq\rho\leq 1
\end{array}\right.
\)
\(\displaystyle
f(x)= \left\{
\begin{array}{1 1}
\ 0 && x>\epsilon \\
1-\frac{(x+\epsilon)}{2\epsilon} && -\epsilon\leq x\leq\epsilon \\
\ 1 && x<-\epsilon
\end{array}\right.
\)
I have already worked out that:
Case 1:
\(\displaystyle x_0>\epsilon\ \Rightarrow x>70t\ \Rightarrow x_0=x-70t\ \Rightarrow \rho(x,t)=0
\)
Case 2:
\(\displaystyle x_0<-\epsilon\ \Rightarrow x<\left(\frac{70}{\ln(\rho_c})\right)t\ \Rightarrow x_0=x-\left(\frac{70}{\ln(\rho_c})\right)t\ \Rightarrow \rho(x,t)=1
\)
Case 3 (this is where it gets complicated):
\(\displaystyle -\epsilon\leq x\leq\epsilon
\)
but $\rho_c$ falls within this range so I split it into 2 sections:
When $-\epsilon\leq f(x_0)\leq\rho_c,\ c(f(x_0))=70$
Then $x=70t+x_0$ and $-\epsilon+70t\leq x \leq\rho_c+70t\ \Rightarrow \rho(x,t)=f(x_0)=1-\frac{((x_0-70t)+\epsilon)}{2\epsilon}$Now for the part I'm stuck with:
When $\rho_c<f(x_0)\leq\epsilon$
Which gives:
\(\displaystyle x=\frac{70(\ln(1-\frac{x_0+\epsilon}{2\epsilon})+1)}{\ln(\rho_c)}+x_0
\)
This obviously can't be solved for $x_0$ so I'm assuming I've either made a mistake somewhere or I've misunderstood a step. I haven't actually done my partial differential equations module yet so had to just learn this method on the fly, hence I'm not great at it. I would be extremely grateful if someone could take a look and point me in the right direction :)
The model I have is:
$\frac{\partial\rho}{\partial t}+c(\rho)\frac{\partial\rho}{\partial x}=0$, $\rho(x,0)=f(x)$, $v=v(\rho)$, $c(\rho)=v+\frac{\partial v}{\partial \rho}\rho$
$\rho$ is density, $\rho_c$ is some density between 0 and max density which I have set at 1. $v$ is velocity.
so using:
\(\displaystyle
v(\rho)= \left\{
\begin{array}{1 1}
\ 70 && 0\leq\rho<\rho_c \\
&& \\
\frac{70}{\rho \ln(\frac{1}{\rho_c})}\ln(\frac{1}{\rho}) && \rho\leq\rho\leq 1
\end{array}\right.
\)
\(\displaystyle
f(x)= \left\{
\begin{array}{1 1}
\ 0 && x>\epsilon \\
1-\frac{(x+\epsilon)}{2\epsilon} && -\epsilon\leq x\leq\epsilon \\
\ 1 && x<-\epsilon
\end{array}\right.
\)
I have already worked out that:
Case 1:
\(\displaystyle x_0>\epsilon\ \Rightarrow x>70t\ \Rightarrow x_0=x-70t\ \Rightarrow \rho(x,t)=0
\)
Case 2:
\(\displaystyle x_0<-\epsilon\ \Rightarrow x<\left(\frac{70}{\ln(\rho_c})\right)t\ \Rightarrow x_0=x-\left(\frac{70}{\ln(\rho_c})\right)t\ \Rightarrow \rho(x,t)=1
\)
Case 3 (this is where it gets complicated):
\(\displaystyle -\epsilon\leq x\leq\epsilon
\)
but $\rho_c$ falls within this range so I split it into 2 sections:
When $-\epsilon\leq f(x_0)\leq\rho_c,\ c(f(x_0))=70$
Then $x=70t+x_0$ and $-\epsilon+70t\leq x \leq\rho_c+70t\ \Rightarrow \rho(x,t)=f(x_0)=1-\frac{((x_0-70t)+\epsilon)}{2\epsilon}$Now for the part I'm stuck with:
When $\rho_c<f(x_0)\leq\epsilon$
Which gives:
\(\displaystyle x=\frac{70(\ln(1-\frac{x_0+\epsilon}{2\epsilon})+1)}{\ln(\rho_c)}+x_0
\)
This obviously can't be solved for $x_0$ so I'm assuming I've either made a mistake somewhere or I've misunderstood a step. I haven't actually done my partial differential equations module yet so had to just learn this method on the fly, hence I'm not great at it. I would be extremely grateful if someone could take a look and point me in the right direction :)