1 Introduction

Traffic flow models are categorized according to how researchers perceive the flow of vehicles. The two main categorizations are microscopic and macroscopic models. The first-order, and second-order equations are the main classes of macroscopic models. The first-order model is oftentimes called the LWR equation. Some examples of micro models are the car-following, safe distance, optimal velocity, intelligent driver, and cellular automata models.

The microscopic family models the behavior of individual cars. Detailed information on each vehicle is outlined during the modeling processing. It considers quantities such as headway, spacing, and individual vehicle speed. The car-following model is one of the celebrated class of model under the microscopic branch. It had its inaugural offshoot from the research work by Pipes, who expressed the location of the nth vehicle as a function of the location of its immediate leading vehicle [33]. The Pipes car following model forms the root for almost all microscopic models [37]. Cellular automata are the fully discretized version of the earlier car-following models. Space, time and velocity are discretized as opposed to the discretization of only space and time in the former microscopic models [28]. The stochastic car-following model is the recent offshoot of microscopic models. Some theoretical analysis was presented on the single regime stochastic car-following model [39] and the multi regime car following model [43].

Macroscopic models do not explicitly consider detailed information on individual vehicles. Vehicular traffic is rather viewed as having some similarities with the flow of water in a pipe. Traffic is modeled as having continuum property. Macroscopic models aggregate micro traffic variables. Average speed, average flow, and traffic density are the three main macroscopic variables. The first-order equation by [29, 35] was formulated using these three quantities. Second-order models have other variables such as relaxation, anticipation, and diffusion including speed, density, and flow. The second-order model is constituted by a first-order equation plus a dynamic velocity equation.

A general dynamic velocity equation is expressed as:

$$\begin{aligned} \dfrac{\partial u }{\partial t} + u \dfrac{\partial u}{\partial x} = \dfrac{V(k)- u }{\tau } - \dfrac{c^{2}_{o}(k)}{k} \dfrac{\partial k}{\partial x} + c(k) \dfrac{\partial u}{\partial x} + \nu (k) \dfrac{\partial ^{2} u}{\partial x^{2}} \end{aligned}$$
(1)

u is the average traffic speed, k is the traffic density, V(k) is the equilibrium speed defined by the fundamental relation, \(c^{2}_{o}(k)\) is the anticipation rate, and \(\tau\) is the relaxation parameter. This parameter (\(\tau\)) determines how vehicles adapt their speed to the conditions associated with the fundamental diagram. The first term on the right-hand side of Eq. (1) is the relaxation term and the last is the diffusion term. The quantities: \(c_{o}(k), \ c(p), \ \text{ and } \nu (k)\) are the diverging points for second-order models. A tabular presentation of these model classes is elaborated in Table 1.

Table 1 Coefficients of the dynamic velocity equation for different models

These models began from a sequential inquiry by Payne and Whitham hence the hyphenated name Payne-Whitham or simply the PW model [31, 40]. Payne’s model was criticized for being anisotropic [7]. That is vehicles react to both the leader and the follower as opposed to the simple car-following models. Danganzo explained that second-order models have negative velocities. This was as a result of the discrepancies between the vehicle’s speed and the characteristics waves. This led to the development of anisotropic second-order models. Notable among these are the models by Zhang [46], Jiang-Wu-Zhu [20], and Aw-Rascle model [1].

Wu et al. [42] formulated a traveling wave approach to solving the Aw-Rascle model. The proposed model was solved numerically using the Lax-Friedrichs scheme. There was no substantial difference between the analytical solution and the proposed scheme. Second-order models are often identified with two characteristic waves, with one often faster than the vehicle’s speed. The traveling wave solution was able to reproduce this nonlinear phenomenon. Wu, independently obtained the asymptotic solution of the second-order model [41]. The model was discretized and solved using the fifth-order accurate finite difference WENO method. The author found no disparity between the analytical solution and the numerical solution. The paper further discusses the necessary and sufficient requirements for long moving vehicle cluster. As an alternative solution, the Aw-Rascle model was solved using the discontinues Galerkin method [4]. The authors compared their results to the LWR using the phenomenon of capacity drop.

On the standpoint of model development, a multi-lane and a multi-class version of the Payne-Whitham model were postulated by [13] and [2] respectively, with [27] introducing a generic version of second-order models. The generalized second-order model was later solved within a Lagrange coordinate system [25]. The discretized models were able to describe relevant physical processes. The authors [25] used the Godunov scheme to predict the behavior of vehicle packets along a given trajectory. Zawar and Gulliver [23] postulated a new macroscopic second-order model to characterize how traffic reacts and aligns itself to downstream conditions. Apart from the usual relaxation time, the authors introduced the transition term; the time for traffic to harmonize. They analyzed their model using discontinuous density function. The numerical scheme employed was the Roe decomposition method. Their proposed model seems to reveal extra relevant traffic characteristics. Recently, the PW model was again extended to account for driver physiological response [24] and driver presumption [45]. Taking one step further back in time, [16] developed a two-dimensional version of higher-order models. The Aw-Rascle-Zhang model was reformulated to account for lane-changing maneuvering. The authors used the same ideology as the two-dimensional LWR model [15]. The model was able to characterize some features of a multilane flow but was not intended for multi-lane traffic. A macroscopic model that incorporates both PDE and ODE was developed to describe how a platoon of vehicles reacts to its neighboring traffic [32]. This model was solved as a Riemann problem using a finite difference scheme.

However, all these existing classes of models have overlooked a pragmatic traffic feature in modeling vehicular flow. Hence, the basis for this activity. In specific, this research extends the classical PW model to a two-dimensional layout to account for a lateral traffic feature; velocity differential with viscosity. With the introduction of this lateral feature, we move from the exiting one-dimensional space into a two-dimensional spatial domain. The graphical representation (Fig. 1) is used to simplify this conceptualization.

