# Pressure in a 2D Ideal Gas simulation

I am currently creating a 2D ideal gas simulator whereby the user can determine three of the four variables (P, V, n, T) and the gas would adjust accordingly.

I was wondering how I could calculate the pressure within this simulation. I was struggling with how to approach this problem considering how I am attempting to model a 3d scenario in 2d.

• I think how you would approach this is a bit dependent on the problem you want to translate into 2D. Do you have a specific geometry and density/temperature structure in the third dimension in mind? Because usually 2D-pressure is a quantity that is proportional to column density instead of volume density, garnered with numerical prefactors that come from integrating the density/temperature profile in the third direction. Jul 31, 2019 at 15:34
• Well, I'm trying to make this relatively simple. I'm going to make the all of the particles equal mass, and temperature equal to the square of the particle speed... I hope this answers your question. Aug 1, 2019 at 0:02
• So do you have particles or a continuum? I'm confused. Pressure and temperature are only evolvable in a continuum theory. Aug 1, 2019 at 19:24
• @AtmosphericPrisonEscape he has particles. However, you can extract pressure. He is trying to make a "molecular dynamics" simulation with classical particles (see the animation here en.wikipedia.org/wiki/Kinetic_theory_of_gases) and he is asking how to extract the pressure from such a kinetic simulation. See e.g. link.springer.com/article/10.1007/BF01014270 Jun 4, 2022 at 6:38