from one place to another, through a variable opening…

Inspired by this thread, which I thought deserved more attention than it got, I have two tangentially related questions about the movement of gases from one place to another.

Question the first: I have a sealed chamber of arbitrarily large size, divided down the middle by a wall with a shuttered opening in it. On one side of the wall is a mixture of two gases, A and B, at one atmosphere of pressure, such that the partial pressure of A is 0.5 atm and B is 0.5 atm. On the other side of the wall is a mix of gases B and C at the same total pressure, such that the partial pressure of B is 0.25 atm and C is 0.75 atm.

Now if I open the shutter, the gases will diffuse/effuse through the opening until they reach an equilibrium. I’d like to know how to figure out what the net movement of gas B is across the opening at the moment that the shutter is opened. I imagine that I would have to know something about the molecular weights of the gases involved, the total temperature, the size of the opening, and maybe some other things I haven’t thought about.

Second topic: while thinking about this, I started wondering how air moves through a doorway if the door is only partially open. Imagine a square door in the middle of a wall, such that there is wall space on all four sides of the door. As the door is opened, there is initially a tiny crack along three sides. As you swing the door open, it passes 90 degrees to the wall and eventually lies flat along the wall again, 180 degrees from its initial position. If there is a pressure difference across the doorway, air will move through the doorway at a rate that depends on the ‘effective cross-sectional area’ of the opening around the door.

So here are the questions - what sort of shape does the flow vs. angle-of-door graph make? Are there linear regions, or inflection points, or asymptotic curves, or what? Once the door passes 90 degrees, does it affect airflow any more? Is this something that can be easily described mathematically, or do you just have to build a wind tunnel and test things in the real world (especially if the shape of the door changes)?