Fig. 1
figure 1

Multilane highway scenario

Figure 1 is limited to only four lanes, nonetheless, this could also be extended to an infinitely countable number of lanes. Each of these lanes has its designated speed limits. This respective lane speed suggests the presence of velocity changes from concurrent driving on adjacent lanes. From [19], these speed differential brings into the scene viscosity. The intent of developing a mathematical equation that captures this lateral phenomenon is the focus of this paper.

In the next section, we explain how a new dynamic velocity equation is derived from a simplified Navier-Stokes equation. The characteristic wave properties and the instability condition are discussed in Sect. 3. The simulation results of the proposed continuum model and the discrete model are presented in Sects. 4 and 5 respectively. In each case, the numerical scheme and some graphical illustrations are presented. The paper is concluded in Sect. 6.

2 The model derivation

A second-order traffic flow model consists of two systems of partial differential equations; the continuity equation and the momentum equation.

The two-dimensional continuity equation is derived using the conservation principle. That is, the rate of accumulation equals the rate of inflow minus the rate of outflow. From [19, 38], the three-dimensional continuity equation is given as

$$\begin{aligned} \dfrac{\partial k}{\partial t} + \dfrac{\partial ku}{\partial x} + \dfrac{\partial kv }{\partial y} + \dfrac{\partial kw}{\partial z} =0 \end{aligned}$$
(2)

For two-dimensional analysis, the last term on the left-hand side of Eq. (2) is assumed to be zero, thus (2) reduces to

$$\begin{aligned} \dfrac{\partial k}{\partial t} + \dfrac{\partial k u}{\partial x} + \dfrac{\partial k v}{\partial y} =0 \end{aligned}$$
(3)

Equation (1) could be interpreted as multilane traffic with the flow along the x-direction and lane changing along the y-direction. There is no direct vehicular movement along the \(y-\)axis. As such, the speed along the y-direction would be zero. Vehicles only move along the x-direction with a velocity differential along the y-direction. With \(v= 0\), we have

$$\begin{aligned} {\dfrac{\partial k}{\partial t} + \dfrac{\partial k u}{\partial x} =0} \end{aligned}$$
(4)

Equation (4) is the continuity or LWR equation.

On the other hand, our new momentum equation is derived from the simplified Navier-Stokes equation [38].

In this derivation, we assume that gravitational force and pressure terms have zero contribution to flow. Again, for two spatial domains the speed \(w=0\). Thus, the classical Navier-Stokes equation reduces to

$$\begin{aligned} k \left( \dfrac{\partial u }{\partial t} + u \dfrac{\partial u}{\partial x} + v \dfrac{\partial u }{\partial y} \right) = \mu \left( \dfrac{\partial ^{2} u }{\partial x^{2} } + \dfrac{\partial ^{2} u }{\partial y^{2} } \right) \end{aligned}$$
(5a)
$$\begin{aligned} k \left( \dfrac{\partial v }{\partial t} + u \dfrac{\partial v}{\partial x} + v \dfrac{\partial v }{\partial y} \right) = \mu \left( \dfrac{\partial ^{2} v }{\partial x^{2} } + \dfrac{\partial ^{2} v }{\partial y^{2} } \right) \end{aligned}$$
(5b)

As emphasized earlier, there is no direct flow along the y-direction, hence the velocity along the y-direction and all its derivatives go to zero. Thus, (5) is simplified as:

$$\begin{aligned} \dfrac{\partial u }{\partial t} + u \dfrac{\partial u}{\partial x} = \dfrac{\mu }{k} \dfrac{\partial ^{2} u }{\partial x^{2} } + \dfrac{\mu }{k} \dfrac{\partial ^{2} u }{\partial y^{2} } \end{aligned}$$
(6)

\(\mu\) is the coefficient of viscosity, u the velocity along the x-direction, k the density of the traffic. \({\partial ^{2} u }/{\partial x^{2} }\) is traffic diffusive term. Here, it is assumed to be zero. Moreover, the lateral term \({\mu }{\partial ^{2} u }/{k \partial y^{2} }\) is decomposed to specifically address the speed differential across these lanes. The second derivative term is defined to be a constant \(f_{y}\) times a first derivative function. Ansatz

$$\begin{aligned} \dfrac{\partial ^{2}u }{\partial y^{2}} \equiv f_{y} \dfrac{\partial u }{\partial y} \end{aligned}$$
(7)

This is done to explicitly model the velocity differentials at a given cross-section of the road. The expression \({\partial u}/{\partial y}\) is the lateral velocity gradient. \(f_{y}\) is assumed to be a sensitivity function for lane changing. This term is modeled in correspondence to the sensitivity term in lane changing models [36]. This will account for the safe vertical distance between vehicles on a multilane road. Again, since there is a negative relationship between viscosity and flow, it is conventional to introduce this as part of the model to avoid changing signs. These mathematical assumptions reduce the momentum equation to the form

$$\begin{aligned} \dfrac{\partial u }{\partial t} + u \dfrac{\partial u}{\partial x} = -\dfrac{\mu f_{y} }{k} \dfrac{\partial u }{\partial y } \end{aligned}$$
(8)

This dynamic velocity equation (8) will be coupled with the continuity equation (4) to form the viscous macroscopic second-order vehicular traffic flow model. Nonetheless, this new model (8) is devoid of the driver-anticipation-relaxation term. The absence of these terms could lead to vehicles colliding with each other. In other to overcome this shortcoming, the anticipation term \({c_{o}^{2}}{\partial k}/{k \partial x}\) and relaxation term \(({V(k)- u })/{\tau }\) are directly adopted from the PW model [31, 40]. These modifications lead to the proposed viscous model as

