Sunteți pe pagina 1din 6

Proceedings of the Postgraduate Annual Research Seminar 2006 264

A Moving Mesh Finite Element Method for the Burger Equation in


Crowd Model Application

Setyawan Widyarto
FSKSM-UTM Skudai, Building N28, Room 337-01
Johor Bahru 81310,
swidyarto@siswa.utm.my
Telp. (+60-7)-55-36503, (+60)-127617388
Dr. Muhammad.Shafie Abd Latiff,

Abstracts
This paper discusses Burger’s equation to be used in modelling a crowd with traffic approach using conservation laws
and focuses on a moving mesh method that is applied to the solution of hyperbolic equations. A mesh consists of
nodes (points) at specific locations in space that are connected to form elements. The moving mesh method is
developed utilizing monitor functions to drive the mesh motion and is based on equidistribution ideas. The method is
derived in multi dimensions from a conservation of monitor function principle and from this initial principle a
conservation law for the monitor function is derived. Numerical results for the moving mesh methods to the Burger’s
equation with several values of ε , including when ε =0 or inviscid Burger’ equation is presented.

Key words: moving mesh, Burger’s equation, crowd model, conservation laws

Let v(x; t) denote the velocity of the pilgrims in x at


1. Introduction time t. The number of pilgrims which pass through x at
time t is ρ(x; t)*v(x; t). An equation for the evolution
The conservation laws model results hyperbolic of the pilgrim density will be derived. The number of
differential equations. One of the hyperbolic equations pilgrims in the interval (x1; x2) changes according to
is Burger’s equation. This paper discusses Burger’s the number of pilgrims which enter or leave this
equation to be used in modelling a crowd with traffic interval:
approach using conservation laws and focuses on a
moving mesh method that is applied to the solution of d x2
hyperbolic equations. ρ (x, t ) dx =

The discussion is limited within one spatial dimension. dt x1
The hyperbolic equation with a moving boundary ρ ( x1 , t ) v ( x1 , t ) − ρ ( x 2 , t ) v ( x 2 , t ) (1)
problem is solved. The solution is obtained through the
conservation of monitor function. Moreover, in these
Integration of this equation with respect to time and
cases the numerical solution is obtained by solving the
assuming that ρ and v are regular functions yields
equation on the moving mesh using the arbitrary t2 x2
Eulerian Lagrangian form of the equation.
∫t ∫ x ∂tρ ( x , t ) dxdt =
1 1

t2
∫t (ρ (x1 , t )v(x1 , t ) − ρ (x2 , t )v(x2 , t )) dxdt =
2. Inviscid Burger Model 1

t2 x2
− ∫t ∫ x ∂ x (ρ ( x , t ) v ( x , t )) dxdt (2)
Consider the crowd flows as a traffic with only one 1 1
lane (i.e., overtaking is impossible, e.g. wheel chair
lane on the Sa’ey hajj ritual). Instead of modelling Since x1, x2 Є R, t1, t2 > 0 are arbitrary, it is concluded
pilgrims individually, the density ρ(x; t) (pilgrims per
meter) of pilgrims is applied in x Є R at time t ≥0. The ρ t + (ρ v )x = 0 x ∈ R, t > 0 (3)
number of agents which are in the interval (x1; x2) at
time t is
x2 This is a partial differential equation. It has to be
∫x ρ ( x, t )dx supplemented by the initial condition
1

ρ ( x,0 ) = ρ 0 ( x ), x∈R (4)


Proceedings of the Postgraduate Annual Research Seminar 2006 265

An equation for the velocity v is also needed. It is ⎡ ⎛ ρ ⎞⎤ 1 ⎡ ρ 1 ⎤


