204 Agent-Based Modeling and Simulation with Swarm
TABLE 7.9: Meanings of the colors of the cells.
Color Meaning
Brown Race 1
Dark green Race 2
Navy (deep blue) Race 3
Red Philanthropist of race 1
Green Philanthropist of race 2
Blue Philanthropist of race 3
Magenta Church of race 1
Light blue Church of race 2
Cyan Church of race 3
White The state of church with a person in it (for all races)
model is used to simulate fluids, where particles are placed on a lattice and
then move to a neighboring lattice or collide with other par ticles based on
predetermined rules at specified time units. The dire c tion in which the particle
moves after a collision is defined by simple rules.
The fir st LGA model was proposed in 1973 by Hardy, Pomeau, and de
Pazzis, a nd thus is called the HPP model [41A]. Collision and scattering are
repeated on a square lattice in this model. Only head-on collisions are con-
sidered, and particles scatter and change direction by 90
as in the following
picture.
=
(7.10)
=
(7.11)
Note that the number of particles and the momentum are conserved in this
model. Fig. 7.14 is an example of a collision process in the HPP model. How-
ever, false physical quantities and anisotropy of stress tensors (pressure) be-
come issues in this model. This arises from a biase d r e action because no r e ac-
tions happen in the diagonal direction on the square lattice. Simulations on
such models are in conflict with physical phenomena such as that described
by the Navier–Stokes equations.
Cellular Automata Simulation 205
(a) (b)
(c) (d)
FIGURE 7.14: An example of a collision process in the HPP model
((a)(b)(c)(d)).
206 Agent-Based Modeling and Simulation with Swarm
FIGURE 7.15: Collisio n process in the FHP model.
In 1987, Frisch, Hasslacher and Pomeau proposed an LGA method on a tri-
angular la ttice to re solve these issues [37A]. This is known as the FHP model.
A collision process in the FHP model is shown in Fig. 7 .15. The FHP method is
used to simulate the flow of fluids around obstacles, for instance. This method
is also used to model phase sepa ration, phase tr ansition, microemulsion by
surfactants, heat flow, reaction, and diffusion.
The following advantages are obtained by analyzing fluids in the LGA
method.
(1) Simulation is numerically stable because particles can take states of 0
and 1 only. Therefore, rounding errors do not need to be considered as
in exper iments.
(2) Reaction rules are very simple because the model is a repetition of col-
lisions and diffusion.
(3) Each pa rticle reacts independently; therefore, simulation can be highly
parallelized.
(4) Complex boundary conditions can be set, making this suitable for sim-
ulation of complex systems.
However, the following disadvantages are known in the LGA method.
(1) Visualization is difficult because particles can take o ne of 0 and 1 states
only. In other words, s tatistical procedures are nec e ssary to obtain mor e
relevant physical q uantities.
Cellular Automata Simulation 207
FIGURE 7.16: Simulation examples of r ain drops using the LGA method.
(2) Non-physical elements may app e ar.
(3) Dynamic parameters such as temperature are difficult to handle.
The lattice Boltzmann method incor porating probabilistic generation r ules
has recently been used in simulations of physical systems to overcome these
drawbacks. Figure 7.16 is an example of simulation using the L GA method.
Numerous videos of LGA simulations are also available online (see [30], for
example).
7.6.1 LGA simulation with Swarm
LGA simulation by Swarm is shown in Fig. 7.17. Here, gas particles col-
lision by the HPP model is implemented. The particles flow into the hollow
(cavity) part from the horizontal and vertical directions, and their diffusion
can be observed. As mentioned earlier, note that, since the collisions in the
diagonal direction in a square lattice (grid) are not taken into account, there
is a deviation in the reaction. Due to this limitation, false physical quantities
and anisotropy of the stress tensor are c aused.
Next, we show an example of simulation of fluid according to the lattice
Boltzman law, created in Swarm. The lattice B oltzman law is an extension of
the LGA law and has also been used extensively in fluid analysis. The LGA
law describes by 0, 1 (integer number) the presence or a bsence of particles
moving in some direction. However, in the la ttice Boltzman law, the particle
is represented by the local mean distribution function (real number ), and
deals with an equation of motion fo r the distribution function. In the lattice
Boltzman law, by adjusting the coefficients of the distribution function, it
can be implemented to eliminate non-physical elements. Therefore, a square
lattice can als o be used. Figure 7.18 is an example of the simulation. The gray
color part represents a slab. For flow velocity, 0 is black, and becomes bigger
208 Agent-Based Modeling and Simulation with Swarm
FIGURE 7.17: LGA simulation with the HPP model.
(a) (b)
(c) (d)
FIGURE 7.18 (See Color Insert): An example of simulation using the
LGA method.
as it moves toward white from red. The number of lattice points is 50 × 100.
By initial conditions, for all lattice points, a unifor m velo c ity ~u = (0.1, 0) and
a density of ρ = 1.0 have been sp e c ified. In the inflow boundary, uniform flow
is assumed, and the distr ibution function is obtained by extrapola ting the
velocity of the outflow boundary.
7.7 Turing model and morphogenesis simulation
“Morpho” means “shap e ,” and “genesis” means “generation.” Alan Turing
believed that the morphogenesis o f organisms could be explained by the re -
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.14.69.119