$$\begin{aligned} \dfrac{\partial k}{\partial t} + \dfrac{\partial k u}{\partial x}= & {} 0 \end{aligned}$$
(9a)
$$\begin{aligned} \dfrac{\partial u }{\partial t} + u \dfrac{\partial u}{\partial x}= & {} \dfrac{V(k)- u }{\tau } - \dfrac{\mu f_{y}}{k} \dfrac{\partial u }{\partial y} - \dfrac{c_{o}^{2}}{k} \dfrac{\partial k}{\partial x} \end{aligned}$$
(9b)

The relaxation term enforces the system to its steady-state and the anticipation term describes how drivers respond to traffic density. The relaxation time \(\tau\) determines how quick vehicles can adapt its velocity to a variable traffic phenomenon. The anticipation rate \(c_{o}\) determines how drivers react to the density of the traffic.

3 Qualitative properties of the proposed model

3.1 Characteristic wave profiles

To study the behavior of this model, it is most appropriate if it is expressed in its characteristic form. The system of equations (9) is expressed in a quasi-linear equation form as:

$$\begin{aligned} \dfrac{\partial }{\partial t} \begin{bmatrix} k \\ u \\ \end{bmatrix} + \begin{bmatrix} u &{} k \\ {c_{o}^{2}}/{k} &{} u \\ \end{bmatrix} \dfrac{\partial }{\partial x} \begin{bmatrix} k \\ u \\ \end{bmatrix} =\begin{bmatrix} 0 \\ \dfrac{V(k)-u}{\tau } - \dfrac{\mu f_{y}}{k} \dfrac{\partial u }{\partial y} \end{bmatrix} \end{aligned}$$
(10)

