Is there any formula which explains the relationship of liquid mass and liquid pressure in a fixed volume?
Not only is there
a formula that explains the relationship between mass in a volume (=density, correct?) and pressure, there are many equations. We call these equations "equations of state" (EOS). From the simplest "ideal gas law" (which cannot describe liquid behavior at all) through van der Waals equation (and other cubic EOS) to multiparameter complex EOS specific to certain fluids. Wikipedia's entry on EOS's
http://en.wikipedia....uation_of_state
The usual approach, then, to your question would be: 1) Select a suitable EOS for the fluid of interest, 2) Solve that EOS for volume or density at your specified T and P, and 3) compute mass from density and known pipe volume.
Of course, there are other, simpler equations available, too. As samayaraj indicated, sometimes it is adequate to assume the liquid is perfectly incompressible. In this case, you can calculate the saturated liquid density from whatever source you have, then assume the compressed liquid density is the same. The usual equation I see used here is the Rackett equation, or some variation on the Rackett equation.
There are also isothermal compressibility equations (http://en.wikipedia....Compressibility ). If you have saturated liquid density and a tabulated "compressibility factor" for the fluid and temperature in question (symbol beta, usually), then one can calculate density at pressures other than saturation. As noted in the Wikipedia article, this is where your assumption of "adiabatic" may be most applicable, because the compressibility factor will be different depending on whether you are assuming a constant temperature or a constant entropy process.