<< Chapter < Page Chapter >> Page >
(a) Example of a two-particle collision in the basic FHP model. A node in the lattice is exemplified by a hexagonal arrangement of six cells, one cell for each of the six possible lattice directions. A white cell indicates the absence of a particle at the node moving in that direction, while a filled-in cell indicates the presence of such a particle. (b) Example of a symmetric three-particle collision.

For a more detailed description of the FHP model as well as descriptions of some other possible LGCAs, see [link] .

Performing a simulation with the fhp model

Simulations that use this model proceed in essentially three steps. First, the simulation must be initialized with several parameters, such as the size and shape of the domain, number of timesteps, and the initial placement and velocity of the particles. In the code we provide below, we use a simple rectangular-shaped domain with walls on the upper and lower edges to simulate flow in a channel. We place a single particle at every node in the domain (except at thoseon walls and other flow obstacles) moving in the rightward direction.

The simulation must also have some way of knowing where the obstacles (e.g., walls) to the fluid flow are located and how the fluid ought to behave when it encounters those obstacles. That is, the boundaries of the domain must be defined, and boundary conditions must be provided.There are several possible types of boundary conditions that can be used; however, the most frequently used boundary conditions are of the no-slip type, and these are the boundary conditions used in the code below. To implement these, one simply requires that when a particle enters a node at a channel wall or obstacle boundary, it is reflected back in the direction in which it came (i.e., its velocity vector isturned around by 180 degrees). For simplicity, at the left and right edges of our channel (where there are no walls), we have implemented periodic boundary conditions. That is, we have “linked" the left and right sides of the channel together. (In reality, this means that we are no longer simulating flow through a rectangular channel, but rather through a channel of a circular shape, but by choosing the channel dimensions to be sufficiently large, the effects ofthis on our simulation can be made negligible.) It is possible to implement true inflow and outflow boundary conditions, but these (especially the latter) can be quite complicated.

Next, once the simulation is initialized, it can be carried out. Performing the actual simulation consists of carrying out the appropriate collisions at each node and the propagating (or streaming) the particles to their next nodes in the lattice. This process is repeated for each timestep until all the runs are completed.

Finally, to obtain the actual flow from the simulation, the particle velocities are averaged over large subdomains. Subdomain size can vary, but due to the high susceptability of LGCAs to statistical noise (see “Notes on Performance") section, below and [link] , pg. 157), larger subdomains will yield more accurate, albeit less detailed, results.

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, The art of the pfug. OpenStax CNX. Jun 05, 2013 Download for free at http://cnx.org/content/col10523/1.34
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'The art of the pfug' conversation and receive update notifications?

Ask