I do not have much experience with working with liquids so I am basing a lot of my intuition on what I know about gases (which I have a feeling is not good, but gases are the closest thing to liquids that I feel like I understand decently :D).
I have just stumbled upon something that I can not wrap my head around. With gases we have the internal energy $U = \frac{3}{2}nk_BT = \frac{3}{2}pV$ (for monatomic gases) from the ideal gas law. Intuitively I would guess that this finding would generalise into taking a volume integral of the pressure if it is not constant (for example with a very very high cillinder with air inside, the pressure at the bottom would be higher than at the top). And I can imagine this energy transfering into a different kind of energy, for example by pushing a piston.
However, with water or ideal liquids I am not really sure. If I have a tank full of an ideal liquid that I seal on the top and apply a huge pressure on, the seal will not move (as opposed to the gas case), so I do zero work on the system? So the energy increase of the water should be zero? But in the derivation of Bernoulli's principle the pressure plays an important role and is in the end a part of the equation. There we have a term that is clearly based on the kinetic energy of the volume element ($\frac{1}{2}\rho v^2$), another one based on its potential energy ($\rho g h$), and the last one on "pressure energy"(?) - I have seen it called like that.
I also feel like pressure should add some sort of energy even into incompressible liquids - if I once again had a sealed tank, made from for example glass, with the seal pointing towards the floor and the glass bottom pointing towards the sky and I applied some pressure to the seal and gradually increased it (always locking the press in place so it does not jump), eventually the glass top would break - here I would expect some shards to come flying off, with energy being delivered from (I assume) the freed pressure?
What is correct here and/or what am I missing in each of the cases (I feel like some of them contradict others, while all of them make sense to me :D)? Is the situation different in case of an ideal liquid and in the case of water (which is a tiny bit compressible)? Thanks a lot!