I would like to simulate a gas--very approximately--in 2 dimensions. The container will be divided into a grid, and instead of keeping track of each molecule of gas individually, I want to let each cell in the grid have a value for the number of particles in that cell, and another couple of values for the average velocity within the cell. This will allow me to simulate a larger number of particles, without slowing down the simulation. The problem is then this: given that a cell has n molecules at time t=0, with average velocity v, how can one approximate the number and average velocity of molecules in the 4 adjacent cells at time t=1? I guess that I need to look at the number and velocity of molecules passing across the boundary between an adjacent pair of cells over that time unit. I'm sure this problem has been solved before, I just don't know where.