Let's say you have a piping system containing liquid water under high pressure. One section of the pipe of ~70L gets isolated, and it is initially at the same pressure as when it was isolated, which is 15 MPa. We can think of this isolated portion of piping as a pressurized vessel of liquid. Assuming no change in temperature, you notice that the pressure is slowly dropping and it's currently at 7 MPa, suggesting a passing isolating valve that's at a lower pressure on the other side, or a leak in a fitting to the environment.
Would it be correct to use the difference in final and initial pressure values to calculate the initial and final densities of the water (assuming we know the temperature and it's constant), and then use the volume of isolated piping to determine the initial and final mass to calculate how much water was lost? Is this the right approach?