Numerical Simulation of Diffusion Type Traffic Flow Model Using Second-Order Lax-Wendroff Scheme Based on Exponential Velocity Density Function

Abstract

In order to control traffic congestion, many mathematical models have been used for several decades. In this paper, we study diffusion-type traffic flow model based on exponential velocity density relation, which provides a non-linear second-order parabolic partial differential equation. The analytical solution of the diffusion-type traffic flow model is very complicated to approximate the initial density of the Cauchy problem as a function of x from given data and it may cause a huge error. For the complexity of the analytical solution, the numerical solution is performed by implementing an explicit upwind, explicitly centered, and second-order Lax-Wendroff scheme for the numerical solution. From the comparison of relative error among these three schemes, it is observed that Lax-Wendroff scheme gives less error than the explicit upwind and explicit centered difference scheme. The numerical, analytical analysis and comparative result discussion bring out the fact 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.

Share and Cite:

Haque, M. , Sultana, M. and Andallah, L. (2023) Numerical Simulation of Diffusion Type Traffic Flow Model Using Second-Order Lax-Wendroff Scheme Based on Exponential Velocity Density Function. American Journal of Computational Mathematics, 13, 398-411. doi: 10.4236/ajcm.2023.133023.

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 v ( t , x ) , flux (traffic flow rate) q ( t , x ) and traffic density u ( t , x ) . All these parameters are functions of space, x and time, t + . This model is based on the conservation of mass and reads as,

