What happens to the pressure of a liquid extracted from a pressurised container?

Consider the following scenario: I have a pipe entirely filled with water flowing through it due to a pump at one end pressurising the fluid. Imagine that underwater, I trap some of the flowing water in a capsule, completely filling the capsule with water, and then closing the capsule. What happens to the pressure of the fluid inside the capsule? I think that the pressure would drop relative to the outside pressure because I have isolated the water inside the capsule from the pressure source. If I were to take the capsule out of the pipe and open it, I would not expect the water to gush out (which I would expect if if the water was under pressure).

This makes sense to me: pressure is proportional to the concentration of energy in a volume of space: the more energy I have in a volume, the more pressure I would expect it to exert on its surroundings, and vice-versa.

By trapping the fluid in this capsule, I have stopped it from moving and so have reduced its kinetic energy to 0. This means that the energy of the fluid has been reduced so its pressure should drop.

However, according to the Bernoulli principle, an increase in speed of a fluid results in a drop in its pressure. So in this scenario, by trapping the fluid inside the capsule, its pressure would actually be higher than the outside pressure.

If I were to bet money on it, I would probably bet that Mr Bernoulli is correct. The question now is, where have I gone wrong in my reasoning?

The flaw in your logic is assuming that Bernoulli's principle applies in the same way to the water inside and outside of the capsule. Once you trap water in the capsule, it no longer relates to the other water according to Bernoulli's principle. Also, since Bernoulli's principle strictly applies to an incompressible fluid (is that correct?), then the pressure inside the capsule after it is removed from the water will depend only on the new ambient temperature and the bulk modulus of the water inside; it will have absolutely nothing to do with the fact that it came out of the pipe with a certain flow rate and pressure (unless you want to consider the elastic properties of the capsule).

Thanks for your reply. What I am more interested in are the forces exerted on the capsule while it is inside the water pipe. For example, I know that if I have a suction cup attached to a wall in air, the difference in pressure between the air inside the cup and the air outside the cup produces a force which pushes the cup against the wall. What would happen in the case of the capsule of water (assuming that the capsule is constrained so that it does not get washed away down the pipe by the flow)?

Ideally, the capsule walls would experience equillibrium, since any pressure exerted from the outside fluid would be met with the incompressibility of the fluid inside the capsule, and so the capsule walls would feel no net force.

However, I don't understand how the capsule would not be washed down the pipe with the rest of the fluid.

It depends on how you captured the water. If the capsule was moving with the water as you filled it then it would end up with the same pressure as the static pressure of the water. If the capsule was not moving and facing into the flow than it's pressure would end up being the sum of dynamic and static pressure of the water trapped by the capsule.

Once you close the capsule, nothing significant changes as long as it remains within the water. If you removed the capsule, it's walls could expand a bit if the ambient pressure was lower.

Water is almost incompressable, so even at high pressure water is never going to come gushing out of a fixed size container, unless the exit hole is extremely small compared to the volume of water captured. For example, if you increase the pressure of water from ambient at 14.7 psi to 1000 psi, it's density only increases by .32% (by a factor of 1.0032). A gallon of water at 1000 psi reduced to 14.7 psi would only expand by 2.5 teaspoons (768 teaspoons per gallon x .0032 = 2.5 teaspoons).

Bernoulli's equation has multiple forms and can deal with compressible fluids and even energy changes.

I though the concept behind Bernoulli's equation was that total mechanical and potential energy were constant. By energy changes, were you referring to the gravitational potential energy term included in some forms of Bernoulli equations?

If you mean a change in total energy due to mechanical interaction between a solid and a fluid or gas, then Bernoulli isn't sufficient. This would require a more complex algorithm, such as Navier-Stokes, in order to model the outcome of such an interaction.