You are on page 1of 8

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/268688941

The Conservative Upwind Scheme For Simple Traffic Flow Model

Conference Paper · November 2014


DOI: 10.13140/2.1.2750.9446

CITATIONS READS

4 1,047

1 author:

Putu Harry Gunawan


Telkom University
100 PUBLICATIONS   304 CITATIONS   

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Computer vision for wood identification View project

OpenMP Project View project

All content following this page was uploaded by Putu Harry Gunawan on 25 November 2014.

The user has requested enhancement of the downloaded file.


Prosiding Seminar Nasional Matematika, Universitas Udayana, 6 November 2014

THE CONSERVATIVE UPWIND SCHEME FOR


SIMPLE TRAFFIC FLOW MODEL

PUTU HARRY GUNAWAN1,2

1
Industrial and Financial Mathematics Research Group, Faculty of Mathematics and
Natural Sciences, Institut Teknologi Bandung, Jalan Ganesha 10, Bandung 40132,
Indonesia
2
Université Paris-Est, LAMA UMR8050, F-77454, Marne-la-Vallée, France.

Email: putu-harry.gunawan@u-pem.fr; putu.harry.gunawan@gmail.com

Abstrak

Tujuan penulisan artikel ilmiah ini adalah untuk mensimulasikan model arus lalu
lintas (Traffic flow model). Model arus lalu lintas dapat ditulis dalam dua bentuk
yaitu dalam conservation form dan quasilinear form. Diskritisasi dari persamaan
pengatur model menggunakan skema conservative upwind dari metode volum
hingga. Metode ini dikenal sebagai metode yang handal (robust) dalam
menghitung masalah ketidakkontinuan atau diskontinu (shock problems). Hasil
yang diperoleh dari skema conservative memperlihatkan adanya kesamaan hasil
numerik dengan solusi analitik. Tingkat kekonvergenan skema conservative juga
diperlihatkan berupa tabel diskrit L1 error yang sekaligus menunjukkan
kehandalan dari skema conservative.

Kata kunci: model arus lalu lintas, metode volum hingga, masalah diskontinu,
simulasi, skema conservative upwind.

1. Introduction

Transport and tourism relationship has been subject of discussion in many


literatures. The role of transportation in tourism industries becomes important. For
instance, the information and the analysis of traffic problems are needed to
increase the efficiency of complex interaction in tourism area. Some traffic
problems such as how the traffic flow in a street, how to develop the traffic light
system in a street, particularly in a cross-section and etc will be a very challenging
problem for researchers. Two methods have been proposed to describe a traffic
flow model, for instance see Haberman [1]. First model is a microscopic model
where the model describes the movement of single vehicle-driver units. Here, the
position and velocity of the vehicle are dynamic variables to describe the
properties of the model. The second model is macroscopic model where the model
describes the cars/vehicle as a density. In this model, the flow is introduced as
Putu Harry Gunawan The Conservative Upwind Scheme For Simple Traffic Flow Model

speed of a traffic stream. In this research, we are interested in the second model of
traffic flow model.

For a simple problem, the distribution of density of cars after traffic light has
turned green becomes interesting (see Fig. 1). This problem allows us to study the
conservation of mass over a control volume.

Figure 1: The traffic light problem.

In this paper, we will study a simple model of traffic flow on the traffic light
problem numerically and analytically. In particular, we present a mathematical
model of a traffic flow after a traffic light turns green. The governing equation of
the mass conservation of cars density is given as,

 ( u (  ))
  0, (1.1)
t x

where  is the density of cars, u (  ) the velocity function depends on density, t


the time and x the position variable. This equation is now a nonlinear
conservation law since we have the flux f (  )  u(  ) (see for instance LeVeque
[2] and Toro [3] for more detail).

Various velocity functions u (  ) available in some literatures. For instance in


Mattheij et. al. [3], the simple velocity function is given as

  
u (  )  u max 1   , (1.2)
  max 

where u max and  max are maximum velocity and maximum density respectively.
We can see clearly that in (1.2) the velocity reach zero when the density tends to
the maximum. Contrary, with the density is tends to zero, the velocity reach the
maximum speed.

