# How to simulate mixing of gases with different compositions?

Let's assume that we have the following apparatus

in which volumes A and B are separated by a magical, impermeable, adiabatic barrier labelled S. (Let's also assume that the volumes are cubes, and the length of any one side is $$d$$.)

Volume A contains an ideal gas with a given pressure, temperature, and composition (we'll assume 70% CO2, 30% O2). Volume B contains an ideal gas with a different pressure, temperature, and composition (we'll assume 65% O2, 35% CO2).

At time $$t_0$$, we remove our magical barrier S, and we re-insert it at time $$t_1$$. Assuming that when the separator is inserted, the gases in the volumes instantly reach equilibrium, how can you determine the state (pressure, temperature, composition) of the gasses in volumes A and B?

Further, if we assume that when we re-insert the barrier, the momentum of the aggregate gases in A and B remains what it was the moment before the barrier was inserted, how can that vector be determined?

Edit: additionally, let's assume that t is generally very small (under 1 second) and that temperatures are generally between 0 and 400K

• To Physics folks - I migrated this as per the OP's request, not because it was off-topic on Chem. Commented Jan 7, 2021 at 23:11
• There are two concepts that make this though experiment very different from any real experiment: 1. The membrane vanishing in an instant would keep transversal symmetry, so no turbulence is expected (in practice, slight symmetry breaking would lead to a vortex and gas mixing) 2. The ideal gas concept assumes negligibly small molecules bouncing from the walls only, and does not realistically model viscous flow and slow diffusion of the gases, nor damping of the sound wave. If both is OK for you, it seems to be rather a simple, numerically solvable 1D PDE model. Commented Jan 8, 2021 at 5:59
• @dominecf I'll be honest, I had to do a google to understand what you meant by 1D PDE. Further, I'm absolutely fine with ignoring the results of particle collision, no matter how I look at the problem, those collisions don't seem to meaningfully impact the result. To be clear though: I'm having trouble modeling this in discrete terms. Commented Jan 8, 2021 at 13:21
• A bunch of the concepts are addressed here: physics.stackexchange.com/questions/217303/… but one of the thinks left dangling was reliance on Mean Free Path and empirically determined Diffusion Constants. This is problematic because it's unclear which diffusion constant the particles from volume A should have to deal with. If they're diffusing through volume B, then they're already in volume B. If they're diffusing through volume A, then they're in volume b once their momentum carries them over the boundary, which seems like it would - Commented Jan 8, 2021 at 13:21
• result in a radius around the interface that would say, "50% of everything within this bound for this temperature will become a part of volume B" if that's the case, it seems like the thing I really want is that radius, which seems like it can be derived without the Diffusion constant Commented Jan 8, 2021 at 13:26

2. Multiply the velocity by $$t$$ to get the distance travelled, and divide by the depth of each volume to get the ratios that could escape $$z_A$$ and $$z_B$$
3. The proportion of particles in each volume that will escape Volume A is $$\frac {z_A} 4$$, Volume B is $$\frac {z_B} 4$$