# Air pressure equalisation

I'm programming a physics simulation and have the air pressure impact the movement of rigid bodies in the system.

I know how to (approximately, both for simplicity and performance) specify bodies' impacts on air flow and vice versa, but I don't know how to model the passive airflow.

My current approach is to sum the near pressures multiplied by a gauss-curve function to account for the distance between the examined points and then normalise the new values to keep total air pressure in the system unchanged. Then next step is multiplying calculated value by some factor $0<k<1$ and multiplying the old pressure by $1-k$. The sum of those two numbers is then used as the updated air pressure value at that point.

This sort of looks okay, but I'm certain is terribly wrong (mathematically). I know that simulating fluid dynamics is a very complex and difficult task, so I'm okay having reduced mathematical model, but I would nevertheless like to make it more realistic.

Is there a (relatively small :) ) set of equations which is enough to approximately describe the dynamics of airflow through which I could model physically realistic air diffusion in a closed system?

Edit: I'm simulating a cuboid domain. Here's an example - red is high and blue is low relative air pressure: Note that this is a single state render. Artefacts and apparent changes in particular positions are side effects of conversion to .gif and compression to allow the upload.

Air inflow, outflow and movement caused by rigid objects in the scene cause increases in air pressure in one location and decreases in the other. I am having problems defining the model which would equalise the air pressure over time.

• Do you mean a pipe flow model? It's not clear wether you are talking about flow trough bodies or flow around bodies, which would probably better be simulated with velocity dependent non-conservative forces. – CuriousOne Jun 7 '16 at 21:03