Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Public Class Form1

Dim GLRmin As Single


Dim D As Single
Dim Pp As Single
Dim Wp As Single
Dim DT As Single
Const PI As Double = 3.1415926535897931
Dim IDtubing As Single
Dim Pcmin As Single
Dim Plp As Single
Dim ODtubing As Single
Dim IDcasing As Single
Dim Pa As Single
Dim L As Single

Dim K As Single
Dim PlwEtPlf As Single
Dim Pcmax As Single
Dim Aa As Single
Dim Pcavg As Single
Dim X As Single
Dim Vslug As Single
Dim Vt As Single
Dim Vg As Single
Dim Tavg As Single

Dim Fgs As Single


Dim Z As Single

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

'CALCULO DEL GLRmin:


TextBox12.Text = D
'CALCULO DEL PESO DEL PLUNGER (Pp)
TextBox8.Text = Pp
TextBox11.Text = Wp
TextBox1.Text = IDtubing
TextBox13.Text = Plp
DT = (PI / 4) * (IDtubing) ^ 2
Pp = Wp / DT
Pa = 14.7

'Deterinar el valor de (Plw+Plf) y el valor de K con el OD del Tubing

If ODtubing = 3.375 Then


PlwEtPlf = 165
K = 33500
ElseIf ODtubing = 3.875 Then
PlwEtPlf = 102
K = 45000
ElseIf ODtubing = 3.5 Then
PlwEtPlf = 63
K = 57600
Else
TextBox15.Text = "Software para disenado para tubing de 2-3/8,2-7/8 y 3-1/2"
End If
'Calculo de la Presion en Cabeza Minima (Pcmin)
Pcmin = ((Pp + Plp + Pa + (PlwEtPlf) * L) * (1 + (D / K)))
'Calculo de la presion maxima en la Caneria
Aa = (PI / 4) * ((IDcasing) ^ 2 - (ODtubing) ^ 2)
Pcmax = Pcmin * ((Aa + DT) / Aa)
'Calculo de la Presion en la Cn Promedio (Pcavg)
Pcavg = Pcmin * (1 + (DT / 2 * Aa))
'Calculo del Volumen del GAS dentro de la tuberia
X = (IDtubing ^ 2 / 1030) ^ (-1)
Vt = DT * (D - Vslug * X)
' Calculo del Volumen de GAS requerido por siglo
Fgs = 1 + 0.02 * (D / 1000)
Vg = (37.14 * Fgs * Pcavg * Vt) / Z * (Tavg + 460)
'NCmax (Cyc/day)
NCmax=1440/((D/TextBox9.Text)+((D-Vslug*L)/TextBox10.Text)+((Vslug*X)/Vfl)
'Produccion maxima de LQD
qlmax = NCmax * Vslug
'GLR (Macf/Bbl)
GLRreq = Vg / Vslug

End Sub
End Class

You might also like