next up previous
Next: 4. Simulation Up: Discrete, Amorphous Physical Models Previous: 2. Locality

Subsections

3. Very local models

We have set the task of minimizing the size of the box that encapsulates the update. According to this framework, the smallest conceivable box that still allows interaction between sites is one that encloses just two sites at a time. We define a new class of models with the following two properties: boxes encompass only pairs of sites (fig. 3), and every transaction is conservative. We will show that a useful model is possible even with the pairwise restriction. As a consequence, we will find that crystalline geometry is not necessary either. Such an update rule does not distinguish the neighbors from each other, in the way that (for example) a CA rule does (Fig. 3). It does not make use of the crystalline structure, and so can be applied to irregular lattices.

3.1 Incorporating conservation

Conservation laws are fundamental in physics, and so they should be a part of a physical model. Local conservation also useful in dealing with the constraint of asynchrony and having only pairwise interactions. Global conservation will be achieved by construction: a certain variable or set of variables are designated as conserved quantities, and we design rules so that every local update leaves the sum of each conserved quantity over all sites unchanged.

One can thus think of the update as a ``transaction'' between sites. Periodically, a given pair of neighbors exchanges a packet of the conserved quantity; the loss from one is equal to the gain of the other. Each member of the pair then goes on to transact with other sites.

3.2 A simple example: diffusion

A simple example of the above class of models is a diffusion model, representing for example the diffusion of heat. We will call the conserved quantity q (representing the substance diffusing). A transaction between members of a pair transfers some of this quantity. In diffusion, the flux between two sites is proportional to the difference between them, so an appropriate rule is:

$\Delta q_i = (q_j - q_i) \Delta t $

\begin{displaymath}
\Delta q_j = (q_i - q_j) \Delta t
\end{displaymath} (1)

$\Delta q_i + \Delta q_j = 0$ so the transaction is conservative. Figure 5 shows a time evolution of this model.

3.3 Waves

As a more interesting example, we will simulate the physical phenomenon of waves. Waves are a ubiquitous phenomenon in physics, appearing in a variety of different systems - electromagnetic radiation and sound waves being two widely different examples that can nevertheless be described by the same kind of model.

All waves involve an amplitude associated with each point in space that changes over time. The future evolution of these amplitudes cannot be determined only from knowing all the amplitudes at a given moment. Travelling waves have a direction associated with them, and it is not possible to tell what the direction is by looking at an instantaneous snapshot; therefore they are an inherently second-order phenomenon. For this reason, the state of each site will be two quantities.

3.3.1 Momentum conserving model

We choose momentum, p, as the conserved quantity. It will be shown that the system supports propagating waves in multiple dimensions, agreeing closely with the continuous wave equation, even when the sole possible interaction is two sites exchanging a packet of momentum. We will call the other quantity position, q (representing the amplitude of the wave).

In order to determine how much momentum two sites should exchange, we associate a potential with a difference in q's between neighbors. We can think of a site as a mass free to move in one dimension, connected to its neighbors by springs. (Fig. 4) Two neighbors exert a force (i.e., change in momentum) on each other which depends on the displacement between them. Such a system is known to support propagating waves and to be approximated by the scalar wave equation ${\partial^2 q \over \partial t^2} = c^2 {\nabla^2 q}$. Thus, two sites i and j exchange momentum as follows:

$\Delta p_i = m \Delta v_i = m a_{ij} \Delta t = F_{ij} \Delta t =
f(q_j - q_i) \Delta t $

\begin{displaymath}
\Delta p_j = m \Delta v_j = m a_{ji} \Delta t = F_{ji} \Delta t =
f(q_i - q_j) \Delta t
\end{displaymath} (2)

where aij is the contribution to the acceleration of site i from site j. f gives the force as a function of the difference in amplitudes; the difference can be positive or negative. In order for the gain of one site to be equal to the loss of the other, we require f to be anti-symmetric (f(-x) = -f(x)), so that we have
\begin{displaymath}
\Delta p_i = -\Delta p_j
\end{displaymath} (3)

and momentum is conserved. We will normally use f(x) = kx, which corresponds to Hooke's Law.

Each site can now independently update its value of q using its new value for p:

\begin{displaymath}
\Delta q_i = v_i \Delta t = {p_i \over m} \Delta t
\end{displaymath} (4)

