I having difficulty wrapping my head around a concept that I wish to solve. There exists a 10L tank of compressed air at 100psi. When an outlet hole of cross-sectional area of 0.115 $in^2$ is opened, I wish to develop a curve of pressure vs. time from $t=0$ until pressure drops from 100psi to atmospheric (0 psi). Many things can be neglected in this situation, such as friction etc., since I would like a general curve to compare with experimental data. I am unsure of how to apply fluid dynamics to a vessel that empties simply due to its own pressure difference through an area.

Temperature can be assumed to be constant at 25C as well.

  • $\begingroup$ So what is the concept you're trying to solve? $\endgroup$ May 29, 2018 at 13:14
  • $\begingroup$ Basically how long it takes for the tank at 100 psi to reach 0 psi (atmospheric pressure), where the air escapes through a given hole. The rate at which air is leaving through the hole will obviously drop as the pressure drops, so I am thinking that some integrating method is necessary. $\endgroup$
    – ab042896
    May 29, 2018 at 13:21
  • $\begingroup$ Search for 'choked flow' calculations. $\endgroup$
    – Jon Custer
    May 29, 2018 at 15:18

4 Answers 4


Starting with the conservation of mass for the system

$$ \frac{dm}{dt} = -\rho v A \tag{1}$$

with $m$ the mass of the gas, $\rho$ its density, $v$ its velocity and $A$ the area of the hole

where $m = n/M_w$ and $ n = PV/RT $, this simplifies to

$$ \frac{d}{dt}(\frac{PV}{RTM_w}) = -\rho v A \tag{2}$$

The gas volume will remain constant, but the pressure will not (im assuming constant T as well, it gets real messy if its not ). Simplifying a bit substituting the density with the ideal gas law, we find

$$ \frac{V}{RTM_w}\frac{dP}{dt} = -\frac{M_wP}{RT} v A \tag{3}$$

Simplifying a bit

$$ \frac{1}{P}\frac{dP}{dt} = -\frac{M_w^2A}{V} v \tag{4}$$

You wish to find $P$ but cant integrate just yet because $v$ is time and pressure dependent, so we need expressions for $v$

So, according to Bernoulli,

$$v^2 = \frac{2(P-P_{atm})}{\rho} \tag{5}$$

again, replacing the density with ideal gas law,

$$v^2 = \frac{2(P-P_{atm})RT}{M_wP} \tag{6}$$

Simplifying a bit

$$v^2 = \frac{2RT}{M_w} - \frac{2RTP_{atm}}{M_w}\frac{1}{P} \tag{7}$$

Taking the square root and grouping constants,

$$v = \sqrt{\alpha - \beta\frac{1}{P}} \tag{8}$$

Substituting (8) into (4) and grouping the constants in (4), we end up with

$$\frac{dP}{dt} = -\gamma P \sqrt{\alpha - \beta\frac{1}{P}} \tag{9}$$

Now you can integrate. That is waaaay above my skill level to do analytically but wolfram did something

$$P(t) = \frac{e^{-c_1 \sqrt{\alpha} -\gamma t \sqrt{a}} (\beta e^{\gamma t\sqrt{\alpha}} + e^{c_1 \sqrt{a} })^2}{4 a}$$

No idea if that is even remotely correct. I would just do equation (9) numerically

EDIT: Did it numerically with your data


I cant figure how to change the colour of the graph in Polymath but I think its good enough to get a general idea. The gas losses 99.99698% of its initial pressure over 150 seconds. The wolfram analytical answer might actually be correct it seems