∂ x ⎢vmax ρ ⎜⎜1 − ⎟⎟⎥ = ∂ x s ⎢vmax max (1 − u ) (1 + u )⎥
assumed that v only depends on ρ. If the lane is empty ⎝ ρ ⎠⎦ L ⎣ 2 2 ⎦
⎣ max
(ρ=0), pilgrim will walk with maximal velocity v =
ρ max ⎛ u2 ⎞ (10)
vmax, in heavy density lane pilgrims will slow down and =− ∂ xs ⎜⎜ ⎟⎟
stop (v = 0) until the pilgrims are touched each other 2τ ⎝ 2⎠
(‘secure concern’, ρ= ρmax). The simplest model is the and hence (4), (6) can be written as (with (x; t) instead
linear relation of (xs; ts))
⎛ u2 ⎞
⎛ ρ ⎞ ut + ⎜⎜ ⎟⎟ = 0, x ∈ R, t > 0, (11)
v(ρ ) = vmax ⎜⎜1 − ⎟⎟, 0 ≤ ρ ≤ ρ max (5) ⎝ 2 ⎠x
⎝ ρ max ⎠ u ( x ,0 ) = u 0 ( x ), x∈ R (12)
Equation (3) then becomes
with u 0 = 1 − 2 ρ 0 / ρ max . If the lane is empty (ρ =
⎡ ⎛ ρ ⎞⎤ 0), we have u = 1; in a tailback ρ = ρ max , u = -1.
ρt + ⎢vmax ρ ⎜⎜1 − ⎟ ⎟⎥ = 0, x ∈ R, t > 0 (6)
⎣ ⎝ ρmax ⎠⎦ x Equation (11) is also called the inviscid Burgers
This equation is a so-called conservation law since it equation. The inviscid Burgers equation is the
expresses the conservation of the number of conservation law which exhibits non-linear effects.
pilgrims. Indeed, integrating (6) formally over x Є R
gives 3. A Moving Mesh Method
A mesh consists of nodes (points) at specific locations
d in space that are connected to form elements. These
dt ∫ R ρ (x , t )dx =
elements can be triangles or quadrilaterals in 2-D
∂⎡ ⎛ ρ ( x, t ⎞ ⎤ models and tetrahedra, hexahedra, prisms, or pyramids
− ∫R ∂x ⎢⎣vmax ρ (x, t )⎜⎜⎝1 − ρ max ⎟⎟⎠⎥⎦ dx = 0 (7) in 3-D models.

Finite element meshing and remeshing techniques are


and thus the number of pilgrims in R is constant for all structured if they have a regular pattern of connections
t ≥ 0. Equation (6) belongs to the class of hyperbolic between elements. Specifically, a moving mesh
equations. Recall a system of equations method has is adapted the mesh to features of the
computed solution. The nodal density is high in
∂ t u + ∂ x f (u ) = 0, x ∈ R, t > 0 (8) regions of high solution variation and low in regions
where the solution variation is small.
u ( x,0 ) = u 0 ( x ), x∈R (9)
The moving mesh method is developed utilizing
m m
with f :R → R hyperbolic if and only if for monitor functions to drive the mesh motion and is
based on equidistribution ideas. The method is derived
any u ∈ R m , f ′(u ) can be diagonalized and has in multi dimensions from a conservation of monitor
function principle and from this initial principle a
only real eigen values. A function conservation law for the monitor function is derived
u : R × (0, ∞ ) → R m
is called a classical solution which generates the velocity of the mesh. The moving
mesh equations are solved for the mesh velocity using
of (8)-(9) if
standard linear finite elements and then a new mesh is
constructed by integrating the mesh velocity forward
u ∈ C 1 (R × (0, ∞ )) ∩ C 0 (R × (0, ∞ )) in time using finite differences.

and u solves (8)-(9) point wise. Equation (6) can be The moving mesh methods are required to generate a
simplified by bringing it in a dimensionless form. Let mapping from a regular domain in a parameter space
L and τ be a typical length and time, respectively, such Ωc to an irregularly shaped domain in physical
that L = τ = vmax . space Ω . By connecting points in the physical space
Introducing corresponding to discrete points in the parameter
x t 2ρ space, the physical domain can be covered with a
xs = ts = , u =1− , computational mesh suitable for the solution of finite
L, τ ρ max element equations. The moving mesh methods include:
• Mesh equations. The mesh equations determine a
it is obtained one-to-one mapping from a regular domain in a
1 ⎡ρ ⎤ ρ parameter space to an irregularly shaped domain
∂ t ρ = ∂ t s ⎢ max (1 − u )⎥ = − max ∂ t s u, in physical space. By connecting points in the
τ ⎣ 2 ⎦ 2τ
Proceedings of the Postgraduate Annual Research Seminar 2006 266

physical space corresponding to discrete points in x L = X 0 < Λ < X i (t ) < X i +1 (t ) < Λ < X N +1 = x R
the parameter space, the physical domain can be
covered with a computational mesh suitable for are chosen to satisfy a so-called ‘equidistribution’
the solution of element equations. Choosing (uniform) principle. Given a so-called monitor
suitable mesh equations and solving them
efficiently are very crucial for an effective moving
function m (u, x ) , which serves as an indicator for
mesh method; the error between computed solution and exact
• Monitor function. A monitor function is used to solution of the PDE

guide the mesh redistribution. It may depend on u ( x , t ) = f (u ( x , t )), xL < x < xR ,t > 0
the solution arc length (in 1D), curvature, and a ∂t
posteriori errors. In practice, local (spatial) u (x L , t ) = u (x R , t ) = 0, t > 0,
smoothing of the monitor function is necessary, u ( x , 0 ) = u 0 ( x ), (17 a , b , c )
see, e.g., [Cao, et.al, 1999, Huang et.al, 1997]
generating grid points such that
• Interpolations. If the mesh equations are time-
dependent and are solved simultaneously with the x i +1 (t )
given differential equations, then interpolation of
∫x (t ) m(u (~
x , t ), ~
x )d~
x=
dependent variables from the old mesh to the new i (18)
mesh is unnecessary. Otherwise, some kind of 1 xR
interpolation is required to pass the solution
∫x m(u (~
x , t ), ~
x )d~
x , i = 0, ..., N
information on the old mesh to the newly N +1 L

generated mesh.
or, equivalently

x i +1 (t )
∫x (t ) m(u (~
x , t ), ~
x )d~
3.1. The Monitor Function
x=
( )
i
Let PDE within a spatial operator is u t = L u . xi + 2 (t )
∫x m(u (~
x , t ), ~
x )d~
x , i = 0, ... , N − 1 (19)
Discretions require meshes in space, which should i +1 (t )
adapt to the motion of the solution as time progresses. Usually the monitor function
So that an appropriate mesh to represent the solution
must be sought. The model problem in 1D is 1
represented by ⎛ n ⎞ 2
⎜ ∑
m(u, x ) = ⎜ α 0 + α i (ui )2x ⎟ ,

(20)
ut = L (u ), in (0,1)× (0, T ) (13) ⎝ i =1 ⎠
α i > 0, i = 0, ..., n, fixed ,
A mesh transformation x = x(ξ , t ) , such that is chosen, or in the case n =1
uniform points in the ξ coordinate. Let x and ξ
respectively denote the physical and computational m(u, x ) = α + (u x )2 ( )1
2
, α > 0. (21)
pilgrim coordinates in crowd over the unit interval [0,
1] and a one-to-one coordinate transformation between in other form it is written
those domains is designated by

x = x(ξ , t ), ξ ∈ [0,1] (14) M (t , x, u ) = α + (u x )2 , α > 0


(22)
with x(0, t ) = 0, x(1, t ) = 1 , where t denotes time.
An arbitrary function
The monitor function M (t , x, u ) should be large, if
the error is large, and vice versa. It should be also
f = f ( x, t ) = f ( x(ξ , t ), t ) easily computable. Classical choices are:
Arc-length:
(15)

gives a uniform mesh on the computational domain M (t , x , u ) = 1 + ux2 (23)


i Modified Arc-length:
ξi = , i = 0,1, ..., N (16) 1
N M (t , x, u ) = α + u x m (24)
is representing the solution as accurately as possible.
That means, the grid points of
Proceedings of the Postgraduate Annual Research Seminar 2006 267

Often good choices of M (t , x, u ) are problem


M i +1 + M i
(30)
dependent and insight leads to improved accuracy. Ei = 2
(xi +1 − xi ) − M i + M2 i −1 (xi − xi −1 )
⎛1⎞ ⎛1⎞
(
For a monitor function M t , x, u which provides ) ⎜ ⎟
⎝n⎠
⎜ ⎟
⎝n⎠
some measure of the computational error in the
solution of the PDE, the one-dimensional
equidistribution principles (EP) can be expressed in its 3.2. Equidistribution Principle
integral form (White, 1979) as
Let M (t , x, u ) be a monitor function of the error.
x (ξ , t ) Then the equidistribution principle for the error due to
∫0 M (~
x , t )) d ~
x = ξθ (t ), White (1979) states

