How to calculate pressure loss due to water leakage from a hole in a pressurized unit I am trying to develop a method for calculting the rate of pressure loss from a small hole in a pressurized vessel full of water (small air pocket likely at top of vessel).
I've found a formula for calculting the flow rate of a liquid through a small hole (link), but I don't know how to relate this to a rate of pressure decay as it is kind of a cyclical process. As water leaves the vessel, the water pressure would decrease, thus also decreasing the flow rate. This would probably happen until surface tension stopped the leak. 
My thought is that, assuming a rigid vessel, pressure would decrease as a function of the volume of water in the vessel, and the pressure and the flow rate as some sort of differential equation perhaps, but I'm not sure how to go about deriving that.
The application in question is the hydrostatic testing of plate heat exchangers. When completing unbalanced tests, water is pumped into one side of the heat exchanger and held at this pressure for a period of time. My thinking is that given a leak, the pressure should drop quite quickly thus indicating a failure. Alternatively, the rate at which the pressure drops should allow us to back calculate the rate of water leakage and maybe even hole size.
Any help or direction would be super appreciated.
Thanks!
 A: Everything depends on the size of the air pocket, since you can treat the water as incompressible. As water is lost, the air pocket expands, lowering the pressure. If the air pocket is large, it takes a lot of water loss to lower the pressure a certain amount. If the air pocket is small, the pressure will be very sensitive to loss of water.
Check out Boyle's Law.

Continuing to try to answer your question.
Pressure and volume (of the air pocket, assuming constant temperature) will follow a curve like this, because $Vp = Constant$ and once you measure an initial $V$ and $p$ you will know what that constant is.

Then, you can also tell, as the water leaks out, the pressure $p$ will decrease, and you can use the curve or the equation to figure out how much $V$ has increased, and that tells you how much water has leaked out.
If you want to understand the time-course of this leakage, just take into account that as pressure decreases, flow rate will also decrease (by a power somewhere between 1 and 0.5).
Just plot a series of points on the curve.
I'm not sure you can make a differential equation for this, because the relationship between pressure and flow rate depends on the velocity of fluid through the leak, somewhere between linear and square-root, and that would not be easy to characterize.
A: Assumptions:


*

*The hole is in the region below the air pocket (so water, not air, is leaking)

*Air pocket volume is $V_p$ when the pressure is $P$

*Isothermal process (slow expansion: temperature constant)

*Volume of container doesn't change with pressure (probably not true… - this will underestimate the leakage rate)


you can write the rate of change of the volume of the air pocket as a function of pressure:
$$\frac{PV}{T} = const\\
P_1V_1 = P_2V_2$$
Differentiating $PV = constant$:
$$P dV + V dP = 0$$
Dividing by $dT$ and rearranging:
$$\frac{dV}{dt}=-\frac{V}{P}\frac{dP}{dt}$$
From this you compute the flow rate from the pressure change. As you can see, the smaller the volume $V$, the smaller the volume change $dV$ that you can calculate for a given change in pressure.
This leaves you with the problem of calibrating the air pocket. This is best done by having an air filled capillary somewhere near the top of your system: you will be able to see the liquid rise in this capillary as the system is pressurized, and from the rate at which it drops you can determine the leakage rate immediately - if you know the diameter of the capillary, no other math is required…
Do note that a heat exchanger is likely to expand when pressurized - you should be able to determine how much this affects the result by having a small calibrated plunger (ideally the same size as the capillary) with which you can inject a small known amount of additional liquid into the system. If the liquid plus heat exchanger were truly incompressible (constant volume, constant density) then the air in the capillary should rise as you push the plunger down. When this does not happen (say the capillary rises half as much) then you know what volume of liquid corresponds to what volume change in the capillary, and this gives you the calibration from capillary volume to liquid volume.
A: If it is water with a specific gravity of 1 you will lose 0.0361 psi per inch in the container. Example- If the level of the container drops 12 inches you would take 12 x .0361 and you would have a pressure loss of 0.4335 psi. If it is a material with a different specific gravity you would have to make adjustments, such as mercury would be .491 psi per inch. Please note that the diameter of the tank makes no difference. 
A: As mentioned in assumption 1, Boyle's law will not apply if any air from conditions external to the hydrostatic test can reach the air pocket. To me this also means if the pressure were to fall below what is required for the gradient to keep any air from being introduced through the leak point. Of course if you are charging this system up to 150 psi or so the pressure drop should be visible long before that.
