Air Pressure Simulation

Here’s some images of the beginning stages of an atmospheric physics program. It uses the ideal gas law to determine the flow of molecules from high pressure areas to low pressure areas. It still needs tweaking to get a less turbulent dispersion; currently the pressure swings are around 5 kPa which is quite a lot compared to how real air mixes on a calm day.

1500ºK - 11500ºK - 21500ºK - 31500ºK - 4

This begins with randomly assigned temperatures from 0 – 3000 ºK for each cell, then lets the pressure naturally disperse them. Each cell begins with the same amount of molecules (134 moles) and occupies 3 cubic meters.

275ºK -1275ºK -2275ºK -3275ºK -4275ºK -5275ºK -6275ºK -8275ºK -10

Here is another selection, with starting temperatures from  0-550 ºK.

The eventual goal of this physics engine is to get a more realistic physical model for games similar to Dwarf Fortress. It will expand to cover liquids, combustion, state changes in matter, etc. The model is based on cellular automata so each cell only needs to check its neighbors.