u t + q x = 0 ; t > 0 , < x < (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,

u t + x ( q D u ) = 0 (2.2)

The term D u 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,

u x + q x = D 2 u x 2 ; t > 0 , < x < (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,

u t + q x = D 2 u x 2 ; t > 0 , < x < (3)

Initial condition,

u ( x , 0 ) = u 0 ( x ) ; a x b

By Cole-Hopf transformation, the analytical solution of diffusion type traffic flow model [9] is,

u ( t , x ) = D u max v max ( ln 1 4 π exp ( ( v max t x z ) 2 4 D v m D m 0 z u 0 ( x ) d x ) d )

where u 0 ( x ) = u ( 0 , x ) 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 D = 0 . In this case the analytical solution of diffusion type traffic flow model with linear velocity density relation is,

u ( t , x ) = u 0 ( x ( t ) v max ( 1 2 u u max ) t )

And with exponential velocity density relation the analytical solution in implicit form is,

u ( t , x ) = u 0 ( x ( t ) v max exp ( u u max ) ( 1 u u max ) t )

where u 0 ( x ) = u ( 0 , x ) 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,

u t + q x = D 2 u x 2 (4.1)

With initial condition u ( x , 0 ) = u 0 ( x ) ; a x b .

Boundary condition, u ( t , a ) = u a ( t ) ; t 0 t T u ( t , b ) = u b ( t ) ; t 0 t T .

Where, q ( u ) = u v max exp ( u u max ) .

To solve the partial differential equation of the model numerically, we divide the domain in space using a mesh x 0 , x 1 , x 2 , , x M and in time using a mesh t 0 , t 1 , t 2 , , t N . 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.

x j = x 0 + j Δ x , j = 0 , 1 , 2 , , M

And t n = t 0 + n Δ t , n = 0 , 1 , 2 , , N .

For spatial non-uniform mesh:

Let, Δ x j = x j + 1 x j , j = 0 , 1 , 2 , , M are the spatial step size.

For spatial non-uniform mesh:

Let, Δ t n = t n + 1 t n , n = 0 , 1 , 2 , , N are the temporal step size.

Therefore,

x j = x 0 + j Δ x , j = 0 , 1 , 2 , , M

t n = t 0 + n Δ t , n = 0 , 1 , 2 , , N

4.1. Explicit Upwind Difference Scheme (FTBSCS)

To obtain this scheme, we discretize the time derivative u t by forward difference formula, first order space derivative q x by backward difference formula and 2 u x 2 by the second-order central difference formula at any point ( t n , x j ) , j = 0 , 1 , 2 , , M 1 ; n = 0 , 1 , 2 , , N 1 .

And considering u ( t n , x j ) , we have,

u ( t n , x j ) t u j n + 1 u j n Δ t (4.2)

q ( t n , x j ) Δ x q j n q j 1 n Δ x (4.3)

2 u ( t n , x j ) x 2 u j + 1 n 2 u j n + u j 1 n ( Δ x ) 2 (4.4)

Now, using (4.2), (4.3) and (4.4) in Equation (4.1), we obtain,

u j n + 1 = u j n Δ t Δ x ( q j n q j 1 n ) + D Δ t ( Δ x ) 2 ( u j + 1 n 2 u j n + u j 1 n ) (4.5)

where, q j n = u j n v max exp ( u j n u max ) .

And q j 1 n = u j 1 n v max exp ( u j 1 n u max ) .

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 u t by forward difference formula, first order space derivative q x by central difference formula and 2 u x 2 by the second-order central difference formula at any point ( t n , x j ) , j = 0 , 1 , 2 , , M 1 ; n = 0 , 1 , 2 , , N 1 .

And considering u ( t n , x j ) , we have,

u ( t n , x j ) t u j n + 1 u j n Δ t (4.6)

q ( t n , x j ) x q j + 1 n q j 1 n 2 Δ x (4.7)

2 u ( t n , x j ) x 2 u j + 1 n 2 u j n + u j 1 n ( Δ x ) 2 (4.8)

Using (4.6), (4.7) and (4.8) in (4.1), we obtain,

u j n + 1 = u j n Δ t 2 Δ x ( q j + 1 n q j 1 n ) + D Δ t ( Δ x ) 2 ( u j + 1 n 2 u j n + u j 1 n ) (4.9)

where, q j 1 n = u j 1 n v max exp ( u j 1 n u max ) .

And q j + 1 n = u j + 1 n v max exp ( u j + 1 n u max ) .

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 u t + q x = 0 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 u t by forward difference formula, first order space derivative q x by central difference formula and 2 u x 2 by the second-order central difference formula at any point ( t n , x j ) , j = 0 , 1 , 2 , , M 1 ; n = 0 , 1 , 2 , , N 1 and considering u ( t n , x j ) = u j n , we have,

u j n + 1 = 1 2 ( u j + 1 ` n + u j 1 n ) Δ t 2 Δ x ( q j + 1 n q j 1 n ) (4.10)

Equation (4.10) is known as Lax-Friedrich scheme.

Now, take half time step in Lax-Friedrich scheme, we have,

u j + 1 2 n + 1 2 = 1 2 ( u j + 1 n + u j n ) Δ t 2 Δ x ( q j + 1 n q j n ) (4.11)

u j 1 2 n + 1 2 = 1 2 ( u j n + u j 1 n ) Δ t 2 Δ x ( q j n q j 1 n ) (4.12)

To get leapfrog scheme, we discretize both time derivative u t and space derivative q x by central difference formula,

u j n + 1 = u j n 1 Δ t Δ x ( q j + 1 n q j 1 n ) (4.13)

Now, we take half time step Leapfrog scheme in (4.13), we get,

u j n + 1 = u j n Δ t Δ x ( q j + 1 2 n + 1 2 q j 1 2 n + 1 2 ) . (4.14)

Using exponential velocity density relationship q = q ( u ) = u v exp ( u u max ) in (4.14), we have,

u j n + 1 = u j n v max Δ t Δ x ( u j + 1 2 n + 1 2 exp ( u j + 1 2 n + 1 2 u max ) u j 1 2 n + 1 2 exp ( u j 1 2 n + 1 2 u max ) ) (4.15)

This is known as the Leapfrogs scheme for half time step.

We use central difference formula for second-order space derivative 2 u x 2 , we have,

2 u ( t n , x j ) x 2 u j + 1 n 2 u j n + u j 1 n ( Δ x ) 2 (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,

u j n + 1 = u j n v max Δ t Δ x ( u j + 1 2 n + 1 2 exp ( u j + 1 2 n + 1 2 u max ) u j 1 2 n + 1 2 exp ( u j 1 2 n + 1 2 u max ) ) + u j + 1 n 2 u j n + u j 1 n ( Δ x ) 2 (4.17)

where,

u j + 1 2 n + 1 2 = 1 2 ( u j + 1 n + u j n ) Δ t 2 Δ x ( q j + 1 n q j n )

u j 1 2 n + 1 2 = 1 2 ( u j n + u j 1 n ) Δ t 2 Δ x ( q j n q j 1 n )

q j n = u j n v max exp ( u j n u max )

q j + 1 n = u j + 1 n v max exp ( u j + 1 n u max )

q j 1 n = u j 1 n v max exp ( u j 1 n u max )

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,

0 γ 1 and γ α 1 2 γ

The Stability condition of explicit centered difference scheme,

0 α 1 and 0 γ 1 2

And the stability condition of Lax-Wendroff scheme is,

0 γ 1 and 0 α 1

where, α = max ( max ( q ( u j n ) ) ) Δ t Δ x and γ = D Δ t ( Δ x ) 2 .

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 v max = 60 km / hours . 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 D = 0.1 Km 2 / Min .

(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.

Conflicts of Interest

The authors declare no conflicts of interest regarding the publication of this paper.

References

[1] Greenshields, B.D. (1934) A Study of Traffic Capacity. Highway Research Board, 14, 448-477.
[2] Lighthill, M.J. and Whitham, G.B. (1955) On Kinematics Waves II. A Theory of Traffic Flow on Long Crowded Roads. Proceedings of the Royal Society of London, Series A. Mathematical and Physical Sciences, 229, 317-345.
https://doi.org/10.1098/rspa.1955.0089
[3] Habermann, R. (1977) Mathematical Models: Mechanical Vibration, Population Dynamics and Traffic Flow. Prentice-Hall, Inc., Englewood Clifts, NJ.
[4] Lighthill, M.J. and Whitham, G.B. (1955) On Kinematics Waves I. Flood Movement in Long Rivers. Proceedings of the Royal Society of London, Series A. Mathematical and Physical Sciences, 229, 281-316.
https://doi.org/10.1098/rspa.1955.0088
[5] Payne, H.J. (1971) Models of Freeway Traffic and Control. In: Bekey, G.A., Ed., Mathematical Models of Public Systems, Vol. 1, Simulation Council, La Jolla, CA, 51-61.
[6] Khune, R. (1984) Macroscopic Freeway Model for Dense Traffic Stop-Start Waves and Incident Detection. 9th International Symposium on Transportation and Traffic Theory, Delft, 11-13 July 1984, 21-42.
[7] LeVeque, R.J. (1992) Numerical Method for Conservation Laws. 2nd Edition, Springer, Berlin.
[8] Daganzo, C.F. (1995) A Finite Difference Approximation of the Kinematic Wave Model of Traffic Flow. Transportation Research Part B: Methodologist, 29, 261-276.
https://doi.org/10.1016/0191-2615(95)00004-W
[9] Azam, T., Ali, S. and Andallah, L.S. (2011) An Analytical Method and a Numerical Scheme for the Solution of a Second Order Traffic Flow Model. International Journal of Mathematics and Mathematical Sciences, 26, 71-80.
[10] Gani, M.O., Hossain, M.M. and Andallah, L.S. (2011) A Finite Difference Scheme for a Fluid Dynamic Traffic Flow Model Appended with Two-Point Boundary Condition. Journal of Bangladesh Mathematical Society, 31, 43-52.
https://doi.org/10.3329/ganit.v31i0.10307
[11] Andallah, L.S., Ali, S., Gani, M.O., Pandit, M.K. and Akhter, J. (2008) A Finite Difference Scheme for a Traffic Flow Model Based on a Linear Velocity-Density Function. Jahangirnagar University Journal of Science, 32, 57-67.
[12] Hasan, M., Sultana, S., Andallah, L.S. and Azam, T. (2015) Lax-Friedrich Scheme for the Numerical Simulation of Traffic Flow Model Based on a Non-Linear Velocity-Density Relation. American Journal of Computational Mathematics, 5, 186-194.
https://doi.org/10.4236/ajcm.2015.52015
[13] Andallah, L.S. and Khatun, M.R. (2020) Numerical Solution of Advection-Diffusion Equation Using Finite Difference Schemes. Bangladesh Journal of Scientific and Industrial Research, 55, 15-22.
https://doi.org/10.3329/bjsir.v55i1.46728
[14] Azad, T.M.A.K. and Andallah, L.S. (2016) Stability Analysis of Finite Difference Schemes for an Advection-Diffusion Equation. Bangladesh Journal of Scientific Research, 29, 143-151.
https://doi.org/10.3329/bjsr.v29i2.32331
[15] Haque, M. and Andallah, L.S. (2020) Traffic Flow Simulation by Using Diffusion Type Mathematical Model Based on Exponential Velocity-Density Function. Master’s Thesis, Jahangirnagar University, Savar, 181 p.
[16] Kabir, M.H., Gani, M.O. and Andallah, L.S. (2010) Numerical Simulation of a Mathematical Traffic Flow Model Based on a Nonlinear Velocity-Density Function. Journal of Bangladesh Academy of Sciences, 34, 15-22.
https://doi.org/10.3329/jbas.v34i1.5488

Copyright © 2024 by authors and Scientific Research Publishing Inc.

Creative Commons License

This work and the related PDF file are licensed under a Creative Commons Attribution 4.0 International License.