Another form of governing equation can be written in the quasilinear form of the
conservation law (1.1) by differentiating the flux function f (  ) as
Prosiding Seminar Nasional Matematika, Universitas Udayana, 6 November 2014

 
 f ' ( )  0, (1.3)
t x
with
 2 
f ' (  )  u max 1   . (1.4)
  max 

As noted in LeVeque [2], we can easily determine the characteristics of the


governing equation by the quasilinear form.

In order to solve the traffic flow model numerically, we introduce the conservative
upwind scheme of finite volume method for approximating (1.1). This method is
known as a robust scheme to compute the shock problem. For approximating the
quasilinear equation (1.3), actually we can use the non-conservative scheme of
finite volume method. However, this scheme fails to converge to a weak solution
of conservation law when the solution contains a shock wave. This phenomenon is
happened due to the fact that finite volume method is derived on the basis of the
integral form of the conservation law. For instance, we can observe the
discretization of Burgers’ equation from conservative and non-conservative form
described in LeVeque [2], Chapter 12.9. Therefore, to use the finite volume
method for nonlinear scalar conservation law, the conservation form is very
important.

This paper is organized as, the numerical discretization of the problem is


presented in Section 2. Algorithm and numerical simulation are constructed in
Section 3. Finally, in Section 4 the conclusions are drawn.

2. Numerical Discretization of The Problem

In this section, we will describe the discretization of (1.1) using the first-order
conservative upwind scheme in space and time. Before we begin to discretize the
equation (1.1), let’s us derive the finite volume scheme form the full system
within control volume in Fig. 2.

Figure 2: The control volume of density.

Now, we consider a grid of points x 1 , i  Z,   x 1  x 1   and we define


i 
2 2 2
the cells and their lengths as Fig. 2,
Putu Harry Gunawan The Conservative Upwind Scheme For Simple Traffic Flow Model

 
i  x 1 , x 1  x  x 1 x 1  0.
 i 2 i 2  i
2
i
2

Here the space variable x is not depend on the time variable t , thus integrate the
density  ( x, t ) over a control volume  i , we have

x 1 x 1
i i
d 2 2

dt x 1 x t  ( x, t ) dx,
 ( x , t ) dx 
1
i i
2 2

x 1
i
2


x
   (  ( x, t )u(  ( x, t ))) dx,
t
1
i
2
x 1
i
 (  ( x, t )u (  ( x, t ))) x
2
,
1
i
2

 
  Fx 1  Fx 1 ,
 i 2 i
2 

where F   ( x, t )u(  ( x, t )) . Furthermore, we use the value  i to approximate the


average value over the i -th interval:
x 1
i
1 2
x x 1
i   ( x, t ) dx ,
i
2

hence we have
 n 
x  F 1  F n1 
 i i 
1
i

 2 2 
2
d d 1
dt x x1
i   ( x , t ) dx   , (2.1)
dt x
i
2

where x is the length of control volume. This equation is called a semi-discrete


of Godunov scheme where the time remains continuous. Afterwards, we need to
define the discretization in time. We shall define the discrete times by
t n  nt , n N where a constant time step is t  0 .

From the equation (1.2), we notice that the velocity function is always in positive
value. Therefore it is easy to derive the conservative upwind scheme of (1.1) with
(2.1) by
F n1  F n1
i  i
n 1 n i i
 2 2
 0, (2.2)
t x
where
Prosiding Seminar Nasional Matematika, Universitas Udayana, 6 November 2014

 
F n 1  u  n 1   in , (2.3)
i
2  i 2 
 n   in1
n 1  i , (2.4)
i 2
2

 n 1 
   i 
u  n 1   u max 1  2
. (2.5)
i
 2   max 
 

The previous scheme is in the first-order discretization in space and time. In


addition, here the grid space x is uniform along the discretization. The CFL
(Courant-Friedrichs-Lewy) condition for previous scheme is also not considered
here, the readers are suggested to see LeVeque [2] and Mattheij et. al. [3] for more
detailed.

3. Algorithm and Numerical Simulation

In this section, we present an algorithm of the conservative upwind scheme (2.3) –


