            Boolean 7 - velocity (FHP-III) 
                and interactions


Copyright  (C) 1997 D.H. Rothman and S. Zaleski. 

Covered by the GNU General Public License, see the file ../README.


This model corresponds to the main program Fhp7_msite.c 
and a number of subroutines. 

I. Non interacting code 

This codes uses  boolean operations to perform the collisions. 
To make propagation faster, sites are stored using a diagonal 
pattern: site at (x,y) = (i + j/2, \sqrt 3 / 2 j ) are stored
in location "pointer" + i + NX*j  . In other words, i,j 
correspond to the non-cartesian axes




               /  j
              /
             /
            /
           /
          /
         /
         ----------------------->i





This implies that the periodicity of the lattice is a bit unusual. 

In fact the following pattern is reproduced periodically 


	      -------- -------- ...
             /       /       /       
            /       /       /       
           /       /       /
          /       /       /
         / *     / *     /
         ---------------- ....
        /       /       /       
       /       /       /       
      /       /       /
     /       /       /
    / *     / *     /
   ----------------- .....

Any structure in this pattern (a wall, a vortex) such as the point marked *
is periodically located in a monohedral, not rectangular, pattern. 


If nx=ny, the pattern is heaxgonal. 

This does not affect most application. For instance channel flow is easily
simulated using the Solid.c program to initialize the walls. 


To run the code you should first edit the parameter lines which are now 
included in file "parameters_7.h"

#define NX 64
#define NY 64
#define TPRINT 1000
#define TMAX   3000
#define NOSEED 137

/* Density is reduced density (nr per channel) */ 

#define DENSITY 0.5
#define SOLID_SITES
#define TSTART_AVER 1000

/* #define COUNTING */ 

----------------------------------------
FORCING_RATE

The type of forcing used in Fhp7_msite is a bit more sophisticated
than the forcing in Fhp6_simp. First we subdivide the NX x NY lattice 
in blocks of size  word_len x block_len , which are fixed parameters. 
There are then two possibilities, a high forcing rate and a low
forcing rate. A high forcing rate occurs when 
    FORCING_RATE*word_len*block_len 
is larger than 1. Then we want at least one forcing in each block in each time
step. We then take the integer part 
    force_push  = (integer part of) FORCING_RATE*word_len*block_len 
and we perform force_push flips of an A particle into a D particle.

To perform the flips, we select at random a site in a given block. 
If the flip is possible, that is there is an A and there is no D, 
we perform the flip. Otherwise, we try the next site in the block, 
possibly wrapping around in the block. 

When the forcing rate is low, then for each block we draw a random 
number to decide whether we push a particle in the block. 
Once it is decided that a particle should be pushed, the site is
selected at random as above. 

In both procedures, whenever we fail to find a site to flip, a message
is printed. This error message often occurs when the forcing rate is
too high. A forcing rate too high results in all particles packed in 
one direction, with none left to flip. 

COUNTING and PARABOLAS parameters

If you uncomment  the lines

#define COUNTING 
#define PARABOLAS

the code will perform experiments setting a Poiseuille flow in the channel 
created by Solid. 
The code then automatically creates a directory with names related to 
the intensity of the forcing. 
In this form the code is rather slow. Because it needs to 
record accurately the momentum at each time step, it performs a lot
of additional calculations. 


SOLID_SITES 

If you do not wish solid sites, it may accelerate the code
then comment out the line:

#define SOLID_SITES

II. Interactions

Two possibilities existing for interacting liquid gas models. 
They are set by defining a parameter in file parameters_7.h as in 

#define INTERACTIONS

then one may define

#define INTERACTIONS_ISO

or leave the code to use

#define INTERACTIONS_CRAS

Details are given in the file parameters_7.h 


