I have had a bit more of a think about the problem, and even done a quick experiment gently pouring cold colored water into clear hot water, and now have a better idea of what happens.
Compositepro is correct in that if you add a
body of less dense gas into the top of a vessel it will tend to float on the heavier gas for a while. But, depending on how gently you introduce the lighter gas, there will be relatively rapid mixing. And once mixed, the gases will not layer out again.
This is exactly in line with DRWeig's experience where hot light gases rise, and then rapidly mix with the rest of the environment.
The difference is that a body of gas can be lighter or heavier than the bulk gas and therefore rise or fall, but once mixed the gravity forces on an individual molecule are probably outweighed by the Brownian Motion collisions keeping the gas uniformly mixed.
Anyway, what does all this theorizing have to do with Barhp's original question?
If you can introduce the air fairly remotely from where the N2 is released then the most conservative assumption is that the vessel is perfectly mixed - i.e. do not assume that you can take advantage of plug flow or layering to flush the N2 out. There was a time when I could have set up (and maybe even have solved) the differential equations for this process, but now I would break it down into 15 second intervals and just copy the perfect mixing formulas down in my spreadsheet however many times necessary until I got the desired degree of dilution.
And then I would take moltenmetal's advice and measure the O2 concentration before entering the vessel. This is probably a statutory requirement where ever you are.
Katmar Software
Engineering & Risk Analysis Software