(25) x (ξ , t ) 1
∫0 M (t , y, u ) dy = ξ ∫0 M (t, y, u ) dy (31)
where
1
θ (t ) = ∫0 M (~x , t )∂ ~x (26) A moving mesh PDE is therefore, taking two
derivatives of (31) with respect to ξ
Differentiating (25) with respect to ξ , it will be
∂ ⎛ ∂ ⎞
⎜ M (t , x(ξ , t ), u ) x(ξ .t )⎟ = 0 (32)
∂ ∂ξ ⎝ ∂ξ ⎠
M ( x(ξ , t ), t ) x(ξ , t ) = θ (t ) (27)
∂ξ In other version (32) is written
This EP, which does not contain the node
( )
speed x&ξ , t , is called quasi-static EPs (QSEPs). ∂⎛ ∂ ⎞
Related to this QSEP, an MMPDE is derived (Huang
⎜⎜M(t, x(ξ,t),u) x&(ξ,t)⎟⎟ =
∂ξ ⎝ ∂ξ ⎠ (33)
et.al, 1994)
1∂⎛ ∂ ⎞
2 − ⎜⎜M(t, x(ξ,t),u) x(ξ,t)⎟⎟
∂ x& 1 ∂ ⎛ ∂ x ⎞ (28) r ∂ξ ⎝ ∂ξ ⎠
=− ⎜M ⎟
∂ξ 2 τ ∂ξ ⎝ ∂ξ ⎠

