Вы находитесь на странице: 1из 2

FUNCTION FactorZGopal(Tpr,Ppr)

if (0.2<Ppr) then
if (1.2>Ppr) then
if (1.05<Tpr) then
if (1.2>Tpr) then
FactorZGopal=Ppr*(1.6643*Tpr-2.2114)-0.3647*Tpr+1.4385
Endif
Endif
if (1.2<Tpr) then
if (1.4>Tpr) then
FactorZGopal=Ppr*(0.5222*Tpr-0.8511)-0.0364*Tpr+1.0490
Endif
Endif
if (1.4<Tpr) then
if (2>Tpr) then
FactorZGopal=Ppr*(0.1391*Tpr-0.2988)-0.0007*Tpr+0.9969
Endif
Endif
if (2<Tpr) then
if (3>Tpr) then
FactorZGopal=Ppr*(0.0295*Tpr-0.0825)+0.0009*Tpr+0.9967
Endif
Endif
Endif
Endif

if (1.2<Ppr) then
if (2.8>Ppr) then
if (1.05<Tpr) then
if (1.2>Tpr) then
FactorZGopal=Ppr*(-1.357*Tpr+1.4942)+4.6315*Tpr-4.7009
Endif
Endif
if (1.2<Tpr) then
if (1.4>Tpr) then
FactorZGopal=Ppr*(0.1717*Tpr-0.3232)+0.5869*Tpr+0.1229
Endif
Endif
if (1.4<Tpr) then
if (2>Tpr) then
FactorZGopal=Ppr*(0.0984*Tpr-0.2053)+0.0621*Tpr+0.8580
Endif
Endif
if (2<Tpr) then
if (3>Tpr) then
FactorZGopal=Ppr*(0.0211*Tpr-0.0527)+0.0127*Tpr+0.9549
Endif
Endif
Endif
Endif

end FactorZGopal

{DISE�O DE LINEA DE GAS}


q_scMM=100/0.9 "MMscfd caudal de flujo necesario en la ecuacion"
G=0.65
T_1=25 "�C temperatura de entrada"
T_2=20 "�C temperatura de salida"
T_sc=520 "R temperatura base"
P_sc=14.73 "psi, presion base"

T=(T_1-T_2)/ln(T_1/T_2)*convert (C,F)+32+460

{tramo 1-3 en la linea}


P_1=1500
P_3=500
T_pc=168+325*G-12.5*G^2{oR,Temperatura cr�tica del gas}
P_pc= 677+15*G-37.5*G^2{Psia, Presi�n cr�tica del gas }
Tpr_13=T/T_pc
Ppr_13=P_13/P_pc

P_13=(2/3)*(P_1^3-P_3^3)/(P_1^2-P_3^2)
Z_13=FactorZGopal(Tpr_13,Ppr_13)
z_3=2000*convert (m,ft) "m, sobre el nivel del mar"
z_1=1000 *convert (m,ft)"m, sobre el nivel del mar"
dz_13=z_3-z_1
F_13=1/f^0.5
"f=0.032/(D^(1/3))"
L_12=50000*convert (m,ft)
L_23=30000*convert (m,ft)
s_13=(0.0375*G*dz_13)/(Z_13*T)
Le=((Exp(s_12)-1)/S_12)*L_12+Exp(s_12)*L_23
D=11+(1/2)
mu=0.012
Re=20.123*(q_scMM*1000*G)/(D*mu)
f=0.0768/(Re^0.1461)

q_scalc=5.6353821*(T_sc/P_sc)*(((P_1^2-Exp(s_13)*P_2^2)*D^5)/
(G*T*Z_13*Le))^0.5*F_13
q_scMMcalc=q_scalc/1000

{tramo 1-2 en la linea}


z_2=2000*convert (m,ft) "m, sobre el nivel del mar"

dz_12=z_2-z_1
P_2=1000 "estimacion de la presion"
P_12=(2/3)*(P_1^3-P_2^3)/(P_1^2-P_2^2)

Ppr_12=P_12/P_pc
Z_12=FactorZGopal(Tpr_13,Ppr_12)
s_12=(0.0375*G*dz_12)/(Z_12*T)

Вам также может понравиться