This system supports waves that can exhibit all the phenomena of continuous waves (Fig. 9), including reflection (Fig. 10) and refraction (Fig. 11). It also agrees quantitatively with a solution of the wave equation started from the same initial conditions, as shown in section 4.

3.3.2 Energy and momentum conserving model

In the above model, a difference in amplitude qi - qj between neighbors can be considered to have potential energy; and p, because it is directly related to a change in q, can be associated with kinetic energy. Some of the potential energy converted into kinetic energy, or vice versa, when an update happens. Since potentials only make sense with pairs of sites, energy cannot be described for a single site but only for a given pair. An obvious expression for the total energy of a pair {i,j} of neighbors is

\begin{displaymath}
{1 \over 2} k (q_i - q_j)^2 + {p_i^2 + p_j^2 \over 2 m}.
\end{displaymath} (5)

Designing a wave model that has a pairwise interaction rule that conserves this energy as well as momentum is more difficult than it may at first seem, for the following reason. Potential energy depends on a difference between two neighbors' amplitudes q, yet each site is potentially a member of many pairs, so changing q changes the potential energy in a way that depends on all neighbors simultaneously. So to conserve energy, it would seem necessary to know instantaneously the value of q of all the neighbors, and our box would have to enclose them as well. A site cannot avoid this problem by remembering the states of its neighbors: they may participate in other updates after this information is remembered but before it is used. The remembered state would therefore be out of date.

There is however a way to conserve energy with only pairwise interactions. We will abandon the idea of an absolute amplitude associated with each site, and instead associate a quantity with each pair of sites. Associated with the ``bond'' between two sites will be a quantity lij. This quantity alone will determine the potential energy, which is ``stored'' in the bond.1lij, instead of the relative position, will determine the potential and thus the momentum transfer between sites i and j. Its change is determined by the relative momenta of the two sites in the pair. It is now no longer possible to consider an absolute, scalar amplitude associated with each site such that the lij's are the differences between these amplitudes. The reason is that the lij's are decoupled from one another, unlike qi - qj.2

The update rule is somewhat more complicated in this case. To conserve energy, we use a leapfrog method [13] for the individual transaction. The leapfrog method advances each site a step at a time, but the position updates are a half step offset from the momentum updates:


\begin{displaymath}
p_{t+1}^i - p_t^i = -k {l_{t+1}^{ij} + l_t^{ij} \over 2} \Delta t
\end{displaymath} (6)


\begin{displaymath}
p_{t+1}^j - p_t^j = -k {l_{t+1}^{ji} + l_t^{ji} \over 2} \Delta t = k {l_{t+1}^{ij} +
l_t^{ij} \over 2} \Delta t
\end{displaymath} (7)


\begin{displaymath}
l_{t+1}^{ij} - l_t^{ij} = {p_{t+1}^i + p_t^i \over 2m} \Delta t - {p_{t+1}^j + p_t^j
\over 2m} \Delta t
\end{displaymath} (8)

where the subscript represents time, and the superscript is the index of the site.3

Solving for the new values in terms of the old:


\begin{displaymath}
p_{t+1}^i = { 2 m p_t^i + k \Delta t^2 p_t^j - 2 k m \Delta t l_t^{ij}
\over 2m + k \Delta t^2}
\end{displaymath} (9)


\begin{displaymath}
p_{t+1}^j = { 2 m p_t^j + k \Delta t^2 p_t^i + 2 k m \Delta t l_t^{ij}
\over 2m + k \Delta t^2}
\end{displaymath} (10)


\begin{displaymath}
l_{t+1}^{ij} = {2 \Delta t (p_t^i - p_t^j) + l_t^{ij} (2 m - k \Delta t^2)
\over 2m + k \Delta t^2}
\end{displaymath} (11)

We can write this a matrix T that transforms a vector of the old values of pi, pj, lij into the new ones:


\begin{displaymath}
{1 \over 2m + k \Delta t^2}
\left[ \matrix{
2 m & k \Delta...
...r
2 \Delta t & -2 \Delta t & 2m - k \Delta t^2 \cr}
\right]
\end{displaymath} (12)

The determinant of this matrix det T = 1, implying that volume in (pi, pj, lij) phase space is conserved [2] and hence the transformation conserves energy.

As shown in figure 7, this system also exhibits all wave phenomena, and agrees quantitatively with the partial differential equation model as shown in section 4.


next up previous
Next: 4. Simulation Up: Discrete, Amorphous Physical Models Previous: 2. Locality
Erik Rauch
1999-06-26