![MathJax Logo](/templates/jsp/_style2/_tandf/pb2/images/math-jax.gif)
Abstract
In this paper, a hybrid modeling approach for granular flow-like applications is presented. The approach allows to switch for a priori fixed points in time between the different levels of description which are the microscopic and macroscopic scale, respectively. Based on the numerical discretization of the models, the switching procedure is able to interpret information on individual objects as density distributions and vice versa. In particular, the reverse direction, i.e. from a macroscopic to a microscopic perspective, requires the solution of a nonlinear least squares problem subject to further constraints. Simulation results are given and demonstrate the good performance of the algorithm in the case of material and pedestrian flow models.
PUBLIC INTEREST STATEMENT
Conveyor belts are commonly used in many industries to transport a large amount of goods. Typical applications include for example bottling, canning and packaging. We introduce a hierarchy of models enabling to consider different levels of simulation accuracy. Our intention is to develop a hybrid numerical framework which is able to switch between the scales at user-defined points in time. This allows for either a fine or coarse resolution of the underlying equations to detect collisions or identify free flow regimes. Based on the numerical approximations, the switching procedure is able to interpret information on individual goods as density distributions and vice versa. In particular, the reverse direction requires the solution of a restricted nonlinear least squares problem. Simulation results are presented to demonstrate the good performance of the algorithm in the case of material flow models.
1. Introduction
Multi-scale models are a common tool to simulate the behavior of granular materials in many engineering applications. Such models are for example used to simulate pedestrian flow (Cristiani, Piccoli, & Tosin, Citation2014; Etikyala, Göttlich, Klar, & Tiwari, Citation2014), granular flow (Cristiani, Piccoli, & Tosin, Citation2011), traffic flow on roads (Herty & Moutari, Citation2009; Moutari & Rascle, Citation2007) or material flow on conveyor belts (Göttlich, Hoher, Schindler, Schleper, & Verl, Citation2014). Multi-scale models combine the microscopic scale, where the trajectories of single objects are considered separately (e.g. pedestrian flow (Helbing, Farkas, & Vicsek, Citation2000), granular flow (Cleary & Sawley, Citation2002; Cundall & Strack, Citation1979)), with the macroscopic scale, where the entity of objects is treated as a mass distribution (e.g. (Colombo, Garavello, & Lécureux-Mercier, Citation2012; Colombo & Lécureux-Mercier, Citation2012)). Typically, multi-scale models are derived from the microscopic scale via hydrodynamic limits. An overview on multi-scale models for crowd dynamics is given in (Bellomo, Piccoli, & Tosin, Citation2012). Hybrid multi-scale traffic flow models have been investigated in Herty & Moutari, (Citation2009) and Moutari & Rascle, (Citation2007). However, the transition between the different scales has been mostly analyzed from a theoretical point of view and there exist only a limited number of contributions, where simulation techniques have been applied to switch the dynamics (Herty & Moutari, Citation2009; Moutari & Rascle, Citation2007). Our intention is now to develop a numerical framework which is able to switch between the microscopic and macroscopic scale at fixed user-defined points in time. This allows for either a fine or coarse resolution of the underlying model equations depending on special situations (e.g. queuing effects).
For the presentation of the micro-macro hybrid model within this article, the formal derivation of limiting macroscopic equations is omitted and only briefly explained. The focus is on a hybrid switching method to convert the different scales without loosing information and properties of the model. In the case of material and pedestrian flow problems, we present the model equations, introduce suitable discretizations methods and explain how special model characteristics are incorporated in the implementation of the switching algorithm. Different to (Herty & Moutari, Citation2009; Moutari & Rascle, Citation2007), the switching procedure works directly in Eulerian coordinates and the problems are defined on a two-dimensional domain.
Figure illustrates the switching directions, i.e. from the microscopic to the macroscopic scale and vice versa. For the switch from the microscopic to the macroscopic representation, the idea is to place a Gaussian bell curve corresponding to the mass of each object. The total sum of all curves then leads to a density distribution with high density in dense regions and low density in regions, where the objects are widely spread. The transformation from the macroscopic to the microscopic scale is more involved since the precise positioning is in general not possible. In order to have the objects placed as dense as possible in regions of high density, the idea is to fill the geometry completely and to remove objects according to the density distribution. Therefore, the density is interpreted as a probability density and a nonlinear least squares problem is solved to meet the given density distribution as best as possible. An update algorithm ensures that the objects do not overlap and the placement is admissible.
The article is organized as follows. Section 1 is concerned with the general description of multi-scale models. The model equations are presented and embedded into the context of hybrid switching. In Section 2, the model switch is applied to a material flow model (Göttlich et al., Citation2014) and a pedestrian model (Helbing et al., Citation2000). Section 3 deals with the implementation of the multi-scale model and the hybrid switching algorithm. Finally, in Section 4, numerical examples are analyzed to evaluate the accuracy of the switching method.
2. Multi-scale models
In this section, we present the microscopic and macroscopic scale of the hybrid multi-scale model in a general framework as well as the transition between the levels. Furthermore, the switching idea is introduced based on some key characteristics.
Multi-scale models are commonly used to simulate the evolution of objects over time under certain conditions and inside a given geometry. However, assuming a high number of objects, there might be scenarios, where statistical values of the averaged behavior of objects such as flow (objects per time) or density (objects per area) are sufficient (see e.g. (Colombo et al., Citation2012; Göttlich et al., Citation2014)). The general multi-scale model considered here consists of two simulation levels: a microscopic one, described by Newton’s equations of motion, and a macroscopic one relying on a hyperbolic conservation law in two space dimensions (Bellomo et al., Citation2012; Göttlich, Klar, & Tiwari, Citation2015).
The setting we are interested in are bounded domains with time-independent external forces. The latter can be exerted for example by the boundaries of the geometry, the friction of a conveyor belt (see Section 2.1) or a desired velocity for pedestrians (see Section 2.2). Other external forces (e.g. gravitational forces) are also possible. The objects are assumed to be uniform and indistinguishable, meaning that they have the same mass, shape and set of parameters. They are assumed to be incompressible and are not allowed to overlap.
2.1. From microscopic to macroscopic scale
The microscopic model is based on Newton’s equations of motion (e.g. (Bellomo et al., Citation2012)). Being the number of objects in the system,
the spatial coordinate,
the velocity of object
and
the mass of a single object, the equations are characterized by
together with an initial condition
Equation (1.1a) describes the velocity of the objects and Equation (1.1b) includes all forces influencing their acceleration. The force term collects the interaction forces, whereas the force term
describes exterior forces as for example interactions with boundaries or friction forces.
To derive the limiting macroscopic equations of (1.1), the following formal computations have to be done. We refer to Carrillo et al. (Citation2009); Etikyala et al. (Citation2014); Göttlich et al. (Citation2015); Ruzhansky, Cho, Agarwal, & Area (Citation2017) where such considerations are made for swarming, pedestrian and material flow models in a more detailed way.
We start with the Liouville equation
where describes the distribution function in the phase space. We integrate over
and make use of Equation (1.1b). We consider the chaos assumption
, set
and let
go to infinity, then the resulting equation for the distribution function
is the mean field equation
with
We define the density
and velocity
Then, the temporal derivative of the density leads to the continuity equation
and the computation of the temporal derivative of yields the momentum equation
A monokinetic closure function
is used to close the system, i.e. fluctuations are neglected. Moreover, we ignore the velocity dependence meaning that the elastic normal forces dominate the friction forces. So Equation (1.5) reduces to the hydrodynamic limit equation
which describes the system together with the continuity Equation (1.4).
To reduce the system to a scalar limit equation, a quasi-stationary approach is considered, where the temporal and spatial derivatives are set to zero. We get
If the forces F and G are known, we get an expression for , the so-called closure velocity (analogous to (Göttlich, Knapp, & Schillen, Citation2017)) that is of the form
where the first part depends explicitly on the density and the second term only depends on the spatial variable x. We plug the closure velocity
into the continuity Equation (1.4) to get the scalar limit equation
which defines the macroscopic model.
The macroscopic model is obviously given by a hyperbolic conservation law in two space dimensions (Aggarwal, Colombo, & Goatin, Citation2015). The density distribution is denoted by with spatial coordinate
and time variable
. The velocity function corresponds to the closure velocity (1.7).
Note that the model is nonlocal since does not only depend on
but on the density distribution
over the whole geometry. The boundaries of the domain are denoted by
and the inner normal vector is called
. The model Equation (1.8) together with the closure velocity (1.7) and additional initial and boundary conditions can be expressed as follows:
Equation (1.9a) describes evolution of density governed by the hyperbolic conservation law, see Equation (1.8). The initial data is given by (1.9b), the inflow condition is stated by (1.9c) and the condition that no mass is going through the boundaries is ensured by (1.9d).
2.2. Hybrid switching method
The goal of the hybrid switching method is to provide a computational framework to change the scale from the microscopic description (1.1) to the macroscopic (1.9) and vice versa. The switch is directly based on the Eulerian representation, contrary to the situation considered in (Herty & Moutari, Citation2009; Moutari & Rascle, Citation2007), and works for a priori defined fixed points in time.
As one might imagine, the transformation from the microscopic to the macroscopic level is straightforward since all necessary information is available. Averaged quantities such as density or flux can be computed in a straightforward way and are sufficient to describe the approximate behavior of the system over time. However, the lack of missing information is the more challenging problem while transforming the system back. Therefore, the main task is to find a method to place the objects inside a given domain such that the given density distribution matches the position of objects in the microscopic scale. For application purposes, the transformation from the macroscopic to the microscopic representation is necessary whenever the trajectory of single objects is needed.
The consistent relation between the amount of mass and the number of objects is ensured by
with being the total mass in the system,
the radius of an object and
again the total number of objects. Note that this number is independent on the switching direction and the derivation is as follows: If we have a domain of maximal density
, the corresponding object distribution is as dense as possible which is a hexagonal configuration (Degond, Ferreira, & Motsch, Citation2017). Then, the volume corresponding to one object corresponds the volume of a hexagon with inner circle radius
. The area of such an hexagon is
. The volume for one object therefore is
2.3. Switch from microscopic to macroscopic scale
The transformation from the microscopic to the macroscopic representation is performed such that the original position of objects can be interpreted as a density distribution. Thus, the idea is to spend a two-dimensional Gaussian bell curve for each object representing the density distribution and sum them all up. Since the volume of a two-dimensional Gaussian function with variance is normalized and the volume per object has to be equal to
, we have to multiply by the corresponding volume as done in Equation (1.11). The
- resp.
-coordinates of the objects are given by the vectors
and
and the continuous density distribution for one object
is then
where and
is the
-th component of the vector
and
, respectively. Summing the densities for each object
we end up with the desired continuous density distribution.
2.4. Switch from macroscopic to microscopic scale
The switch becomes more involved when the system is transformed from the macroscopic to the microscopic representation. This is due to missing detailed information on individual objects at the macroscopic level. To remedy this drawback, we need to solve an optimization problem to find a good guess for the microscopic density interpretation. To do so, the density distribution is considered as a normalized probability distribution, meaning that the maximal density is Since it is not possible to compare the placement of objects to the macroscopic density distribution
, the object distribution has to be transformed back to a density distribution called
, cf. (1.13). Given the position of objects
respecting the boundaries and the non-overlapping conditions, we can set up an optimization problem of the following form:
where is the admissible interior domain such that objects placed here do not interact with the boundaries. The optimization problem (1.14) is in fact a nonlinear least squares problem subject to the constraints that the total numbers of objects is met (1.14b), the objects are placed inside the admissible domain (1.14c) and do not overlap (1.14d). For the numerical implementation, the constraints (1.14c) and (1.14d) are ensured by an update algorithm and are not considered directly in the solution of the optimization problem.
A crucial point is to find an admissible start solution Therefore, we require that high-density regions, where
is attained, are packed as dense as possible such that the geometry is filled completely and then remove objects until the number
is reached. First, objects, where the density is lower than a certain tolerance value
, are removed. For any other placement, remove the object with a probability of
, where
is the center of the corresponding object. This means that in each possible position, the objects are placed in a Bernoulli distributed way with probability equal to the density. In general, the number of objects is not equal to
after this procedure. So if the number of objects is too large, remove objects in low density regions. Otherwise, if the number of objects is too low, refill positions in high-density regions.
Further details on the numerical solution of (1.14) and the update algorithm can be found in sub section 3.1.
In the next section, we present two applications to demonstrate the switching idea. They mainly differ in the evaluation of the force terms in particular the exterior forces.
3. Applications
3.1. Material flow model
We briefly introduce the microscopic and macroscopic material flow model. The models are described in detail in Göttlich et al. (Citation2014, Citation2015) and the formal derivation of the macroscopic via the hydrodynamic limit is given in Göttlich et al. (Citation2015).
3.2. Microscopic model
In the considered application case, circular-shaped parts of radius are transported on a conveyor belt. The arising exterior forces are the interaction forces between parts and boundaries as well as the friction force induced by the conveyor belt. Analogous to Göttlich et al. (Citation2015), we have to specify the force terms in (1.1) as F being the interaction force between the parts and G the friction force of the belt combined with wall forces. The interaction force F in Equation (1.1b) can be split into a tangential part
and a normal part
:
where denotes the common Heaviside function with
if
and
otherwise. The normal force component itself can be split into an elastic repulsive part
and a dissipative part
:
The repulsive force is modeled by a spring damper model with the normal spring constant while the dissipative force is equipped with the normal viscous coefficient
. The tangential force is given by
with Coulomb friction coefficient and tangential viscous damping coefficient
. The tangential velocity
is
The friction force describes the interaction between a part and the surface of the conveyor belt
with constant positive velocity of the conveyor belt , part mass
and gravitational constant
. The bottom friction coefficient
and the bottom viscous damping coefficient
depend on the material of the belt and of the parts.
The interaction force between the parts and the boundaries of the conveyor belt are modeled in the same way as the interaction force of the parts. The set containing the indices of walls and boundaries is called .
The exterior forces are the sum of the interaction forces with the boundaries and the friction forces between the parts and the conveyor belt
with and
the normal and tangential forces exerted by the walls on part
.
The complete microscopic material flow model is obtained by inserting these force terms into the general microscopic model (1.1) and reads
with F and G as in (2.1), (2.2) and initial conditions .
3.3. Macroscopic model
The static space-dependent velocity in Equation (1.7) represents the friction force of the conveyor belt and the force exerted by the boundaries of the given setting, see Figure . The resulting velocity field is shown in Figure . The dynamic velocity
is needed to deal with situations of maximal density
.
For the formulation of the macroscopic model as in (1.9a) we set
where the static velocity field is as in Figure . The nonlocal dynamic vector field
should be active if the density exceeds a maximal density
and parts start to pile up. Below the maximal density,
is inactive, i.e. free flow regime, and the parts are transported with the velocity given by
. Thus, the dynamic vector field includes the interaction between parts weighted by the factor
and models the formation of congestion in front of an obstacle by the collision operator
:
where denotes the common Heaviside function and
The negative of the gradient of the convolution means that if there is a pile of maximal density, the mass will be pushed in a region with lower density. Inside a pile with maximal density, this force will be zero. Additionally, we have the initial condition
and the boundary condition
The computational domain is denoted by and the boundaries are
. The inflow boundary at the left in Figure is called
. The walls and the obstacle are denoted by
, even if the obstacle is not at the boundary of the computational domain. The normal vector is called n(x).
The complete macroscopic material flow model is obtained by inserting the velocity components (2.4) into the closure velocity (1.7). Then, the analogon to system (1.9) reads as follows (see (Göttlich et al., Citation2014)):
3.4. Pedestrian flow model
3.4.1. Microscopic model
In the following sections, the pedestrian model derived by Helbing (Helbing et al., Citation2000) is briefly reviewed and a corresponding macroscopic model is stated. We assume the pedestrians to be of circular shape with radius and to act in the same way in each direction, meaning that the forces are rotationally invariant. We specify again the force terms F for the interaction and G for the desired velocity of pedestrians as well as the forces exerted by the walls. We set
to characterize the interaction force between pedestrian
and
in (1.1b). The latter is modeled as
with and
the Heaviside function. The constants
are positive, whereas
can be equal to zero if tangential force effects are neglected. The distance of pedestrians
and
is given by
with
and
the centers of mass,
is the normalized vector pointing from pedestrian
to pedestrian
,
is the tangential direction and
.
The interaction force between wall
and pedestrian
is modeled as
with being the distance of pedestrian
to wall
,
the normalized normal vector of wall
and
the tangential vector of wall
. Combined with the component of the desired velocity
where is the reaction time and
is the desired velocity depending on the pedestrians location, we set the exterior force as
Compared to the material flow model, where the main ingredient is the friction of the conveyor belt, the exterior force for the pedestrian model is mainly driven by the desired velocity of pedestrians. Note that this leads to a different numerical treatment within the switching algorithm. Inserting these terms into the system (1.1), we have the scaled microscopic pedestrian model
with initial positions and velocities
.
3.4.2. Macroscopic model
For the macroscopic pedestrian model, we have to determine the parts of the velocity , see (1.7), as
with
is the desired velocity depending on the pedestrians location and
where is defined before. The constants
and the radius of the pedestrians
are the same as in the microscopic model. Here,
denotes the distance of x and the interacting wall.
The complete macroscopic pedestrian model then reads as
with Equation (2.12b) the initial condition, (2.12c) specifying the inflow condition and (2.12d) the boundary condition.
4. Numerical discretization
In this section, the numerical discretization of the microscopic (1.1) and the macroscopic model (1.9) are presented. The discretized models are then used to set up the hybrid switching method introduced in subsection 1.2.
We set the time step of the discretization. The discretized microscopic model reads
together with the initial condition
It is solved via a classical Runge-Kutta method of fourth order. If the specific application is known, a priori estimates can be performed for the force terms F and G. Then, the time step can be chosen appropriately and the need of an adaptation of the step size during the computation can be avoided.
For the discretization of the macroscopic model we denote by ,
the space step sizes and
the time step size. The grid points are defined as
The space is subdivided into squares with grid constants
for
. We apply a finite volume scheme, where the density is considered as a piecewise constant function
Due to (1.7), we have that the velocity parts and
only depend on
or x, respectively. This allows for a separate numerical computation in terms of the numerical fluxes
where the density-dependent part is given by
and the position-dependent part is
We remark that f and g depend on the application we have in mind. In vertical direction, the computation of the numerical fluxes and
follows analogously.
A dimensional splitting method is used to reduce the original two-dimensional problem into the solution of one-dimensional problems only. The discretized system is then
with the set containing the grid points corresponding to the boundaries of the underlying domain. The step sizes have to be chosen such that the CFL condition
for is fulfilled.
4.1. Hybrid switching algorithms
The numerical discretizations are now used to present an implementation of the hybrid switching method, see subsection 1.2.
4.1.1. Microscopic to macroscopic representation
As we have seen, the given geometry is partitioned into grid cells for the numerical computation. Let us denote by and
vectors containing the
- resp.
-coordinate of the grid cell centers. Corresponding to (1.13), the density in grid cell
can be calculated via
with being the density corresponding to object
, see Equation (1.12). The variance
has to be chosen such that the numerical support of the bell function is larger than the actual domain of one object, otherwise we obtain peaks for densely packed objects and not a uniform-density distribution. In doing so, the implementation of the microscopic to macroscopic direction is straightforward as expected.
4.1.2. Macroscopic to microscopic representation
The optimization problem (1.14) can be interpreted as a nonlinear least squares problem if the constraints (1.14c) and (1.14d) are omitted (cf. discussion in subsection 1.2) and treated in an additional routine. Therefore, the computation of the macro to micro switching direction can be split into the following steps:
Find admissible start solution
: The pseudocode to find an admissible start solution is specified in algorithm 1. The algorithm can be run several times to improve the configuration of the start solution since a random choice of object placement is used.
Solve nonlinear least squares problem (1.14a)–(1.14b): The nonlinear least squares problem is solved with the MATLAB function lsqnonlin https://de.mathworks.com/help/optim/ug/lsqnonlin.html and requires the solution
of algorithm 1 as initialization. The numerical solution of the nonlinear least sqaures problem is denoted by
.
Solve problem including the constraints (1.14c)–(1.14d): The main idea of the so-called update algorithm 2 is to move the objects
with coordinates
from the optimized solution
such that they do not overlap any more. This means in particular if object
interacts with object
or with the wall, i.e.
or
, we set
and check again for interactions until
is less than a predefined tolerance
. The final configuration satisfying (1.14c)–(1.14d) is denoted by
.
Algorithm 1 Find admissible start solution
Input: Density ρmac, mass m, radius r, # objects N, tolerance , admissible region Ωad
Output: Solution P containing the coordinates of the object centers
1: Compute a hexagonal grid structure with grid point distance 2r and grid points gi: = (xi, yi)
2: for i = 1: # grid points do
3: if gi ∉Ωad then
4: Delete grid point gi
5: end if
6: end for
7: for i = 1: # remaining grid points do
8: Determine corresponding density value ρi = ρmac(xi, yi)
9: if ρi <
then
10: Delete grid point i
11: else
12: Delete grid point i with probability (1 − ρi)
13: end if
14: end for
15: if N > # remaining grid points then
16: Put grid point with index argmaxi{ρi|gi has been deleted} until N is met
17: else if N < # remaining grid points then
18: Delete grid point with index argmini{ρi|gi not deleted} until N is met
19: end if
20: return Remaining grid points as matrix P corresponding to the placed objects centers
Figure shows a possible evaluation of the update algorithm including a figure for the macroscopic density that should be reproduced, see Figure , a figure for a possible start solution computed by algorithm 1, see Figure , a figure for the optimized solution applying the MATLAB algorithm lsqnonlin, see Figure , where we directly observe that the non-overlap condition is injured, and a figure for the final solution after applying the update algorithm 2, see Figure . Concluding, the latter is a combination of the start and optimized solution. We observe that in regions, where the density is high, the objects are placed as dense as possible, whereas in regions, where the density is far from the maximal density, objects get stuck.
Note that the runtime growths linearly in for algorithm 1 and the solution of the optimization problem. The runtime for the update algorithm 2 growths cubically in
. However, the solution of the optimization problem using MATLAB takes several hours and dominates the performance of the update algorithm for the test cases we present in Section 4.
Algorithm 2 Update algorithm ensuring the non-overlapping condition
Input: Solution Q of least squares problem, start solution P, admissible region Ωad, tolerance δ
Output: Final solution S ensuring a placement of the objects without overlapping
1: Initialize solution with S = P
2: for k = 1: N do
3: for i = 1: N do
4: interaction = 0
5: Place object i at optimized position: S(i) = Q(i)
6: if
then
7: interaction = 1
8: end if
9: for j = 1: N do
10: if |S(i) − S(j)|2 ≤ 2r, j ≠ i then
11: interaction = 1
12: end if
13: end for
14: if interaction = 1 then
15: if |P (i) − S(i)| < δ then
16: STOP, S(i) = P (i), go back to step 3
17: end if
18: S(i) = (P (i) + S(i))/2 and go back to step 6
19: end if
20: end for
21: end for
22: return Final solution S
5. Numerical results
The application examples in Section 2 are now analyzed from a numerical point of view. For each scenario, implementation details on the model are given and numerical examples are explained in detail.
5.1. Results for the material flow model
The numerical results of the switch are investigated for a setting as presented in Figure . This experimental setup has been originally introduced in Göttlich et al. (Citation2014), where the microscopic and macroscopic material flow models have been validated against real data. The idea is now to use the same data to test the performance of the switch.
As described in Section 3, the simulation of the microscopic model is done with a classical Runge-Kutta method of fourth order which is applied to the discretized microscopic model (3.1). The discretization of the force terms stated in Section 2.1 is straightforward. The parameters are characterized by the bottom viscous damping coefficient , the normal viscous coefficient
, the viscous damping coefficient
, the normal spring constant
, the bottom friction coefficient
, the mass
, the radius
, the gravitational constant
, the Coulomb friction coefficient
, the time step size
and time horizon
. The number of parts is
Considering the macroscopic material flow Equations (2.8), we have to evaluate the numerical fluxes for the static velocity
and the dynamic velocity, see (2.4),
according to (3.3), where the first component of the interaction operator (cf. (2.6)) is discretized as
with
and being a grid cell. The discretization of the second component with respect to the
-direction is computed analogously. We refer to Göttlich et al. (Citation2014) for more details. We choose a Gaussian convolution kernel
of type
As grid sizes of the macroscopic model, we have and
. The final time horizon is again
and the switch is evaluated at time
To validate the results of the switching procedure from micro to macro, the evolution of parts including the switch of the system is compared to real data, cf. (Göttlich et al., Citation2014). We measure how many mass or parts leave the system behind the obstacle, i.e. the outflow over time. The corresponding diagram is shown in Figure .
The maximal outflow error, meaning the maximal difference of the outflow of the model including the switch and the real data outflow, is about . The maximal outflow error of the macroscopic model without any switch is approximately
(see (Göttlich et al., Citation2014)), and thus indicates that the switch performs quite well.
The reverse situation, i.e. from macro to micro, is depicted in Figure . Here, the left picture shows the particle distribution resulting from the update algorithm 2. Even if the switch from the macroscopic to the microscopic representation is the more difficult direction, the maximal outflow error is now smaller compared to Figure . This is due to the higher accuracy of the microscopic model. The maximal outflow error, again compared to the real data outflow, is about .
5.2. Results for the pedestrian flow model
We consider an experimental setting with a room which has to be evacuated. Figure shows the room geometry as well as the static velocity consisting of the desired velocity and the wall forces
, see Figure .
For the numerical implementation, almost the same parameters as in Helbing et al. (Citation2000) are used. We choose the number of pedestrians as , the mass
, the radius
, the desired velocity
, the acceleration time
, the constants
and the parameter
. Since during the derivation, the tangential forces are neglected, we set
to directly compare the microscopic and macroscopic results. The final time horizon is
and the time step to solve the Runge-Kutta scheme is
.
The discretization of the force terms stated in Section 2.2 is straightforward, see (3.1) such that a classical Runge-Kutta method of fourth order is used again.
Corresponding to the discretization of the macroscopic Equation (3.4), the discretized version of the flux terms (3.3) is
with
and being a grid cell. The function
is defined as before. For the external force term, it is
with
with the distance of point
to wall W.
We choose nearly the same parameters as in the microscopic case, i.e. only the parameters and
have to be varied, to match the results of the pure microscopic simulation. As grid sizes, we have
and
.
Similar to the switch for the material flow model, a switch is implemented for the pedestrian model at time To compare the qualitative behavior of the models, the outflow at the door is measured. Since there is no real data available this time, the outflow of the model with switch is compared to the outflow without any switch, contrary to the material flow case.
Figure shows the density distribution from the microscopic to macroscopic representation and the outflow behavior over time. As we can observe, the outflow of the switched model is close to the simulation results obtained from the microscopic simulation only. The maximal outflow error is about .
The results for the macro to micro switch can be found in Figure . Considering the outflow diagram, the results of the switched model are compared to the macroscopic simulation. The maximal outflow error is about , which is within an acceptable range.
5.3. Computation times
Finally, we present the computation times for our switch implementation. All computations have been performed on a PC equipped with 16 GB Ram, Intel(R) Core(TM) i5-4690 [email protected] GHz. Tables and show the computation times for both switching directions (micro to macro and vice versa) and the two applications material and pedestrian flow. The same discretizations as introduced formerly are used. However, we remark that in the macro to micro direction the radius needs to be adapted in order to match the total mass (1.10).
Table 1. Computing times [sec] for the material flow model
Table 2. Computing times [sec] for the pedestrian model
The times for the three steps in the macro to micro direction are listed separately. As we can see, the most time-consuming part is the solution of the optimization problem (1.14) which takes several minutes up to almost one hour for objects, whereas the computation of the start solution (algorithm 1) as well as the update algorithm 2 takes only a couple of seconds.
The total computation time increases exponentially with the number of objects. Nevertheless, it might happen that an optimum is found quite fast, e.g. for pedestrians in Table . Note that the total computation times differ due to the different discretizations and geometries for the material and pedestrian flow models, cf. discussions in sub sections 4.1 and 4.2.
The computation time of the microscopic model (without any switch) increases quadratically in the number of objects (Göttlich et al., Citation2014). Therefore, the simulation of the macroscopic model provides a less costly alternative and good results. A switch to the microscopic representation is for instance useful if the user is interested in a better resolution of the underlying dynamics, even if the optimization step takes some time.
6. Conclusion
We have presented a switching method that allows to change dynamics from a microscopic to a macroscopic scale and vice versa. The method has been applied to material and pedestrian flow models to demonstrate the good numerical performance. In particular, the comparison of the material flow switch with real data shows quite promising results. Further research might include automatized switching decisions dewpending on suitable measures or discretizations (Agarwal & El-Sayed, Citation2018) as well as stochastic perturbations (Zhang et al., Citation2017).
Additional information
Funding
Notes on contributors
Simone Göttlich
The Scientific Computing Research Group belongs to the Department of Mathematics at the University of Mannheim. It was founded in 2011 and directed since then by Prof. Göttlich. The research focuses on the mathematical modeling, numerical simulation and optimization of dynamic processes with applications in manufacturing systems, traffic flow and pedestrian dynamics and power grids.
References
- Agarwal, P., & El-Sayed, A. A. (2018). Non-standard finite difference and Chebyshev collocation methods for solving fractional diffusion equation. Physica A: Statistical Mechanics and Its Applications, 500, 40–49. doi:10.1016/j.physa.2018.02.014
- Aggarwal, A., Colombo, R. M., & Goatin, P. (2015). Nonlocal systems of conservation laws in several space dimensions. SIAM Journal Numerical Analysis, 53, 963–983. doi:10.1137/140975255
- Bellomo, N., Piccoli, B., & Tosin, A. (2012). Modeling crowd dynamics from a complex system viewpoint. Mathematical Models Methods Applications Sciences, 22, 1230004–1230029. doi:10.1142/S0218202512300049
- Carrillo, J. A., D’Orsogna, M. R., & Panferov, V. (2009). Double milling in self-propelled swarms from kinetic theory. Kinetic and Related Models, 2, 363–378. doi:10.3934/krm
- Cleary, P., & Sawley, M. (2002). DEM modelling of industrial granular flows: 3D case studies and the effect of particle shape on hopper discharge. Applied Mathematical Modelling, 26, 89–111. doi:10.1016/S0307-904X(01)00050-6
- Colombo, R. M., Garavello, M., & Lécureux-Mercier, M. (2012). A class of nonlocal models for pedestrian traffic. Mathematical Models Methods Applications Sciences, 22, 1150023. doi:10.1142/S0218202511500230
- Colombo, R. M., & Lécureux-Mercier, M. (2012). Nonlocal crowd dynamics models for several populations. Acta Mathematica Scientia, 32, 177–196. doi:10.1016/S0252-9602(12)60011-3
- Cristiani, E., Piccoli, B., & Tosin, A. (2011). Multiscale modeling of granular flows with application to crowd dynamics. Multiscale Modelling and Simulation, 9, 155–182. doi:10.1137/100797515
- Cristiani, E., Piccoli, B., & Tosin, A. (2014). Multiscale modeling of pedestrian dynamics, vol. 12 of MS&A. Modeling, Simulation and Applications. Cham: Springer.
- Cundall, P. A., & Strack, O. D. L. (1979). A discrete numerical model for granular assemblies. Géotechnique, 29, 47–65. doi:10.1680/geot.1979.29.1.47
- Degond, P., Ferreira, M. A., & Motsch, S. (2017). Damped Arrow-Hurwicz algorithm for sphere packing. Journal of Computational Physics, 332, 47–65. doi:10.1016/j.jcp.2016.11.047
- Etikyala, R., Göttlich, S., Klar, A., & Tiwari, S. (2014). Particle methods for pedestrian flow models: From microscopic to nonlocal continuum models. Mathematical Models Methods Applications Sciences, 24, 2503–2523. doi:10.1142/S0218202514500274
- Göttlich, S., Hoher, S., Schindler, P., Schleper, V., & Verl, A. (2014). Modeling, simulation and validation of material flow on conveyor belts. Applied Mathematical Modelling, 38, 3295–3313. doi:10.1016/j.apm.2013.11.039
- Göttlich, S., Klar, A., & Tiwari, S. (2015). Complex material flow problems: A multi-scale model hierarchy and particle methods. Journal of Engineering Mathematics, 92, 15–29. doi:10.1007/s10665-014-9767-5
- Göttlich, S., Knapp, S., & Schillen, P. (2017). A pedestrian flow model with stochastic velocities: Microscopic and macroscopic approaches. Retrieved from https://arxiv.org/pdf/1703.09134.pdf
- Helbing, D., Farkas, I., & Vicsek, T. (2000). Simulating dynamical features of escape panic. Nature, 407, 487–490.
- Herty, M., & Moutari, S. (2009). A macro-kinetic hybrid model for traffic flow on road networks. Computational Methods in Applied Mathematics, 9, 238–252. doi:10.2478/cmam-2009-0015
- Moutari, S., & Rascle, M. (2007). A hybrid Lagrangian model based on the Aw-Rascle traffic flow model. SIAM Journal Applications Mathematical, 68, 413–436. doi:10.1137/060678415
- Ruzhansky, M., Cho, Y., Agarwal, P., & Area, I. (2017). Advances in real and complex analysis with applications. Singapore: Trends in Mathematics, Springer.
- Zhang, X., Agarwal, P., Liu, Z., Peng, H., You, F., & Zhu, Y. (2017). Existence and uniqueness of solutions for stochastic differential equations of fractional-order q>1 with finite delays. Advances in Difference Equation, 2017, 123. 18.