This MMPDE does not only force the mesh ( x (ξ , t )) 3.3. Spatial smoothing
toward equidistribution but also prevent the mesh Some sort of smoothing of the mesh are often useful in
order to reach a reasonable accuracy in the computed
crossing. Especially, the term − 1 ∂ ⎛⎜ M ∂ x ⎞⎟ plays the solution. The values of the smoothed monitor function
τ ∂ξ ⎝ ∂ξ ⎠ ~
M at nodes are defined by (Huang et al, 1994)
fundamental role of a correction term as a source for
the mesh movement to stabilize the mesh trajectories k −i
and to make the mesh equidistribute the monitor 2⎛ γ ⎞
∑ k = i − p (M k )
i+ p
function. The parameter τ represents a timescale for
⎜ ⎟ (34)
~
Mi = ⎝1 + γ ⎠ ,
forcing the mesh toward equidistribution. Equation k −i
⎛ γ ⎞

(28) is being discrete using the line method in space i+ p
⎜ ⎟
with control finite difference on the uniform mesh is k =i − p 1 + γ
⎝ ⎠
approximated by
1
[x&i +1 − 2 x&i + x&i −1 ] = − Ei , (29) where γ is a positive constant called the smoothing
⎛1⎞
2 τ parameter and p is a non-negative integer which is
⎜ ⎟ referred to smoothing index. The summations in the
⎝n⎠ above equation are understood to contain only
elements with indices in the range between 0 and n.
The final discrete moving mesh equation is obtained
Ei is the discrete approximation of ∂ ⎛⎜ M ∂x ⎞⎟ at ~
∂ξ ⎝ ∂ξ ⎠ by replacing Mi by Mi in its MMPDE.
ξ = ξi i.e.
4. Numerical Experiments result

In this section, numerical results for the moving mesh


methods to the Burger’s equation with several values
Proceedings of the Postgraduate Annual Research Seminar 2006 268

of ε and initial solutions, including when ε =0 or Initial solution: u ( x, 0 ) = sin (2π x ) + 1 sin (π x ), 0 ≤ x ≤ 1 .
inviscid Burger’s equation (11), are presented. 2
Experiment 2 would be the way out to overcome the
u⎛ 2⎞
ut = ε u xx − ⎜⎜ ⎟⎟ , 0 < x < 1, t >0 jam of pilgrims flow. The crowd region line is the
most distributed over t and x.
⎝ 2 ⎠x 1
Burgers equation. Grid trajectories

0.9