(2.6). Several steps are given in Algorithm 1. This algorithm is very easy and
efficient due to our scheme is simple and straightforward satisfied the principle of
mass conservation.

Algorithm 1
Step 1. Give the initial condition at n=0.
Step 2. Compute (2.3) for F n 1 .
i
2

Step 3. Compute (2.2) for  . i


n 1

Step 4. Back to step 2 until the final time step.

In order to assess the numerical scheme, we present the numerical experiment (see
Fig. 4) of a simple problem which can be found in Haberman [1]. Here we try to
elaborate a numerical simulation with the initial condition of density as
2 if x  0
 ini ( x)   , (3.1)
0 otherwise
within a domain   [10 : 10] . Another parameters such as u max and  max are
defined with value 2 for both parameters. In this simulation, the initial condition
(where t  0 ) gives the situation where the traffic light turns red. This situation is
described as a shock density over a domain (see Fig. 3 green curve). This problem
is also known as a Riemann problem with the Riemann initial data (Mattheij, et.
al. [3]).

The analytical solution of this problem also can be found in Mattheij, et. al. [3]
and we can rewrite based on initial condition (3.1) as
Putu Harry Gunawan The Conservative Upwind Scheme For Simple Traffic Flow Model

 2 if x / t  F ' (2)
 1  x 
 analytic ( x, t )    max 1   if F ' (2)  x / t  F ' (0) . (3.2)
2  u max t 
 0 if x / t  F ' (0)

This analytical solution describes the situation when the cars speed up after the
traffic light has turned green.

Figure 3: The density profile at initial (t=0) and final (T=1) time step using conservative upwind
(CU) scheme.

In Fig. 3 with blue and red curves, the simulation of traffic flow after a traffic
light turns green is presented. Here, we can observe that, the conservative upwind
scheme (Fig. 3) gives nicely comparable approximation to the analytical solution.
We can see clearly that as soon as the light turn green, traffic reduces dense
further ahead on the road. In this case, the density is decreasing during the green
light. Moreover, the numerical simulation using conservative upwind scheme is in
a good agreement with the analytical solution (3.2).

To assess the convergence and the robustness of conservative upwind numerical


scheme, we present the discrete L1 norm error and the convergence rate in Table
1. The L1 norm error is calculated by
Error L1    ( x, T )   analytic( x, T ) dx ,

where  ( x, T ) is the piecewise continuous reconstruction on space-time domain
of a numerical solution and  analytic( x, T ) is the analytical solution (3.2) at final
time T . We can observe clearly that the convergence rates defined by
ln( Error2 / Error1 )
 ,
ln(Cells 1 / Cells 2 )
are nicely increasing tends to one and the errors are decreasing along with the
refine cells.
Prosiding Seminar Nasional Matematika, Universitas Udayana, 6 November 2014

Table 1. The discrete L1 norm error and the rate of convergence at final time T  1 .
Cells Error L1 
50 0.823843 /
100 0.487099 0.758
200 0.286010 0.768
400 0.166288 0.782
800 0.095549 0.799

4. Conclusions

The conservative and non-conservative schemes for simulating the traffic flow
model after a traffic light turns green is presented. The schemes are shown to be
straightforward and easy. This scheme based on the finite volume method which
is known as a robust scheme for shock problem. However, using conservative
upwind scheme is more accurate than the non-conservative upwind scheme. The
result of conservative upwind scheme is in a good agreement with the analytical
solution. Moreover, the table of discrete L1 norm error is constructed to assess
the robustness and the convergence of the scheme.

References

[1] R. Haberman. 1998. Mathematical Models: Mechanical vibrations, population


dynamics, and traffic flow, volume 21. Siam.
[2] R. J. LeVeque. 2002. Finite volume methods for hyperbolic problems, volume
31. Cambridge university press.
[3] R. M. Mattheij, S. W. Rienstra, and J. H. ten Thije Boonkkamp. 2005. Partial
differential equations: modeling, analysis, computation. Siam.
[4] E. F. Toro. 1999. Riemann solvers and numerical methods for fluid dynamics,
volume 16. Springer.

View publication stats

You might also like