Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
The equations (3.1), (3.2) and (3.3) lead to an initial boundary value problem (IBVP)
∆x i ≡ x −x
spatial grid size, i+
1
i−
1
2 2
1
We also define the temporal grid size, ∆t n + 2 ≡ t n +1 − t n
We will integrate the differential equation (3.1) over the space-time rectangle
x 1 , x 1
i− i+ (
× t n , t n +1 ) for an illustration of spatial and temporal discretization figure-
2 2
3.1, we get,
x 1 x 1
i+ i+
t n +1 n +1
t
∫ ρ ( x, t )dx = ∫ ρ ( x, t )dx + ∫
2 2
n +1 n
f ρ x 1 , t dt − ∫ f ρ x 1 , t dt
i− i+
x
i−
1 x
i−
1 tn 2 tn 2
2 2
x 1 x 1 x 1 x 1
− i− i+ l−
2 2 2 2
a b
N
T t
t n +1
tn
∫ ρ ( x, t )dx
1 2
ρ ≈ i
n n
∆x i x 1
i−
2
n+
1
1
t n +1
and the flux functions f 2
≈ ∫ f ρ x 1 , t dt
i+
1 1 i+
2
∆t
n+
2 tn 2
ρ in +1 = ρ in − f
i+ 1 − f 2
1 − − − − (3.1)
∆x i 2 i −
2
x 1
i+
1 2
ρ = ∫ ρ ( x ) dx − − − −(3.2)
0
Initially, we define i 0
∆x i x 1
i−
2
x =a
Further, at the left-hand boundary −
1 we define
2
1 t n +1
n+ 1
f
−
1
2
=
n+
1 ∫ f ( ρ ( t ) )dt
a
tn
2
∆t 2
ρ in +1 = ρ in −
∆t 2 n
∆x i
[
f i − f i −n1 ]
(
through this point back to where it meets the initial line at Q , x i − ct ,0 - Fig 3.2.
n
)
Now the scheme (3.4) can be written as the averaging process
ρ in +1 = (1 − γ ) ρ in + γ ρin−1 − − − −(3.6)
1
1 n+
where γ
n+ c∆t 2
is the dimensionless courant number.
i
2
:=
∆x i
Q x
level: each of these depends on two points on the time level t n −1 and so on. As
illustrated in Fig. 3.2, the value of ρin +1 depends on data given in a triangle with
(
vertex x i , t
n +1
)
, and ultimately on data at the points on the initial line
x i −n −1 , x i −n , . . . , x i −1 , x i .
So, ρi
n +1
depends on data given at all points of the triangle. This triangle is called the
scheme.
The corresponding domain of dependence of the partial differential equation is the
The CFL condition then states that for a convergent scheme the domain of dependence
of the partial differential equation must lie within the domain of dependence of the
numerical scheme. It also gives a restriction on the size of the time step, for the
condition that the characteristic must lie within the triangle of dependence requires that
1
n+
c∆t 2 n+
1
≤ 1 , that is γ i 2 ≤ 1 . The expression on the R.H.S of equation (3.6) would
∆x i
become a convex combination.
where γ := V ∆t 2
max
∆x i
This can be interpreted as follows. In fig-3.2, the characteristic through the point
condition
( )
must lie between the points A = x i , t and B = x i −1 , t
n n
( )
B Q A C
n +1
n
j x
Fig 3.3: Error Analysis of the scheme
t n , we can therefore interpolate the value of ρ( Q ) and use this to give the required
value ρi
n +1
(
. If we use linear interpolation, approximating ρ x, t n ) by a linear function
The truncation error of the scheme is defined as usual and expansion about x i , t
n
( )
gives, if ρ is sufficiently smooth,
ρ in +1 − ρ in ρ in − ρ in−1
Ti :=
n
+ Vmax
∆t ∆x
n n
1 1
~ ρ t + ∆tρ tt + . . . + Vmax ρ x − ∆xρ xx + . . .
2 i 2 i
1
= ( ∆tρ tt − Vmax ∆xρ xx ) + . . . − − − −(3.8)
2
Even if V max is constant, we still find
1
T In = − (1 − γ )Vmax ∆xρ xx + . . .;
2
hence generally the method is first order accurate. Suppose the difference scheme is
applied for i =1, 2, . . . , I , at the points x i = i∆x with I∆x = X , and the boundary
(n
)
value Ρ0 = ρ 0, t is given. Then for the error ei = Ρi − ρ i we have as usual
n n n n
for all i and n in the domain, the usual induction argument shows that
E n ≤ n∆tT ≤ t F T − − − −(3.11)
if Ρi = ρ ( x i ) .
0 0
This result is sufficient to prove first order convergence of the upwind scheme along a
refinement path which satisfies the CFL condition everywhere, provided that the
solution has bounded second derivatives.
∂ ρ
2
∂ρ = 0
+ ρ.V max 1 − − − − −(3.12 )
∂t ∂x ρ max
where x ∈( a, b ) ; t ∈( 0, T )
The initial and boundary conditions are given by
ρ ( x,0 ) = ρ 0 ( x ) and ρ ( a, t ) = ρ a ( t ) − − − −(3.13)
The equations (3.12) and (3.13) produce an initial boundary value problem (IBVP)
which is well-posed for left hand boundary if velocity, V max > 0 and for the right hand
In order to develop the scheme, we discretize the space and time. The discretization of
∂ρ( x, t )
is obtained by first order forward difference in time and the discretization of
∂t
∂ρ( x, t )
is obtained by first order backward difference in space.
∂x
∂ρ ∂ρ
The possible finite difference approximations for and :
∂t ∂x
Forward difference in time:
From Taylor’s series we write
∂ρ ( x, t ) h 2 ∂ 2 ρ ( x, t )
ρ ( x , t + h ) = ρ ( x, t ) + h + + ...
∂t 2! ∂t 2
respectively t n +1 = t n + h and xi +1 = xi + k .
ρ in +1 − ρ in q in − q in−1
+ =0
n+
1
∆ xi
∆t 2
1
n+
⇒ ρ in +1 = ρ in −
∆t 2 n
∆x i
[
q i − q in−1 ] − − − −(3.17)
ρn
2
= ρ i
max 1 −
n n
where q V
i
i
ρ
max
This is the explicit upwind difference scheme for the equation (3.12).
Therefore, equation (3.17) leads the desired numerical scheme for the traffic model.
ρin +1
ρin−1 ρin
1
n+
ρ2
Now we have, f ( ρ ) = ρV ( ρ ) = ρVmax 1 − 2
ρ max
ρ3
= V max ρ − 2
ρ max
3ρ 2
∴ f ′( ρ ) = V max 1 − 2
ρ max
We know that the explicit upwind difference scheme is well-posed iff f ′( ρ ) > 0.
3ρ 2
V
It is evident that max 1 − >0
ρ max
2
Here, V max is essentially positive.
3ρ 2
So, 1 − >0
ρ max
2
3ρ 2
⇒ <1
ρ max
2
⇒ 3ρ 2 < ρ max
2
1
⇒ρ < ρ max
3
⇒ ρmax > 3 ρ
with this condition of stability, the condition of well-posed ness can be incorporated by
ρ max = c * max( ρ 0k ) ; c≥ 3
k