Professional Documents
Culture Documents
Flow of Gas in Pipelines
Flow of Gas in Pipelines
5.1 Introduction
A knowledge of the gas flow equations is required for calculating capacity and pressure
requirements in the long distance transportation of natural gas. One of the earliest equation was
that of Weymouth. The flow equation of Clinedinst takes rigorously into consideration the
deviation of natural gas from ideal behavior.
(5.1)
where
Q = gas flow rate measured at standard conditions, SCFD
P0 = 14.7 psia
T0 = 60 °F
P1 = upstream pressure, psia
P2 = downstream pressure, psia
G = gas gravity
L = length of the pipeline, miles
d = inside pipe diameter, in
Pav = average pressure in the pipeline, psia
Tav = average temperature in the pipeline, °R
f = Moody friction factor
z = average gas compressibility factor evaluated at Tav and Pav
Example 5.1
Using the following data, calculate Q with Eq (5.1)
Data:
yi = [0.75, 0.21, 0.04]
Pci = [673, 708, 617]
Tci = [343, 550, 666]
yco2 = 0 yh2s = 0
P1 = 1300 psia P2 = 300 psia
L = 100 miles d = 13.375 in
Tav = 40 °F
Solution
This program is saved as horf1.m function M-file.
function Q = horf1(P1,P2,Tav,L,d,yi,Mi,Pci,Tci,yh2s,yco2,G)
Pav = (2/3)*(P1^3-P2^3)/(P1^2-P2^2);
Tav=Tav+460;
if nargin == 11
[G,Tpc,Ppc]=correctedPcTc(yi,Mi,Pci,Tci,yco2,yh2s);
[z,mug]=visg(Pav,G,Tav,Ppcc,Tpcc);
elseif nargin == 12
Ppc=709.604-58.718*G;
Tpc=170.491+307.344*G;
[z,mug]=visg(Pav,G,Tav);
end
f = 100; e = 0.0006;
fa = 0.032/(d^0.333);
while abs(f-fa)> 1e-6
f = fa;
Q = (77.54*520/14.7)*d^2.5*sqrt((P1^2-P2^2)...
/(G*(Tav+460)*L*f*z))
Re = 20*Q*1000*G/(mug*d);
fa = moody(Re,e,d);
end
When we run the program, we have
>> yi = [0.75,0.21,0.04];
>> Mi = [16,30,44];
>> Tci= [343,550,666];
>> Pci= [673,708,617];
>> yco2=0; yh2s=0;
>> P1=1300; P2=300; Tav=40;
>> d=13.375; L=100;
>> Q = horf1(P1,P2,Tav,L,d,yi,Mi,Pci,Tci,yh2s,yco2,G)
Q =
1.3572e+008
Example 5.2
Using the following data, calculate P1 with Eq (4.1)
Data:
yi = [0.75, 0.21, 0.04]
Pci = [673, 708, 617]
Tci = [343, 550, 666]
P2 = 300 psia
L = 100 miles
d = 13.375 in
Tav = 40 °F
Q = 136 MMCFD
Solution
function P1 = horf2(P2,Q,Tav,L,d,yi,Mi,Pci,Tci,G)
if nargin == 9
G = dot(yi,Mi)/29;
Ppc = dot(yi,Pci);
Tpc = dot(yi,Tci);
elseif nargin == 10
Ppc=709.604-58.718*G;
Tpc=170.491+307.344*G;
end
P1=10^6; Pnew=P2+1500;
while abs(Pnew-P1) >= 0.001
P1 = Pnew;
Pav = (2/3)*(P1^3-P2^3)/(P1^2-P2^2);
if nargin == 9
[z,mug]=visg(Pav,G,Tav,Ppc,Tpc);
elseif nargin == 10
[z,mug]=visg(Pav,G,Tav);
end
Re = 20*Q*1000*G/(mug*d);
e = 0.0006;
f = moody(Re,e,d);
Pnew = sqrt(((Q*1e6*14.7/(3.22*24*520))^2* ...
(G*(Tav+460)*L*f*z)/d^5)+P2^2);
End
>> yi = [0.75,0.21,0.04];
>> Mi = [16,30,44];
>> Tci= [343,550,666];
>> Pci= [673,708,617];
>> P2=300; Tav=40;
>> d=13.375; L=100; Q=136;
>> P1 = horf2(P2,Q,Tav,L,d,yi,Mi,Pci,Tci)
P1 =
1.2948e+003
5.4 Gas Flow in Horizontal Pipeline
(Clinedinst Method)
Using the conditions where temperature varies with depth, Sukar and Cornell developed integral
method. Because of its accuracy, this method is recommended for general engineering use on gas
and condensate wells with BHP less than 10,000 psia.
(5.2)
where
Q = gas flow rate measured at standard conditions, MSCFD
Pc = pseudo-critical pressure, psia
P1 = upstream pressure, psia
P2 = downstream pressure, psia
G = gas gravity
L = length of the pipeline, ft
D = inside pipe diameter, ft
Tav = average temperature in the pipeline, °R
f = Moody friction factor
z = average gas compressibility factor evaluated at Tav and Pav
Example 5.3
Solution
function [xx,yy] = przintgr(Ppc,Tpr)
n=7000;
for i=1:n
xx(i) =i/Ppc;
Ppr=xx(i);
z=zfac(Ppr,Tpr);
prbyz(i)=xx(i)/z;
end
sum=prbyz(1)*xx(1);
yy(1)=sum;
for i=1:n-1
sum=sum+0.5*(prbyz(i)+prbyz(i+1))*(xx(i+1)-xx(i));
yy(i+1)=sum;
end
Example 5.4
Using the same data of Example 5.1, calculate Q with Eq (5.2)
Solution
The program is saved as horf3.m function M-file.
function Q = horf3(P1,P2,G,Tav,L,d,yi,Mi,Pci,Tci,yh2s,yco2)
if nargin == 6
Ppc = 706-51.7*G-11.1*G^2;
Tpc = 187+330*G-71.5*G^2;
elseif nargin == 12
[G,Tpc,Ppc]=correctedPcTc(yi,Mi,Pci,Tci,yco2,yh2s);
end
D = d/12;
Tpr=(Tav+460)/Tpc;
[xx,yy]=prbyz_intgr(Ppc,Tpr);
Pav = (2/3)*(P1^3-P2^3)/(P1^2-P2^2);
[z,mug]=visg(Pav,G,Tav);
Ppr1 = P1/Ppc;
Ppr2 = P2/Ppc;
f = 100; e = 0.0006;
fa = 0.0001;
while abs(f-fa) >= 1e-5
f = fa;
const1 = 3973*520*Ppc/14.7;
const2 = D^5/(G*(Tav+460)*L*5280*f);
intgr1 = interp1(xx,yy,Ppr1);
intgr2 = interp1(xx,yy,Ppr2);
Q = const1*(const2*(intgr1 - intgr2))^0.5;
Re = 20*Q*G/(mug*d);
fa = moody(Re,e,d);
end
>> yi = [0.75,0.21,0.04];
>> Mi = [16,30,44];
>> Tci= [343,550,666];
>> Pci= [673,708,617];
>> yco2=0; yh2s=0; G=0;
>> P1=1300;
>> P2=300;
>> Tav=40;
>> d=13.375;
>> L=100;
>> Q = horf3(P1,P2,G,Tav,L,d,yi,Mi,Pci,Tci,yh2s,yco2)
Q =
1.3754e+005
(5.3)
where
Q = gas flow rate measured at standard conditions, std cu ft/hr
P1 = upstream pressure, psia
P2 = downstream pressure, psia
G = gas gravity
Le = effective length of the pipeline, miles
S = 0.0375 GX / Tav z
X = change in elevation, ft
d = inside pipe diameter, in
Pav = average pressure in the pipeline, psia
Tav = average temperature in the pipeline, °R
f = Moody friction factor
z = average gas compressibility factor evaluated at Tav and Pav
(5.4)
S
where J = (e – 1)/S
If the slope is not uniform, the profile should be divided into sections of nearly uniform slope;
the effective length is then calculated as follows:
(5.4)
Example 5.4
Using the following data, calculate the pressure profile along the non-horizontal pipeline
yi=[.97,.0012,.0003,.0001,.0001,.02,.0018,.0015,.005]
Mi=[16,30,44,58,58,44,28,34,32]
Pci=[666,707,617,527.9,548.8,1071,493,1306,731.4]
Tci=[343.3,350.1,666,734.4,765.5,547.7,227.5,672.4,278.6]
Q=300 MMSCFD
P2=800 psia;
Tav=68°F
L=[170,40,40,80] miles
X=[944,-882,4386,-4670] ft
Solution
The program is saved as horf4.m Script M-file.
function horf4
clc
% Gas properties
yi=[.97,.0012,.0003,.0001,.0001,.02,.0018,.0015,.005];
Mi=[16,30,44,58,58,44,28,34,32];
Pci=[666,707,617,527.9,548.8,1071,493,1306,731.4];
Tci=[343.3,350.1,666,734.4,765.5,547.7,227.5,672.4,278.6];
yco2=0; yh2s=0;
[G,Tpc,Ppc] = correctedPcTc(yi,Mi,Pci,Tci,yco2,yh2s);
for i=1:11
d(i)=19+i;
disp([num2str(d(i)) ' ' num2str(Pup(i))]);
end
function Le = eqlen(G,X,L,Tav,z)
Tav=Tav+460;
s = 0.0375*G.*X/(Tav*z);
S = [0,s(1),s(2),s(3)];
J = (exp(s)-1)./s;
Le = sum(L.*exp(S).*J);
>> horf4
20 2107.8688
21 1899.0894
22 1725.9695
23 1581.7101
24 1461.0945
25 1360.0097
26 1275.1476
27 1203.8091
28 1143.7699
29 1093.1845
30 1050.5147