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.
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.
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.
3 thoughts on “Air Pressure Simulation”
Did you ever get anywhere with this?
I actually haven’t made much progress on this, but just last night I was revisiting using cellular automata for water levels.
One of my long term goals is creating an open source Dwarf Fortress style simulation, but it’s on hiatus at the moment in lieu of other projects.
If you know of any developers interested in collaborating on such a project please send them my way!
I certainly have interest in such a project 🙂
I’m looking at atmosphere simulation as part of a Dwarf-Fortress style game set on other planets; e.g. you dig out an area on the moon, shove an airlock on the front, install life support equipment and fill it with air. Or Venus, where you also need to pump out the high pressure corrosive atmosphere first.
Introduce the concept of failure rates, asteroid impacts and weapons, and you get satisfying looking blowouts and some interesting implications for how a base would be designed; bulkheads, shelters, emergency shutters, etc.