It can be written in the quasi-Lagrangian from 0.8

∂u
f (u ) = u&− x&
0.7

∂x 0.6

0.5
Discreting by centred finite differences will give

t
(u − ui −1 ) x&, i = 1, 2, 3, ..., n − 1
f i = u&i − i +1
0.4

(xi +1 − xi −1 ) i
0.3

0.2

With the real world condition 0.1

u (0, t ) = u (1, t ) = 0, t > 0 and the experiments are 0


0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

subject to the one periodic (2π) initial solution (data). x

The mesh trajectories and solution with several initial 1.5


Burgers equation solution.

solutions are shown as figures. t


t
=
=
0
0.2
t = 0.6
t = 1
1

4.1. Experiment 1.
Initial solution: u ( x , 0 ) = 0.5 + sin (2π x ),
solution u

0 ≤ x ≤1 0.5

Burgers equation. Grid trajectories


1
0
0.9

0.8 X: 0.75
Y: -0.5
0.7 -0.5
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
x
0.6

0.5
Figure 2. Mesh trajectories and solution, ε =
t

0.4 1.e-2, τ = 1e-3, N = 20, γ= 2 and p = 2.


0.3
X: 0.591
Y: 0.1791
0.2

0.1
4.3. Experiment 3.
0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Initial solution: u ( x , 0 ) = 0.5 + sin (2π x ), 0 ≤ x ≤ 1 .
Experiment 3 used ε =0 that means the equation
x

Burgers equation solution.


2 becomes inviscid. It does not change the trajectories
t = 0
t = 0.2 characteristics that show a region line of pilgrim
1.5 t
t
=
=
0.6
1
crowd.
Burgers equation. Grid trajectories
0.2
1
0.18
solution u

X: 0.5925
0.16 Y: 0.1779
0.5
0.14

0 0.12

0.1
t

X: 0.6887
-0.5 Y: -0.6771 0.08

0.06

-1
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0.04
x
0.02

Figure 1. Mesh trajectories and solution, ε= 0


0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

1.e-4, τ = 1e-3, N = 20, γ= 2 and p = 2. x

4.2. Experiment 2.
Proceedings of the Postgraduate Annual Research Seminar 2006 269

1.5
Burgers equation solution. K. Lipnikov, M.Shashkov (2006), Error-Minimization-
t=0
t = 0.2
Based Strategy for Moving Mesh Method,
Communications in Computational Physics 9(1): 53-
1 81
solution u

0.5

X: 0.7492
Y: -0.5
-0.5
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
x

Figure 3. Mesh trajectories and solution, ε =0, τ


= 1e-3, N = 20, γ= 2 and p = 2.

5. Conclusion
The Burger’s equation has ε that dominates the mesh
trajectories. This feature would become the parameter
for the crowd density distribution. The moving mesh
methods involve three parameters, i.e. τ, N, and p. It is
recommended to make more experiments in future to
get the most important parameter in crowd control. The
initial solution can be also approached by real situation
by plotting the real data video to get an initial solution
for simulation.

References
W.M. Cao, W.-Z. Huang, and R.D. Russell, A study of
monitor functions for two dimensional adaptive mesh
generation, SIAM J. Sci. Comput. 20 (1999), 1978–
1994,

W. Huang, Y. Ren, and R.D. Russel, (1994) ‘Moving


mesh partial differential equations (MMPDEs) based
on the equidistribution principles’, SIAM J. Numer.
Anal 31(3): 709-730

W.-Z. Huang and R.D. Russell, Analysis of moving


mesh partial differential equations with spatial
smoothing, SIAM J. Numer. Anal. 34 (1997), 1106–
1126

A.B. White, Jr., On selection of equidistributing


meshes for two-point boundary-value problem, SIAM
J.Numer. Anal. 16(1979), 472-502

W. Huang, Y. Ren and RD Russell, Moving mesh


methods based on moving mesh partial differential
equations, J. Comput. Phys. 113 (1994), 279 – 290

Shvetsov, V. I., (2003) Mathematical Modelling of


Traffic Flows, Automation and Remote Control,
64(11): 1651-1689. Translated from Avtomatika i
Telemekhanika, 11: 3-46.

S-ar putea să vă placă și