Numerical Simulation of Diffusion Type Traffic Flow Model Using Second-Order Lax-Wendroff Scheme Based on Exponential Velocity Density Function ()
1. Introduction
At present, we cannot think of our life even in a single day without vehicles like buses, trucks, cars, auto-rickshaws, CNG, etc. to go from one place to another place. With the increasing population, the demand for vehicles is also increasing day by day. This increase in vehicles creates a traffic congestion problem. Traffic congestion is one of the greatest problems in Bangladesh like some other countries of the world. In all the major cities of our country, especially Dhaka, traffic congestion is a must. Due to the unavailability of adequate space for the extension of the transport system, we face the traffic congestion problem. Besides this, a lot of reasons are responsible for traffic congestion in Bangladesh such as plying useless and unsuitable transports, inexperienced drivers, bad and limited roads, improper traffic system and lack of proper training on traffic system, lack of awareness, etc. Traffic congestion wastes our valuable time, creates time delays, decreases fuel economy and causes the risk of a vehicle collision. Around 5 million working hours are eaten up due to the traffic congestion in Dhaka city every day, costing the country USD 11.4 billion annually. Heavy traffic congestion can cause serious physical and mental problems, including stress and aggression resulting in road rage. Traffic management needs to be developed at the core of traffic congestion. Therefore, to eliminate such huge traffic congestion, efficient traffic control systems and management are essential.
For proper management of highway traffic, an efficient modeling approach and planning under statistical observations of highway traffic are highly required. To an observer, the traffic stream is viewed as a property of the spacing of the vehicles such that the closer they are together, the slower they move. Mathematically, it indicates an inverse relationship between speed and density. To solve the traffic congestion problem mathematicians and create a traffic flow model on the assumption that there are some relations between traffic density and velocity. Greenshields introduced the relation between traffic density and velocity (1934) [1] and called the fundamental relation or fundamental diagram. For this reason, Greenshields is regarded as the founder of traffic flow theory.
The mathematical modeling of traffic flow often rests on a fluid flow analogy, treating the traffic stream as a one-dimensional movement of fluid, considered as a continuum model of traffic flow [2] [3] , which leads to a basic assumption that traffic flow is conserved where traffic is a conserved quantity that means in a certain region, the number of vehicles entering equals the number of leaving the same region. Representing this phenomenon mathematically will make it possible to predict the density and velocity patterns in the future time considering the number of cars in a segment of a highway as our physical quantities and the process is to keep them fixed, which means that the number of cars coming in equals the number of cars going out of the segment.
To solve traffic congestion mathematically, Lighthill and Whitham (1955) and Richards (1956) [2] [4] first proposed a well-known macroscopic model, namely the LWR model, based on the basic assumption of the vehicle in traffic flow as particles in the fluid. The LWR model does not explain the traffic diffusivity. For this reason, Payne first introduced the diffusion-type traffic flow model in 1971 [5] and Khune added a diffusion term in the LWR model in 1984 [6] to show the traffic diffusivity. The analytical solution of the LWR traffic flow model is performed by the method of characteristics and the analytical solution of diffusion-type traffic flow is performed by Cole-Hopf transformation. In our research paper, we would like to give attention to the macroscopic fluid dynamic model as it is more efficient and easier to implement compared to other modeling approaches with the main focus on the analysis of numerical solutions [7] .
We discretize the diffusion-type traffic flow model equation by finite difference method to get different numerical schemes [8] . We also perform stability analysis for each of the numerical schemes. In this work, we develop computer programming code to implement each numerical scheme to present traffic characteristics’ qualitative behavior.
2. Governing Equation for Traffic Flow
A well-known first-order LWR traffic flow model is used to study traffic flow characteristics such as traffic velocity
, flux (traffic flow rate)
and traffic density
. All these parameters are functions of space,
and time,
. This model is based on the conservation of mass and reads as,
(2.1)
This first order model does not explain the traffic diffusivity. For this reason, Khune added a diffusion term in 1984 and initiated using the methods of nonlinear dynamics for analyzing the equation [6] . This yields,
(2.2)
The term
known as the Fickian term is used to account for external noise, i.e. the term represents road conditions, engine power, braking variability, changes in wind, drivers’ response to the stimuli [5] . So, (2.1) can be developed using Equation (2.2) and can be written as,
(2.3)
This is known as second-order parabolic diffusion type traffic flow model.
3. Analytical Solution of Diffusion Type Traffic Flow Model
We consider the diffusion-type traffic flow model as a Cauchy problem,
(3)
Initial condition,
By Cole-Hopf transformation, the analytical solution of diffusion type traffic flow model [9] is,
where
is the initial condition.
This analytical solution may cause huge errors because it depends on the initial value function over an integrodifferential equation and it is very difficult to evaluate the analytical solution because of the above integrodifferential equation.
To avoid this complexity and estimate the relative error of each scheme, we use the diffusion rate
. In this case the analytical solution of diffusion type traffic flow model with linear velocity density relation is,
And with exponential velocity density relation the analytical solution in implicit form is,
where
is the initial condition.
4. Numerical Solution of Diffusion Type Traffic Flow Model
For the complexity of analytical solution, we need to solve the diffusion type traffic flow model by another method. Here, we use finite difference method to solve the PDE (2.3) as a numerical solution [10] [11] . We consider our diffusion type traffic flow model with left and right boundary condition as an initial boundary value problem,
(4.1)
With initial condition
;
.
Boundary condition,
.
Where,
.
To solve the partial differential equation of the model numerically, we divide the domain in space using a mesh
and in time using a mesh
. Here, we consider a uniform partition both in space and time, so that the difference between two consecutive spatial (mesh) points will be ∆x and between two consecutive temporal (mesh) points will be ∆t, i.e.
And
.
For spatial non-uniform mesh:
Let,
are the spatial step size.
For spatial non-uniform mesh:
Let,
are the temporal step size.
Therefore,
4.1. Explicit Upwind Difference Scheme (FTBSCS)
To obtain this scheme, we discretize the time derivative
by forward difference formula, first order space derivative
by backward difference formula and
by the second-order central difference formula at any point
,
;
.
And considering
, we have,
(4.2)
(4.3)
(4.4)
Now, using (4.2), (4.3) and (4.4) in Equation (4.1), we obtain,
(4.5)
where,
.
And
.
Equation (4.5) is known as the explicit upwind difference scheme or FTBSCS scheme of diffusion type traffic flow model.
4.2. Explicit Centered Difference Scheme (FTCSCS)
To obtain this scheme, we discretize the time derivative
by forward difference formula, first order space derivative
by central difference formula and
by the second-order central difference formula at any point
,
;
.
And considering
, we have,
(4.6)
(4.7)
(4.8)
Using (4.6), (4.7) and (4.8) in (4.1), we obtain,
(4.9)
where,
.
And
.
Equation (4.9) is known as the explicit centered difference scheme or FTCSCS scheme of diffusion type traffic flow model.
4.3. Explicit Second-Order Lax-Wendroff Scheme with Exponential Velocity Density Relation
For explicit Lax-Wendroff scheme of diffusion type traffic flow model, we discretize the part
in half time step Lax-Friedrich scheme [12] , then we put that value in the half-step Leapfrog scheme and finally combining with the centered diffusion part, we get explicit second-order Lax-Wendroff scheme of diffusion type traffic flow model [13] .
To get Lax-Friedrich scheme, we discretize the time derivative
by forward difference formula, first order space derivative
by central difference formula and
by the second-order central difference formula at any point
,
;
and considering
, we have,
(4.10)
Equation (4.10) is known as Lax-Friedrich scheme.
Now, take half time step in Lax-Friedrich scheme, we have,
(4.11)
(4.12)
To get leapfrog scheme, we discretize both time derivative
and space derivative
by central difference formula,
(4.13)
Now, we take half time step Leapfrog scheme in (4.13), we get,
(4.14)
Using exponential velocity density relationship
in (4.14), we have,
(4.15)
This is known as the Leapfrogs scheme for half time step.
We use central difference formula for second-order space derivative
, we have,
(4.16)
Now, combining (4.15) and (4.16) and using (4.11) and (4.12), we will get the required Lax-Wendroff scheme for diffusion type traffic flow model,
(4.17)
where,
Scheme (4.17) is known as the Lax-Wendroff scheme diffusion-type traffic flow model with exponential velocity density relation.
5. Stability Condition of Numerical Schemes
By Von Neumann Stability analysis, we obtain the stability condition of explicit upwind, explicit centered and explicit second-order Lax-Wendroff scheme [14] [15] .
The Stability Condition of Explicit Upwind Difference Scheme is,
and
The Stability condition of explicit centered difference scheme,
and
And the stability condition of Lax-Wendroff scheme is,
and
where,
and
.
6. Numerical Simulation and Result Discussion
For the simulation of a diffusion-type traffic flow model using different schemes, we use the periodic initial and left boundary conditions [16] . For the right boundary condition, we use the Neumann boundary condition. For the spatial domain, we use [0, 10] in kilometers, we choose the maximum velocity of cars is
. We perform the numerical experiment for 3 minutes by taking temporal grid size 0.3 seconds spatial grid size 0.05 km and diffusion constant
.
(a)(b)
Figure 1. (a) Density profile and (b) Velocity profile using explicit upwind scheme.
(a)(b)
Figure 2. (a) Flux profile and (b) Relative error using explicit upwind difference scheme.
(a)(b)
Figure 3. (a) Density profile and (b) Velocity profile using explicit centered scheme.
(a)(b)
Figure 4. (a) Flux profile and (b) Relative error using explicit centered difference scheme.
(a)(b)
Figure 5. (a) Density profile and (b) Velocity profile using Lax-Wendroff scheme.
(a)(b)
Figure 6. (a) Flux profile and (b) Relative error using Lax-Wendroff scheme.
In Figures 1-6, we present numerical experiments of density, velocity and flux profile for 3 minutes or 180 seconds of diffusion type traffic flow model to visualize the behavior of density, velocity and flux with respect to space and time using explicit upwind, explicit centered and Lax-Wendroff schemes. We also computed the relative error of diffusion type traffic flow model by using each of the explicit upwind, explicit centered and Lax-Wendroff schemes. Here, we observe that each of the three schemes gives better flow with the progress of time. The relative error of diffusion type traffic flow model using these three schemes is pretty good.
7. Comparison among Explicit Upwind, Explicit Centered, and Lax-Wendroff Schemes
Under the assumption mentioned in 6, we present a comparison density profile using explicit upwind, explicit centered, and Lax-Wendroff schemes. We also present a comparison of relative error using these three schemes.
In Figure 7(a), we present a comparison of the density profile using explicit upwind, explicit centered, and Lax-Wendroff schemes. In this figure, the curve marked by “solid blue line” represent the density profile of Lax-Wendroff scheme, the curve marked by “green dashed line” represents the density profile of explicit centered difference scheme and the curve marked by “red solid line” represents the density profile of explicit upwind difference scheme. Here, we observe that
(a)(b)
Figure 7. Comparison of (a) Density profile and (b) Relative error using explicit upwind, explicit centered, and Lax-Wendroff scheme.
Lax-Wendroff scheme gives better solution than explicit upwind and explicit centered difference schemes.
In Figure 7(b), we present a comparison of relative error using explicit upwind, explicit centered, and Lax-Wendroff schemes. In this figure, the curve marked by “solid red line” represents the relative error using Lax-Wendroff scheme, the curve marked by “green dashed line” represents the relative error using explicit centered difference scheme and the curve marked by “magenta solid line” represents the relative error using explicit upwind difference scheme. Here, we observe that Lax-Wendroff scheme gives less error than explicit upwind and explicit centered difference schemes.
8. Conclusion
The numerical solution using explicit upwind, explicit centered, and Lax-Wendroff schemes is presented in our paper. From the comparison of density profiles using explicit upwind, explicit centered, and Lax-Wendroff schemes, it is seen that Lax-Wendroff gives better flow than explicit upwind and explicit centered difference schemes. From the comparison of relative error, we have seen that the Lax-Wendorff scheme gives less error than the explicit upwind and explicit centered difference schemes. So, from the numerical as well as analytical analysis and comparative result discussion, it can be concluded that the Lax-Wendroff scheme with exponential velocity-density relation of diffusion type traffic flow model is suitable for the congested area and shows a better fit in traffic-congested regions.