Thank you of reading me.
For the bgk method you need the following files
ran1.c         relaxation.c  writevel.c
gravity.c      model.c       testcons.c
initlat.c      propagate.c   readvel.c     user.c
bgk.h          Makefile
----------------------------------------------------------------

On the sun workstations of 
athena please type:
"make CC=suncc"
to link and create the bgk executabled.
For any other workstations use the apropiate
C compiler.
If errors occur during compiling please
let me know.
To run BGK you need a script file. An example script
file"test.bgk" is include to run the channel flow experiment.
The layout of the script file is as follows:
Each line in the script file 
schould begin with a single character whose
listed below, followed by a single
space.
These single characters are:
    '.':           indicates the end of the scrpt file
    'f':           output file name
    'g':           gravity in the z-direction 
    'r':           seed random generator
    'm':           select veloctiy
                    model and set the direction vectors
    's':           read solid and set universe
    'i':           initialize lattice
    'c':           channel
    'p':           eigenvalues

So does example script test.bgk say:
m D3Q19             use model D3Q19 (only mode available)
s solid             read file 'solid'
f testfile          write data to 'testfile.*' 
p -.25              set lambda to -.25
g 0.0004            set gravity to 0.0004
i  0.5              set reduced density to 0.5
c v 10 200 t        see for explanation below
.                   end of script file

the line c v 10 200 t means: write velocities after 2000 time steps
and check for (mass) conservation every 200 time steps.

To run bgk you should type
"bgk<test.bgk"
bgk will then write the velocities to a binary file called
testfile.vel

--------------------------------------------------------------------

The file "solid" can be generated with a program
called makesolid.
To compile and link to an executable called makesolid
please type 
"make CC=(your C compiler) makesolid"

this program can make two types of solids;
-a channel with walls at x=1 and x=Nx and length
 Nz.
-or a disk inside a open box (now walls) with
 dimensions Nx*1*Nz. The disk has radius RADIUS and
 is centered at (XC,ZC).

To choose a solid set either the parameter 
CHANNEL or DISK to 0. For example, the setting
#define CHANNEL 1
#define DISK    0
will generate a channel.
You have your own code to generate a disk of solids
To include any change of these paramters in your
solid you have to remake makesolid.
The output filename and the dimensions of the solid file
can be set from the command line for example
 "makesolid Nx=32 Nz=64 file=foo "
will generate a solid with dimensions 32*1*64 and saves it in a
binary file called 'foo'

--------------------------------------------------------------------

To visualize the velocity file you could use the included
2 matlab files:
plotvel.m creates two arrow plots, one with mean,done with zero
          mean velocity and 
plotvel.m calls readsol.m
A typical matlab session could start with
>>plotvel
(>> is the matlab prompt)
how to unpack both binary files.

Good luck and have fun.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
By the way check directory Fhp i've added files for
question 4. Please read README.TOOTOO in that directory.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!













