Gas mean pressure in long pipe

Equation for mean pressure for steady flow in a gas pipe at pressures below 1000 psia and temperatures above 60°F, the change in compressibility factor z with Pressure is approximately linear. Therefore, the compressibility factor z can be expressed as a constant, so the average pressure of the gas fluid can be calculated as follows.

Pm = 2/3 * (P1^3 - P2^3)/(P1^2 - P2^2)

def pmean(p1, p2):

    return 2/3*(pow(p1, 3) - pow(p2, 3))/( pow(p1, 2) - pow(p2, 2))


print("Gas mean pressure of 120 psia and 100 psia = ", pmean(120, 100))

When run the code, you will receive the following results.

Gas mean pressure of 120 psia and 100 psia =  111.429


No comments:

Post a Comment