letting \(\phi =[k \quad u]^{'}\), then Eq. (10) becomes

$$\begin{aligned} \dfrac{\partial \phi }{\partial t} +A(\phi ) \dfrac{\partial \phi }{\partial x} =B(\phi ) \end{aligned}$$
(11)

where \(A(\phi )= \bigl [ {\begin{matrix} u &{} k \\ {c_{o}^{2}}/{k} &{} u \\ \end{matrix}}\bigr ]\) and \(B(\phi )= \bigl [ {\begin{matrix} 0 \\ {(V(k)-u})/{\tau } - {u_{y}\mu f_{y}}/{k} \end{matrix}} \bigr ]\).

The motive is to diagonalize the matrix \(A(\phi ) = \bigl [ {\begin{matrix} u &{} k \\ {c_{o}^{2}}/{k} &{} u \end{matrix}}\bigr ]\) by computing its eigenvalues and eigenvectors. The eigenvalues are obtained as follows: \(A- \lambda I = \bigl [ {\begin{matrix} u- \lambda &{} k \\ {c_{o}^{2}}/{k} &{} u- \lambda \end{matrix}} \bigr ] = 0\).

where \((u- \lambda )^{2}-c_{o}^{2}=0. \qquad \implies \, u- \lambda = \pm c_{o}. \qquad \implies \, \lambda _{1,2}= u \pm c_{o}\).

The eigenvalues represent the characteristic speeds of the model. That is

$$\begin{aligned} \dfrac{d x_{1}}{d t} = u + c_{o} \quad \text{ and } \quad \dfrac{d x_{2}}{d t} = u - c_{o} \end{aligned}$$

It is clear from these eigenvalues that the wave speed may either be greater or less than the vehicle’s speed. This is an indication that information from behind may sometimes influence driving behavior. This isotropic property of vehicular movements is common among ‘trotro’ drivers in Ghana. The vehicle speed of a given trotro driver is often influenced by both leading and trailing vehicles. Trotro are minivans that offer short and averagely long transport services for urban dwellers in Ghana. Trotro operate as the first-driver-arrive first-passenger-board system. Passengers wait along any section of the road to board vehicles. Therefore, drivers compete among themselves for the passengers by focusing both on leading and trailing vehicles.

3.2 Instability condition

In this section, we determine the instability criterion of the proposed model. The model (9) is first linearised in other to determine the conditions that will yield a steady flow and unstable traffic otherwise. From (9), the model is linearized as:

$$\begin{aligned} \dfrac{\partial (\delta k)}{\partial t} + u_{e} \dfrac{\partial (\delta k)}{\partial x} + k_{e} \dfrac{\partial (\delta u)}{\partial x} \, = \, & {} 0 \end{aligned}$$
(12a)
$$\begin{aligned} \dfrac{\partial (\delta u)}{\partial t} + u_{e} \dfrac{\partial (\delta u)}{\partial x} + \dfrac{c_{o}^{2}}{k_{e}} \dfrac{\partial (\delta k)}{\partial x}= & {} \dfrac{1}{\tau } \left( \dfrac{dV}{dk} \cdot \delta k - \delta u \right) - \dfrac{\mu f_{y}}{k_{e}} \dfrac{\partial (\delta u)}{\partial y} \end{aligned}$$
(12b)

\(k_{e}, \text{ and } u_{e} = V(k_{e})\) are the solution states for density and speed. Following [14], a small variation from the equilibrium will result in:

$$\begin{aligned} k(x,y,t)&=k_{e} + \delta k (x,y,t) \\ u (x,y,t)&=u_{e} + \delta u (x,y,t) \end{aligned}$$

The general solution to \(\delta k\) and \(\delta u\) can be expressed as the series below [14, 18].

$$\begin{aligned} \begin{aligned} \delta (k)&= \int _{z}\int _{s} \sum _{j}k_{j}^{*}(s,z) \exp \left\{ i\left( sx +zy \right) + \left[ \lambda _{j}(k_{e},s,z) - i \omega _{j}(k_{e},s,z) \right] t \right\} ds dz\\ \delta (u)&= \int _{z}\int _{s} \sum _{j}u_{j}^{*}(s,z) \exp \left\{ i\left( sx +zy \right) + \left[ \lambda _{j}(k_{e},s,z) - i \omega _{j}(k_{e},s,z) \right] t \right\} ds dz \end{aligned} \end{aligned}$$
(13)

This series can be decomposed into several simple wave function. The underlying simple wave equations (14) are chosen to help determine the condition that will cause traffic flow to breakdown.

$$\begin{aligned} \begin{aligned} \delta k(x,t)&= k_{*} \exp [isx + izy + (\lambda -i \omega )t ] = k_{*} e^{\lambda t} e^{i(sx + zy - \omega t)} \\ \delta u(x,t)&= u_{*} \exp [isx + izy + (\lambda -i \omega )t ] = u_{*} e^{\lambda t} e^{i(sx + zy- \omega t)} \end{aligned} \end{aligned}$$
(14)

s and z are the wave numbers with respect to the x and y coordinates with their corresponding wavelength \(2\pi / s\) and \(2 \pi /z\). \(\omega\) is the wave frequency, \(k_{*} e^{\lambda t}, u_{*} e^{\lambda t}\) are amplitudes at time t, whereas \(\lambda\) is the growth rate (wave dumping). It is imperative to note that a small variation in \(\lambda\) will lead to traffic jams when \(\lambda > 0\). For \(\lambda <0\), a small variation will lead to model stability.

Based on Eq. (14) and its derivatives we have the continuity equation as:

$$\begin{aligned}&k_{*} (\lambda -i\omega ) e^{\lambda t} e^{i(sx + zy - \omega t)} + u_{e} is k_{*} e^{\lambda t} e^{i(sx + zy - \omega t)} + k_{e} is u_{*} e^{\lambda t} e^{i(sx + zy - \omega t)} = 0 \end{aligned}$$
(15a)
$$\begin{aligned}&\text{ and } \text{ the } \text{ dynamic } \text{ continuity } \text{ equation } \text{ as } \nonumber \\&u_{*}(\lambda - i \omega ) e^{\lambda t} e^{i(sx + zy - \omega t)} + u_{e} is u_{*} e^{\lambda t} e^{i(sx + zy - \omega t)} + \dfrac{c_{o}^{2}}{k_{e}} is k_{e} e^{\lambda t} e^{i(sx + zy - \omega t)} = \nonumber \\&\dfrac{1}{\tau } \left( \dfrac{dV}{dk}k_{*} e^{\lambda t} e^{i(sx + zy - \omega t)} - u_{*}e^{\lambda t} e^{i(sx + zy - \omega t)} \right) - i \dfrac{\mu f_{y}}{k_{e}} z u_{*} e^{\lambda t} e^{i(sx + zy - \omega t)} \end{aligned}$$
(15b)

Since \(e^{\lambda t} e^{i(sx + zy - \omega t)}\) is not equal to zero, Eq. (15) is expressed in matrix form as:

$$\begin{aligned} \begin{bmatrix} \lambda - i \omega + u_{e} is &{} k_{e} is \\ \dfrac{c_{o}^{2}}{k_{e}} is - \dfrac{1}{\tau } \dfrac{dV}{dk}&{} \qquad \lambda - i \omega + u_{e}is + \dfrac{1}{\tau } + i \dfrac{\mu f_{y}}{k_{e}} z \end{bmatrix}\begin{bmatrix} k_{*} \\ u_{*} \end{bmatrix} = 0 \end{aligned}$$
(16)

simplified as

$$\begin{aligned} \begin{bmatrix} \tilde{\lambda } &{} k_{e} is \\ \dfrac{c_{o}^{2}}{k_{e}} is - \dfrac{1}{\tau } \dfrac{dV}{dk}&{} \qquad \tilde{\lambda } + \dfrac{1}{\tau } +i \dfrac{\mu f_{y}}{k_{e}} z \end{bmatrix}\begin{bmatrix} k_{*} \\ u_{*} \end{bmatrix} = 0 \end{aligned}$$
(17)

where the following abbreviations have been used: \(\tilde{\lambda } = \lambda - i \tilde{\omega }\) and \(\tilde{\omega } = \omega - u_{e} s\). The above (17) result to the following characteristic polynomial:

$$\begin{aligned} \tilde{\lambda }^{2} + \tilde{\lambda }\left( \dfrac{1}{\tau } + i \dfrac{\mu f_{y}}{k_{e}} z \right) + c_{o}^{2}s^{2} + is k_{e} \dfrac{1}{\tau } \dfrac{dV}{dk} = 0 \end{aligned}$$

The solution to the characteristic polynomial is obtained using:

$$\begin{aligned} \dfrac{-b \pm \sqrt{b^{2}- 4ac} }{2a} \quad = \dfrac{-b}{2} \pm \sqrt{\dfrac{b^{2}}{4} - \dfrac{4c}{4} } \quad = \dfrac{-b}{2} \pm \sqrt{ \left( \dfrac{b}{2}\right) ^{2} - c} \end{aligned}$$

In that case

$$\begin{aligned} \tilde{\lambda }_{1,2} = \left( - i \dfrac{\mu f_{y}}{2 k_{e}} z - \dfrac{1}{2\tau } \right) \pm \sqrt{\dfrac{1}{4 \tau ^{2}} - \left( \dfrac{\mu f_{y} z}{2 k_{e}}\right) ^{2}- c_{o}^{2}s^{2} + i \left( \dfrac{\mu f_{y} z}{2 \tau k_{e}} -s k_{e} \dfrac{1}{\tau } \dfrac{dV}{dk} \right) } \end{aligned}$$

and

$$\begin{aligned} \tilde{\lambda }_{1,2} = \left( - i \dfrac{\mu f_{y}}{2 k_{e}} z - \dfrac{1}{2\tau } \right) \pm \sqrt{\mathcal {R} \pm i |\mathcal {I}|} \end{aligned}$$
(18)

where the real and imaginary term under the square root are \(\mathcal {R} = \dfrac{1}{4 \tau ^{2}} - \left( \dfrac{\mu f_{y} z}{2 k_{e}}\right) ^{2}- c_{o}^{2}s^{2}\)    and    \(\mathcal {I} = s k_{e} \dfrac{1}{\tau } \left| \dfrac{dV}{dk}\right| + \dfrac{\mu f_{y} z}{2 \tau k_{e}}\) respectively.

Following from [14], the term on the extreme right of Eq. (18) can be expanded as:

$$\begin{aligned} \sqrt{ \mathcal {R} \pm i |\mathcal {I}|} = \left\{ \dfrac{1}{2} \left( \sqrt{\mathcal {R}^{2} + \mathcal {I}^{2}} + \mathcal {R} \right) \right\} ^{\tfrac{1}{2}} \pm i \left\{ \dfrac{1}{2} \left( \sqrt{\mathcal {R}^{2} + \mathcal {I}^{2}} - \mathcal {R} \right) \right\} ^{\tfrac{1}{2}} \end{aligned}$$
(19)

Therefore, Eq. (18) can be written in the following form:

$$\begin{aligned} \tilde{\lambda }_{1,2} = \left( - i \dfrac{\mu f_{y}}{2 k_{e}} z - \dfrac{1}{2\tau } \right) \pm \left[ \left\{ \dfrac{1}{2} \left( \sqrt{\mathcal {R}^{2} + \mathcal {I}^{2}} + \mathcal {R} \right) \right\} ^{\tfrac{1}{2}} \pm i \left\{ \dfrac{1}{2} \left( \sqrt{\mathcal {R}^{2} + \mathcal {I}^{2}} - \mathcal {R} \right) \right\} ^{\tfrac{1}{2}} \right] \end{aligned}$$

The real part of the characteristic equation above can be uncoupled as

\(\mathcal {RE}({\tilde{\lambda }_{1}}) = - \dfrac{1}{2\tau } + \left\{ \dfrac{1}{2} \left( \sqrt{\mathcal {R}^{2} + \mathcal {I}^{2}} + \mathcal {R} \right) \right\} ^{\tfrac{1}{2}}\) and

\(\mathcal {RE}({\tilde{\lambda }_{2}}) = - \dfrac{1}{2\tau } - \left\{ \dfrac{1}{2} \left( \sqrt{\mathcal {R}^{2} + \mathcal {I}^{2}} + \mathcal {R} \right) \right\} ^{\tfrac{1}{2}}\)

The viscous PW model is unstable if the real part of the dumping factors \(\mathcal {RE}(\tilde{\lambda }_{1,2} )\) is greater than zero. Since \(\mathcal {RE}(\tilde{\lambda }_{1} ) > \mathcal {RE}(\tilde{\lambda _{2}})\), if the real part of the dumping element \(\mathcal {RE}(\tilde{\lambda }_{1} )\) is less than zero, then the stability criterion holds automatically for the other term \(\mathcal {RE}(\tilde{\lambda }_{2} )\). By definition \(\mathcal {RE}(\tilde{\lambda }_{1} )\) should be less than zero for the model to be stable. That is

$$\begin{aligned}&- \dfrac{1}{2\tau } + \left\{ \dfrac{1}{2} \left( \sqrt{\mathcal {R}^{2} + \mathcal {I}^{2}} + \mathcal {R} \right) \right\} ^{\tfrac{1}{2}} \le 0\\&\dfrac{\mathcal {R}^{2}}{4} + \dfrac{\mathcal {I}^{2}}{4} \le \dfrac{1}{16 \tau ^{4}} - \dfrac{\mathcal {R}}{4 \tau ^{2}} + \dfrac{\mathcal {R}^{2}}{4} \end{aligned}$$

Clearly

$$\begin{aligned} \mathcal {I}^{2} \le \dfrac{1}{4 \tau ^{4}} - \dfrac{\mathcal {R}}{ \tau ^{2}} \end{aligned}$$
(20)

In antecedent, it was affirmed that \(\mathcal {R} = \dfrac{1}{4 \tau ^{2}} - \left( \dfrac{\mu f_{y} z}{2 k_{e}}\right) ^{2}- c_{o}^{2}s^{2}\)    and    \(\mathcal {I} = s k_{e} \dfrac{1}{\tau } \left| \dfrac{dV}{dk}\right| + \dfrac{\mu f_{y} z}{2 \tau k_{e}}\). A direct substitution of these terms into Eq. (20) will produce the inequality:

$$\begin{aligned} \left( s k_{e} \dfrac{1}{\tau } \left| \dfrac{dV}{dk}\right| + \dfrac{\mu f_{y} z}{2 \tau k_{e}} \right) ^{2} \le \dfrac{1}{4 \tau ^{4}} - \dfrac{1}{ \tau ^{2}} \left[ \dfrac{1}{4 \tau ^{2}} - \left( \dfrac{\mu f_{y} z}{2 k_{e}}\right) ^{2}- c_{o}^{2}s^{2} \right] \end{aligned}$$

Expanding

$$\begin{aligned} \left( \dfrac{ \mu f_{y} z}{2 \tau k_{e}}\right) ^{2} + \dfrac{\mu f_{y} z}{\tau k_{e}} \cdot s k_{e} \dfrac{1}{\tau } \left| \dfrac{dV}{dk}\right| + \left( s k_{e} \dfrac{1}{\tau } \left| \dfrac{dV}{dk}\right| \right) ^{2} < \left( \dfrac{ \mu f_{y} z}{2 \tau k_{e}}\right) ^{2} + \dfrac{c_{o}^{2}s^{2}}{\tau ^{2}} \end{aligned}$$

and canceling out the common terms, we have

$$\begin{aligned} {\mu f_{y}} \dfrac{z}{s} \left| \dfrac{dV}{dk}\right| + \left( k_{e} \left| \dfrac{dV}{dk}\right| \right) ^{2} < c_{o}^{2} \end{aligned}$$

For the PW formulation \(c_{o}^{2} = -\frac{1}{2 \tau } \frac{dV}{dk} = \frac{1}{2 \tau } \left| \frac{dV}{dk}\right|\), hence

$$\begin{aligned} \left| \dfrac{dV}{dk}\right| \left[ {\mu f_{y} \dfrac{z}{s}} + \left| \dfrac{dV}{dk}\right| k_{e}^{2} - \dfrac{1}{2 \tau } \right] < 0 \end{aligned}$$

Thus, the condition to attain stable traffic flow is given by the inequality

$$\begin{aligned} { \left| \dfrac{dV}{dk}\right| k_{e}^{2} < \dfrac{1}{2 \tau } - {\mu f_{y} } \dfrac{z}{s}} \end{aligned}$$
(21)

The established condition provides an acceptable conclusion for oscillatory traffic and jam formation in actual traffic scenarios. This second-order viscous macroscopic model is stable when the changes in speed with respect to density is arbitrarily small. This is often realized during light and highly dense traffic. Again, the role of the lateral term in this stability criterion is appropriated by the joint impact of the viscosity and sensitivity rates.

4 Single piped model analysis

4.1 Numerical scheme

The explicit finite difference scheme is used to solve the viscous macroscopic model. This scheme is proven to be stable and consistent with PW formulations [6, 10]. The model is simulated using a Riemann initial condition. To solve the modified model as a Riemann problem, the following piecewise initial condition is adopted:

$$\begin{aligned} K(x,0) = {\left\{ \begin{array}{ll} k_{l}, &{} \text{ if } x> \alpha \\ k_{r}, &{} \text{ if } x< \alpha \quad , \end{array}\right. } \qquad U(x,0) = {\left\{ \begin{array}{ll} u_{l}, &{} \text{ if } x > \alpha \\ u_{r}, &{} \text{ if } x < \alpha \end{array}\right. } \end{aligned}$$
(22)

There is a single discontinuity at the point \(x = \alpha\). This is chosen to explain important traffic phenomenon such as traffic shocks, which is known to be a problem in traffic modeling [7]. This model can be classified to be appropriate if it can explicate this nonlinear traffic property. \(k_{l}\) and \(k_{r}\) are the densities upstream and downstream of a bottleneck respectively. The upstream and downstream speeds are also denoted by \(u_{l}\) and \(u_{r}\).

The main variables involved with the numerical simulation are: the velocity \((u_{i}(j))\); the density of a given stretch \((k_{i}(j))\); and the flow rate \((q_{i}(j))\). From the Greenshields fundamental relation

$$\begin{aligned} q_{i}(j) = k_{i}(j) \cdot u_{i}(j) \end{aligned}$$

The quantities i and l are used to denote the longitudinal and lateral positions on the specified highway, time is discretized using \(J = j \in \mathbb {N}\), the spatial intervals are \(\Delta x\) and \(\Delta y\), with \(\Delta t\) as the time step. Hence, the discrete version of the continuity equation is expressed as

$$\begin{aligned} k_{i}(j+1) = k_{i}(j) + \dfrac{\Delta t}{\Delta x} u_{i}(j) \left[ k_{i-1}(j) - k_{i}(j) \right] + \dfrac{\Delta t}{\Delta x} k_{i}(j) \left[ u_{i}(j) - u_{i+1}(j) \right] \end{aligned}$$
(23)

With this continuum case, the lateral speed gradient is modeled analogously to Pipes lane changing model. Following from [34], we define the lateral speed differential terms as

$$\begin{aligned} \dfrac{\partial u}{\partial y} = u^{l+1} - u^{l} \end{aligned}$$
(24)

where \(u^{l+1}\) is the velocity of a given vehicle on lane \(l+1\), and \(u^{l}\) is the velocity of the adjacent vehicle on lane l. Hence, the dynamic velocity equation is discretized as

$$\begin{aligned} u_{i}(j+1) \, = \, & {} u_{i}(j)+ \dfrac{\Delta t}{\Delta x} u_{i}(j)\left( u_{i-1}(j)- u_{i}(j) \right) - \dfrac{\Delta t}{\Delta y} \dfrac{\mu \cdot f_{y} }{k_{i}(j)} \left( u^{l+1} - u^{l} \right) + \nonumber \\&\quad \dfrac{\Delta t}{\tau }\left( V_{i}(j) - u_{i}(j)\right) - \dfrac{\Delta t}{\Delta x}\dfrac{c_{o}^{2}}{k_{i}(j) + \chi } \left( k_{i+1}(j)- k_{i}(j) \right) \end{aligned}$$
(25)

where \(i \in \mathbb {N}, \; l \in \mathbb {R}^{+}\) and \(j \in \mathbb {W}\). The parameter \(\chi\) is added to capture the inaccuracies for modeling an empty road [10, 30]. From Eqs. (23) and (25) we can determine the values of speed and density at time step \(j+1\) given the values at time j.

The scheme is numerically stable if it satisfies the underlying Courant-Friedrichs-Lewy (CFL) condition [6].

$$\begin{aligned} \max \left\{ v_{max}, q'(k) \right\} \cdot \dfrac{\Delta t}{\Delta x} \le 1 \end{aligned}$$
(26)

We also adopt the following equilibrium velocity-density relationship (27) from [8, 11].

$$\begin{aligned} V_{i}(j) = v_{max} - v_{max}*\exp {\left[ 1- \exp {\left( \dfrac{c_{m}}{v_{max}} \left( \dfrac{k_{max}}{k_{i}(j)}\right) -1 \right) } \right] } \end{aligned}$$
(27)

The parameter \(c_{m}\) is the speed of the kinematic wave during congestion.

4.2 Numerical illustrations

The simulation time is 15 minutes, with a time step of four seconds. The spatial step size is 400m for a total road length of 40km. Density is standardized with \(k_{max} = 1\). The assumed lateral gradient constant is 5.55m/s in absolute terms as derived from [3]. Inter-lane sensitivity \(f_{y} = 0.37 s\) [36]. We model the shear viscosity as analogous to that of a normal fluid, with \(0.0< \mu < 1.0\). The other parameter values that have been used in the simulation work is shown in Table 2 [6, 12].

Table 2 Parameter Values

The graphical results mimic shock and rarefaction wave profiles for realistic traffic. From Fig. 2, we observe moderately dense traffic upstream catching up with a denser traffic downstream. A closely related real case is when the traffic turns red.

Fig. 2
figure 2

Shock waves under the Riemann initial conditions \(k_{l} = 0.6\) and \(k_{r} = 0.9\)

There is the formation of queues with a jam density downstream of the shock.

Figure 3 is an exemplification of a near to stop traffic catching up with fairly moving traffic. The queue dissolves gradually, however, vehicles cannot move at their maximum speed limits (20m/s) .

Fig. 3
figure 3

Rarefaction waves under the Riemann initial conditions \(k_{l} = 1\) and \(k_{r} = 0.7\)

Increasing the viscous rate, the flow rate decreases as well. We can observe a negative relationship between viscosity and the flow rate. A smaller viscosity value ensures free-flowing traffic, while a viscosity value greater than unity causes the traffic to breakdown. The stability condition (21) also affirms this. From 4, we can observe that though traffic has not attained maximum density, the speed of vehicles drops below 2m/s.

Fig. 4
figure 4

Waves profiles under the Riemann initial conditions \(k_{l} = 0.6\) and \(k_{r} = 0.3\) for \(\mu = 0.7\)

In summary, the simulation results for the viscous macroscopic model are consistent with the day to day traffic phenomenon on our roads. There is the formation of shock waves from a frontal bottleneck, which is a free-flow traffic coinciding with a traffic jam. We also observe rarefaction waves moving from a congested traffic regime to a free-flow regime.

5 Multilane analysis

Macroscopic traffic models for multilane flow have been explained independently from one lane to the other. In the past, most researchers focused on a maximum of two independent lanes. In 2012, [5] extended the famous Nagel-Schrenkenberg cellular automata model to multilane. In their analysis, they restricted themselves to only two lanes. A similar two-independent one-lane model analysis was performed by [21] and [9]. Another multilane analysis was performed using the LWR model [17]. Here, we present a new formulation which takes into account the inter-lane-dependency among finitely countable many lanes each having specific speed and density profiles. The model can be expressed as:

$$\begin{aligned} \dfrac{\partial k^{l}}{\partial t} + \dfrac{\partial q^{l}}{\partial x}\;=\; & {} 0 \end{aligned}$$
(28a)
$$\begin{aligned} \dfrac{\partial u^{l}}{\partial t} + u^{l} \dfrac{\partial u^{l}}{\partial x}= & {} \dfrac{V(k^{l})- u^{l} }{\tau } -\dfrac{\mu f_{y}}{k^{l}} \dfrac{\partial u^{l} }{\partial y} - \dfrac{c_{o}^{2}}{k^{l}} \dfrac{\partial k^{l}}{\partial x} \end{aligned}$$
(28b)

l is the given lane index. \(q^{l}, k^{l}\) and \(u^{l}\) are the flow rate, density, and speed for the lth lane. These variable are related by the functional

$$\begin{aligned} q^{l} = k^{l} \cdot u^{l} \end{aligned}$$
(29)

5.1 Model discretization

The explicit finite difference scheme is again used to solve (28). Given the viscous model, (28a) can be discretized as

$$\begin{aligned} k_{i}^{l}(j+1) = k_{i}^{l}(j) + \dfrac{\Delta t}{\Delta x} u_{i}^{l}(j) \left[ k_{i-1}^{l}(j) - k_{i}^{l}(j) \right] + \dfrac{\Delta t}{\Delta x} k_{i}^{l}(j) \left[ u_{i}^{l}(j) - u_{i+1}^{l}(j) \right] \end{aligned}$$
(30)

while (28b) gives

$$\begin{aligned} u_{i}^{l}(j+1) = u_{i}^{l}(j)+ \dfrac{\Delta t}{\Delta x} u_{i}^{l}(j)\left( u_{i-1}^{l}(j)- u_{i}^{l}(j) \right) + \dfrac{\Delta t}{\Delta y} \dfrac{\xi }{k_{i}^{l}(j)} \left( u_{i}^{l+1}(j)- u_{i}^{l}(j) \right) + \nonumber \\ \dfrac{\Delta t}{\tau }\left( V_{i}^{l}(j) - u_{i}^{l}(j)\right) - \dfrac{\Delta t}{\Delta x}\dfrac{ck}{k_{i}^{l}(j) + \chi } \left( k_{i+1}^{l}(j)- k_{i}^{l}(j) \right) \end{aligned}$$
(31)

where \(i \in \mathbb {N}, \; l \in \mathbb {R}^{+}\) and \(j \in \mathbb {W}\). The lane-specific density and speed at the next time \(j+1\) are determined by the joint impact of Eqs. (30) and (31).

The corresponding lane-specific steady state speed-density equation is

$$\begin{aligned} V_{i}^{l}(j) = u_{max} - u_{max} \cdot \exp {\left[ 1- \exp {\left( \dfrac{c_{m}}{u_{max}} \left( \dfrac{k_{max}}{k_{i}^{l}(j)}\right) -1 \right) } \right] } \end{aligned}$$
(32)

The initial densities are unique for each lane with the commensurate speed values. For a total on L lanes with \(l= 1,2, \cdots L\), their initial density and speed profiles are:

$$\begin{aligned} K^{l}(x,0) = {\left\{ \begin{array}{ll} k^{(1)}, &{} \text{ if } l=1 \\ k^{(2)}, &{} \text{ if } l=2 \\ \vdots &{} \vdots \qquad \vdots \\ k^{(L)}, &{} \text{ if } l=L \\ \end{array}\right. } \qquad \qquad \qquad \qquad U^{l}(x,0) = {\left\{ \begin{array}{ll} u(k^{(1)}), &{} \text{ if } l=1 \\ u(k^{(2)}), &{} \text{ if } l=2 \\ \vdots &{} \vdots \qquad \vdots \\ u(k^{(L)}), &{} \text{ if } l=L \\ \end{array}\right. } \end{aligned}$$

5.2 Simulation results

The simulation is based on a minimum of eight lanes, each extending 6km long and a longitudinal space step size of 300 meters. The inter-lane distance \(\Delta y = 1m\). We will opt for the standard form of density with jam density equal to one and free-flow density equal to zero. The free-flow speed \(u_{max}\) is equal to 20m/s for all lanes.

Each of these lanes in Fig. 5 has its density below 0.25, with lane eight have the least density of 0.05. The initial speed profile increases gradually to a maximum of 20m/s moving from lane one through to lane eight. We can observe maximum flow, short queues and a lower density in lane eight vis-a-vis mixed speed, long vehicular queues and an increasing density in lane one. The other lanes have intermediate characteristics of these extremities. Observably, from Fig. 5 the lower speed lanes intend to become clustered over time. We realize the speed profiles for lane one decrease over time due to stopping and alighting effects just like the city traffic in Ghana. Correspondingly, the density for lane one also increases over time. Due to this clustering effect, drivers might begin to change lanes, to a lesser dense lane. This also causes the density of higher speed lanes to increase thereby causing a consequential drop in speed as evinced by Figs. 5, 6, 7.

Fig. 5
figure 5

Low density multilane traffic. The initial densities are equally spaced values from 0.05 to 0.25 with \(\mu = 0.007\)

In Fig. 6, the initial density profile for this flow is equivalent to dense traffic. Lane one has a near jam density of 0.98. Proceeding to lane eight, the density declines to 0.80 and observing stopped traffic in lane one with a zero speed. Nonetheless, traffic continues to flow steadily in the other lanes, with a maximum speed of about 2m/s.

Fig. 6
figure 6

Highly dense multilane traffic. The initial densities are equally spaced values from 0.80 to 0.98 with \(\mu = 0.007\)

In Fig. 8, there is a jam density in lane one, while lane eight has an optimal flow rate. The viscosity term is increased to 0.07. An increasing viscosity implies an increasing flow interruption. This interruption is more evident in the free-flow lanes (six, seven, eight). An uninterrupted version of these initial density profiles is exhibited with Fig. 7.

Fig. 7
figure 7

Uninterrupted multilane traffic. The initial densities are equally spaced values from 0.001 to 1.00 with \(\mu = 0.007\)

Fig. 8
figure 8

Interrupted multilane traffic. The initial densities are equally spaced values from 0.001 to 1.00 with \(\mu = 0.07\)

The wave profiles for these inter-dependent multilane model is synonymous to realistic traffic flow. At some given point, high-speed lanes have shorter queues compared to lanes with dense traffic. Also, in extremely dense traffic, increasing viscosity value does not have any impact on the flow rate. This is because traffic is at a near stop and any disturbance is not easily translated to speed drop. For free-flow traffic, a small disturbance is seen by a speed drop. The speed profiles instantaneously drop to the equilibrium with viscosity value close to zero.

6 Conclusion

The paper proposes a two-dimensional spatial second-order macroscopic traffic flow model that extends a classical one-dimensional macroscopic model. It introduces and models an unaccounted physical flow property; velocity differentials alongside with viscosity. The velocity differentials take into account the lateral speed changes on a multilane road network, with inter-lane friction quantize as viscosity. From the characteristic wave analysis, the viscous model epitomizes the conduct of trotro drivers in Ghana who react to both forward and backward stimuli. Trotro are minivans that offer short and averagely long transport services for urban dwellers in Ghana. Again, we derived a mathematical inequality to justify the condition for traffic instability. The velocity-density gradient was the main variable for determining an unstable flow. It could be deduced that traffic would be stable for small and large densities, and unstable for medium densities. Again, some profiles of the continuum model were presented using graphically results of acceleration and deceleration traffic waves. Moreover, the continuum equation was reformulated as a discrete model to explain interdependency among adjacent lanes. The simulation results showed both the longitudinal and lateral profiles of an eight-lane infrastructure. It was observed that lanes ascribed as higher speed lanes had wave profiles comparatively shorter than the clustered lanes. Lastly, the effect of viscosity on different traffic regimes was presented. Observably, the effect of a smaller viscosity value on vehicle flow was not so evident.