EDIT2: In your practical experiments it might take longer because of cooling effects of the gas, but I dont know how much longer. A good starting point if you want to derive such a system, is to start at equation (2) and use the chain rule on the P/T terms (Volume of the system is constant, so isochoric equations might help). It produces the problem of having to find equations for P' and v as before, but also T'. And I dont have a plan to do that at the moment because I cant seem to use the first law of thermo without producing another term (Q' in this case) because the PV work is zero, and therefor have no way of relating T' to anything else.

EDIT3: Perhaps one could use an enthalpy approach. $dH = TdS + VdP$ and $dS = dQ/T$ , so that $dH = dQ + VdP$.
Therefor $C_pdT = C_vdT + VdP$ Simplifying delivers $(C_p-C_v)dT = VdP$

Here is where it starts getting tricky again. Normally, Cp and Cv are temperature dependent. Divide them out, and then you have an equation for dT (albeit dirty) that can be replaced in the modified equation (2) so that equation (2) is only an ODE in Pressure. Solving that one and the temperature one simultaneously might produce a more realistic answer. I could be wrong though, so take EDIT3 with a grain of salt

EDIT4: Reply to comments got too long

Changing it to allow for a slightly larger initial pressure is a trivial exercise, really. Graph shape will remain the same, initial condition only changes. Regarding the "realism" of it, it might be faster in real life because a quick check on the gas velocity showed that it was just over the speed of sound (initially). This means your well above the rule of thumb of mach 0.3 limit for in-compressible fluids. I do not have enough practical or mathematical experience to give an estimate on how a real gas would change the system. Doing that is a lot of work, where your choice of assumptions would definitely impact the result, e.g fugacity based approach. For your second comment, yes of course. Simply use the ideal gas law to relate the quantities. $\rho = PM_w/RT$. Doing it in chunks, yes of course. I manually chose the run time of the model. In chunks you will need better software than Polymath so that you have exit conditions and such for your loops. Matlab would be great at it. Simulink would work too if you know/can find out how triggers work. If you want to iterate every 10psi to find a "simpler" solution to the problem, you will merely have an approximate version of what I have here. Here, essentially, Im running it in 0.002psi increments.

  • $\begingroup$ Wow, lots of info to start diving into. Thank you so far. Looking at the graph though, 100psi is relative pressure, so that would be about 114.6959psi absolute, which is 7.80atm. Then it would go down to 1atm. Just thinking through this conceptually, over two minutes seems like a long time for air to reach a pressure equilibrium to be established considering the cross-sectional area of this escape is 0.115in^2, not huge, but not a pinhole either. $\endgroup$
    – ab042896
    May 30, 2018 at 13:59
  • $\begingroup$ On another note, it is possible to find the density of the air in the volume at every given pressure from 100psi to 0psi, and the coressponding mass of the air at that density (considering the volume isn't changing). Would it be possible to find the mass flow rate in segments? For example, find the mass flow rate of air from 100psi to 90psi, then since we know the masses at each of 100psi and 90psi, calculate how long that would take? Then iterate this process of 10psi segments until 0psi? $\endgroup$
    – ab042896
    May 30, 2018 at 14:12
  • $\begingroup$ I updated the post under EDIT4 with my response. $\endgroup$
    – 22134484
    May 30, 2018 at 18:00
  • $\begingroup$ @22134484, when the pressure ratio of tank pressure divided by atmospheric pressure is >=2, there will be choked flow exiting the small hole in the tank, and the fastest achievable air velocity will be sonic velocity exiting the hole. Have you considered this in your analysis? $\endgroup$ Sep 1, 2019 at 19:51

This can be solved as compressibel flow problem. You have to solve it by two different equations first one is for the choked flow and second is unchoked flow. You can find solution for choked flow in any compressible flow book like Zucrow etc. For unchoked flow search paper of D R Chenoweth on osti.org (section C ) specifically. or the paper of J.C.Dutton or R.E.CoverDill.


Well, I made the calculations and solved the diff eq analytically. The tank with your data (10 liters, $p_0$=6.8 bar, the hole of 0.115 $in^2$, which is 9,7 mm in diameter) empties in 1.05 sec. which is a plausible value. You made some errors in deriving your eq. My eq is $$ \frac {dx}{dt}=-\frac{A_0}{V_0}\sqrt{\frac{2RT}{M_w}}\sqrt{x(x-1)} \tag{1} $$
where $V_0$ is the volume of the tank and $A_0$ is the exit area, $x=\frac{p}{p_A}$, where p is the tank pressure, $p_A$ is the atmospheric pressure, so x is the pressure in bars. Let $x_0$ be the initial pressure. Then, the exact solution of this equation will be $$ x(t)=\frac 1 8 \frac{4(C e^{-Kt})^2+4Ce^{-Kt}+1}{Ce^{-Kt}} \tag{2} $$ with $$ K=\frac{A_0}{V_0}\sqrt{\frac{2RT}{M_w}} $$ and C is a constant found from initial condition $x(0)=x_0$ $$ C=x_0+\sqrt{x_0(x_0-1)}-\frac 1 2 $$ Then, the emptying time (i. e. t when $p=p_A \implies x=1 $) will be finite and equal to $$ T_e=-\frac{\log\frac{1}{2C}}{K} $$ Note that when $p_A=0$ then x-1 becomes x and equation (1) simplifies to $$ \frac {dx}{dt}=-\frac{A_0}{V_0}\sqrt{\frac{2RT}{M_w}}x $$ i. e. $$ \frac {dx}{dt}=-Kx $$ and in this case $$ x(t)=x_0 e^{-Kt} $$ so in vacuum the pressure will drop exponentially.

For 10-100x smaller leak areas this model gives acceptable results and the pressure drop is sufficiently slow to be isothermal.


This is not an easy problem as you're not working with an ideal incompressible gas, to solve this you need look equations that allow for compressible gas.

This throws easy equations such as Bernoulli out of the windows. Bernoulli With liquids this is muchs easier to calculate often since you need higher pressures for compression.
Also as it's compressible you'll get adiabatic expansion, this means that the tank/gas is actually going to cool down, due to the expanse and it's not a little bit (at least initially when the pressure is much higher than atmospheric). You can not neglect this as it affects density, that makes this all a very complicated problem and not something that can be easily simplified. Solutions are either take a look at the Navier-Stokes equation and use a simulation software like Comsol.

Or take a look at this paper that calculates what you are asking for, all the equations are already there: Link to the article to do the calculations

It would take some time but in about 10-30 minutes you could solve your problem and plot it in excel/Matlab.

Ps just to give you an idea of how much it cools, form $25^oC$ to around $-130^oC$ Want to calculate it yourself go here

  • moles 0.274
  • volume initiallly .01 $m^3$
  • Final volum 0.031 $m^3$
  • Initial Temp 298 $K$
  • $\begingroup$ Perhaps it would be helpful to start with the simplest case, and work up from there. I will be be testing this to achieve experimental results, and then I can compare with calculations of varying scope. If we neglect a change in temperature, what would the calculations look like? $\endgroup$
    – ab042896
    May 29, 2018 at 18:06
  • $\begingroup$ The simplest case would be using bernoulli and conservation of mass, as given by the other response. However with pressure as high as 6.8 bars (of difference) and a temperature change of about $150^oC$ there aren't any good and easy simplifications you could make that will give you a reasonable answer. The paper is real easy to apply just plug in the numbers, no super crazy math there. Also I find it hard to understand why this gets downvoted as the paper does a good job explaining the physics. $\endgroup$ May 30, 2018 at 2:06
  • $\begingroup$ It looks helpful, but I am having difficulty understanding it and applying it to my situation. I am confused on how to find the velocity of flow. Where are they getting the a0 terms from? On page 3 they a0=1100ft/s and a0=387m/s respectively. Where do these numbers come from? $\endgroup$
    – ab042896
    May 30, 2018 at 14:28
  • $\begingroup$ If you don't read most of the paper it's hard, but $a_0$ is the sonic speed at that temperature (~1100 ft/sec @ 18C and 387m/s @390C). Initial speed is not that complicated to estimate the system is quasi steady-state meaning, you can estimate it with Bernoulli, which shows us it's clearly (super)sonic. Hence why I posted this paper as this is not an easy derivation as you can see. So your $a_0 =346 m/s$. $\endgroup$ May 30, 2018 at 15:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.