Professional Documents
Culture Documents
DETERMINACIN DE RESERVAS
MEDIANTE LA DECLINACIN P/Z
EN VISUAL BASIC
PROGRAMACIN APLICADA
BURGOS ARANDIA ISAIAS REG.: 200762761
GARCIA VILLARROEL ERIK ANDRES ; REG.: 200763598
SANCHEZ SERRATE ALBERTO ; REG.:200666975
27/09/2011
Elaboracin de un Proyecto en Visual Basic 6.0 bajo el ambiente Windows para el Clculo de
Reservas de Gas mediante el mtodo de la declinacin P/Z para reservorios volumtricos
[DETERMINACIN DE RESERVAS MEDIANTE LA DECLINACIN P/Z EN VISUAL BASIC PET-211
NDICE:
DETERMINACIN DE RESERVAS MEDIANTE EL MTODO P/Z ................................................ 3
Caso 1: ................................................................................................................................ 6
Caso 2: ................................................................................................................................ 6
EJEMPLO: ............................................................................................................................ 7
SOLUCIN ........................................................................................................................... 7
REFERENCIAS ........................................................................................................................ 21
OBJETIVO GENERAL
- Elaborar un programa que determine las reservas mediante el mtodo P/Z
usando Visual Basic 6.0.
OBJETIVOS ESPECFICOS:
Calcular las Propiedades Fsicas del Gas (SG, Psr, Tsc).
Calcular los Factores de desviacin (Z) para cada dato de presin.
Generar una regresin lineal P/Z vs. Gp.
Determinar la Reserva Inicial (Gi) utilizando la ecuacin encontrada en la
regresin
MARCO TEORICO:
BALANCE DE MATERIA
Proceso isotrmico.
CW y CF son despreciables.
Se considera equilibrio termodinmico entre el gas y el petrleo a presin y
temperatura de yacimiento.
Dimensin cero (modelo tanque).
Dividiendo por G
Esta constante incluye la temperatura del yacimiento que para un ejemplo dado se
mantiene invariable luego,
Reorganizando trminos,
Grfico de P/Z vs Gp
Caso 1:
1. Datos errneos
2. Condensacin retrgrada
3. Drenaje o escape de fluidos del yacimiento
4. Se est drenando ms de la cuenta
5. Puede existir un yacimiento con presiones anormales (sobrepresionado)
6. Existe reduccin de permeabilidad a medida que hay cada de presin y se
pierde comunicacin
Caso 2:
1. Datos errneos
2. Subsidencia
3. Hay comunicaciones o escapes hacia el yacimiento a lo largo de fallas o
problemas operacionales
EJEMPLO:
Dada la siguiente informacin, Estime el gas inicial.
P Gp*
MMMPCN
4000 0
3825 34
3545 75
3388 88
3192 120
2997 145
2738 192
COMPONENTE Xi (%)
Co2 0.03
H2S 0.5
N2 0.1
C1 86
C2 7
C3 3
i-C4 2
n-C4 1
i-C5 2
n-C5 1
T = 618 R
SOLUCIN
Dividiendo el peso molecular del gas por el del aire resulta una gravedad especfica
de 0.6845.
Tsc= 378,739868
Psc= 665,907817
Tyac= 618 R
P Tsr Psr A B C D Z
4000 1,63172682 6,00683743 0,4842366 3,25169203 0,06395282 0,99242974 0,88317649
3825 1,63172682 5,74403829 0,4842366 3,0302413 0,06395282 0,99242974 0,87166798
3545 1,63172682 5,32355967 0,4842366 2,69285672 0,06395282 0,99242974 0,85532134
3388 1,63172682 5,0877913 0,4842366 2,51248116 0,06395282 0,99242974 0,84744383
3192 1,63172682 4,79345627 0,4842366 2,295892 0,06395282 0,99242974 0,8390987
2997 1,63172682 4,50062294 0,4842366 2,08965354 0,06395282 0,99242974 0,83262053
2738 1,63172682 4,11168022 0,4842366 1,82964638 0,06395282 0,99242974 0,82715543
DONDE:
PRESION Z P/Z Gp
4000 0,88317649 4529,10607 0
3825 0,87166798 4388,13869 34
3545 0,85532134 4144,64113 75
3388 0,84744383 3997,9051 88
3192 0,8390987 3804,0817 120
2997 0,83262053 3599,47889 145
2738 0,82715543 3310,13965 192
5000
4500
4000
3500
y = -6,5735x + 4581,8
3000
P/Z (lpca)
2500
2000
1500
1000
500
0
0 50 100 150 200 250
Gp (MMMPCS)
Al graficar P/Z vs Gp (figura 8) se obtiene cuando P/Z=0 que el gas inicial es,
G = 715.5 MMMPCS
DIAGRAMAS DE FLUJO
CALCULO DE RESERVAS
MEDIANTE MTODO P/Z
INTRODUCIR DATOS
CROMATOGRAFIA
REGRESIN LINEAL
CALCULO DE G
FIN
INTRO N M=10
I=1 N I=1 10
P(I)
Gp(I) INTRO PORCENTAJE (I)
I I
INTRO TYAC=
FIN
FIN
CROMATOGRAFA
SUMATORIA(PORCENTAJE(I)=100
I=110
I=110
A(I)=A(I)NORMALIZADO*PM(I)
A(I)=PORCENTAJE(I)*PM(I)
SGG=SUMATORIA(A(I))/PM(AIRE)
FIN
CALCULO DE Z
I=1-N
P/Z ( I ) = P ( I ) / Z ( I )
MOSTRAR Z ( I )
MOSTRAR P/Z ( I )
Z CALC
Pyac = Pyac ( I )
CALCULO DE A
CALCULO DE B
CALCULO DE C
CALCULO DE D
Z = A +((1 A) / E B )+C*PSR^D
FIN
REGRESION LINEAL
SUMX=0
SUMY=0
SUMXY=0
SUMX2=0
I=1N
SUMX=SUMX+X(I)
SUMY=SUMY+Y(I)
SUMXY=SUMXY+X(I)*Y(I)
SUMX2=SUMX2+(X(I))^2
CALCULO DE m Y b
MOSTRAR m Y b
FIN
CALCULO DE G
LEER m , b
G=-b/m
MOSTRAR G
FIN
CDIGO FUENTE
Dim DG As Single
Dim m As Single
Dim b As Single
'Dimensionamiento para el calculo de G
Dim G As Single
End Sub
Next I
End Sub
Next I
For I = 1 To N
Grid2.TextMatrix(I, 1) = InputBox("Produccion acumulada N ("
+ Str(I) + " )", "Datos de Gp", , 3000, 3000)
Next I
End Sub
Next I
Grid1.TextMatrix(11, 2) = SumatoriaA
'columna 6
For I = 1 To 10
Grid1.TextMatrix(I, 6) = Round((CDbl(Grid1.TextMatrix(I, 2)) *
CDbl(Grid1.TextMatrix(I, 3))), 4)
Next I
SumatoriaPM = 0
For I = 1 To 10
SumatoriaPM = SumatoriaPM + CDbl(Grid1.TextMatrix(I, 6))
Next I
Grid1.TextMatrix(11, 6) = SumatoriaPM
'columna 7
For I = 1 To 10
Grid1.TextMatrix(I, 7) = Round((CDbl(Grid1.TextMatrix(I, 2)) *
CDbl(Grid1.TextMatrix(I, 4))), 4)
Next I
SumatoriaTsc = 0
For I = 1 To 10
SumatoriaTsc = SumatoriaTsc + CDbl(Grid1.TextMatrix(I, 7))
Next I
Grid1.TextMatrix(11, 7) = SumatoriaTsc
'columna 8
For I = 1 To 10
Grid1.TextMatrix(I, 8) = Round((CDbl(Grid1.TextMatrix(I, 2)) *
CDbl(Grid1.TextMatrix(I, 5))), 4)
Next I
SumatoriaPsc = 0
For I = 1 To 10
SumatoriaPsc = SumatoriaPsc + CDbl(Grid1.TextMatrix(I, 8))
Next I
Grid1.TextMatrix(11, 8) = SumatoriaPsc
'Ahora mostramos los resultaedos en las cajas de texto
SGg = CDbl(SumatoriaPM) / 28.97
Tsc = CDbl(SumatoriaTsc)
Psc = CDbl(SumatoriaPsc)
Text2.Text = SGg
Text3.Text = Psc
Text4.Text = Tsc
End Sub
For I = 1 To N
Grid2.TextMatrix(I, 2) = Z(I)
Next I
SumaX = 0
SumaY = 0
SumaXY = 0
SumaX2 = 0
For I = 1 To N
ReDim X(1 To N)
ReDim Y(1 To N)
X(I) = Grid2.TextMatrix(I, 1)
Y(I) = Grid2.TextMatrix(I, 3)
SumaX = SumaX + X(I)
SumaY = SumaY + Y(I)
SumaXY = SumaXY + (X(I) * Y(I))
SumaX2 = SumaX2 + (X(I)) ^ 2
Next I
m = (N * SumaXY - SumaX * SumaY) / (N * SumaX2 - (SumaX) ^ 2)
b = (SumaY * SumaX2 - SumaX * SumaXY) / (N * SumaX2 - (SumaX) ^ 2)
Text5.Text = m
Text6.Text = b
Label8.Caption = Str(m) + " " + "X + " + Str(b)
'Calculo de G
G = -(b / m)
Text7.Text = G
End Sub
'CALCULO DE Z
'Para calcular Z necesitamos: P(var); Tsr(cte); Psr(var); A(cte);
B(Var); C(cte); D(cte)
'Dim AG As Single
'Dim BG As Single
'Dim CG As Single
'Dim DG As Single
Psc = CDbl(Text3.Text)
Tsc = CDbl(Text4.Text)
Tyac = CDbl(Text1.Text)
TsrG = CDbl(Tyac / Tsc)
PsrG = CDbl(Pyac / Psc)
End Sub
Private Sub Form_Load()
Grid1.TextMatrix(0, 1) = "Porcentaje"
Grid1.TextMatrix(0, 2) = "Norm"
Grid1.TextMatrix(0, 3) = "PM"
Grid1.TextMatrix(0, 4) = "Tsc"
Grid1.TextMatrix(0, 5) = "Psc"
Grid1.TextMatrix(0, 6) = "Norm*PM"
Grid1.TextMatrix(0, 7) = "Norm*Tsc"
Grid1.TextMatrix(0, 8) = "Norm*Psc"
Grid1.TextMatrix(0, 0) = "Componente"
Grid1.TextMatrix(1, 0) = "H2S"
Grid1.TextMatrix(2, 0) = "N2"
Grid1.TextMatrix(3, 0) = "CO2"
Grid1.TextMatrix(4, 0) = "C1"
Grid1.TextMatrix(5, 0) = "C2"
Grid1.TextMatrix(6, 0) = "C3"
Grid1.TextMatrix(7, 0) = "i-C4"
Grid1.TextMatrix(8, 0) = "n-C4"
Grid1.TextMatrix(9, 0) = "i-C5"
Grid1.TextMatrix(10, 0) = "nC-5"
End Sub
REFERENCIAS
3. Smith, C.R., and Tracy, G.W. Applied Reservoir Engineering. Oil & Gas
Consultants, Inc. Tulsa, Ok. 1987.