That is actually the simplest part of the arithmetic. The hydrostatic pressure is P=ρgh+P
applied.
Density of pure water is 62.4 lbm/ft
3 or 1000 kg/m
3, if you don't know "g" you have no business doing pipeline calcs, and "h" is the change in elevation from the highest point on the system to the lowest point on the system regardless of intervening ups and downs.
The design standard that you are using has equations for calculating minimum wall thickness. The MAWP is an input to the calculation, not an output. You have to SPECIFY an MAWP to determine a wall thickness, not the other way around. The equation in ASME B31.8 looks like your equation except it includes a design factor (which increases the required wall thickness based on population density), a longitudinal joint factor, and a temperature deration factor. Using the whole equation you calculate a minimum wall thickness for your chosen MAWP and then find a pipe that is thick enough to include that wall thickness after you deduct your corrosion allowance.
The minimum test pressure is a factor (greater than 1.0) of MAWP as specified either by the code you are using or by company policy. Often the code will specify a number like 1.1 times MAWP, but company policy will require 1.5 times MAWP, you have to use the code or a higher value.
If your elevation change is significant, then doing hydrotests at all can be a problem. It would likely be worth your time to read
Pneumatic Testing. I don't mean to start the whole hydrostatic vs. pneumatic testing discussion again, but the linked paper goes into the issues of hydrostatic testing when elevation change is not trivial.
[bold]David Simpson, PE[/bold]
MuleShoe Engineering
In questions of science, the authority of a thousand is not worth the humble reasoning of a single individual. Galileo Galilei, Italian Physicist