Documente Academic
Documente Profesional
Documente Cultură
ertyuiopasdfghjklzxcvbnmqwert
UAGRM
yuiopasdfghjklzxcvbnmqwertyui
Maestría en Explotación de Hidrocarburos
opasdfghjklzxcvbnmqwertyuiopa
Código de programación MATLAB
sdfghjklzxcvbnmqwertyuiopasdf
Calculo de Factor Z, factor volumétrico,
propiedades de la Roca,
ghjklzxcvbnmqwertyuiopasdfghj
Integrantes:
Marco Antonio Villarroel La Torre
Cassandra Ocampo Veramendi
klzxcvbnmqwertyuiopasdfghjklz
xcvbnmqwertyuiopasdfghjklzxcv
bnmqwertyuiopasdfghjklzxcvbn
mqwertyuiopasdfghjklzxcvbnmq
wertyuiopasdfghjklzxcvbnmqwe
rtyuiopasdfghjklzxcvbnmqwerty
uiopasdfghjklzxcvbnmqwertyuio
pasdfghjklzxcvbnmqwertyuiopas
dfghjklzxcvbnmqwertyuiopasdfg
CODIGO DE INICIO
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT
% --- Outputs from this function are returned to the command line.
function varargout = incio_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT
% --- Outputs from this function are returned to the command line.
function varargout = Gas1_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
%Calculo de la densidad
a=str2double(get(handles.edit1,'String'));
b=str2double(get(handles.edit2,'String'));
c=str2double(get(handles.edit3,'String'));
d=str2double(get(handles.edit4,'String'));
e=str2double(get(handles.edit5,'String'));
f=str2double(get(handles.edit6,'String'));
g=str2double(get(handles.edit7,'String'));
h=str2double(get(handles.edit8,'String'));
i=str2double(get(handles.edit9,'String'));
j=str2double(get(handles.edit10,'String'));
k=str2double(get(handles.edit11,'String'));
l=str2double(get(handles.edit12,'String'));
m=str2double(get(handles.edit13,'String'));
n=str2double(get(handles.edit14,'String'));
%Para calcular la Peso molecular
PESO=((a*16.04)+(b*30.07)+(c*44.09)+(d*58.12)+(e*58)+(f*72.15)+(g*72.15)+
(h*86.17)+(i*100.2)+(j*114.2)+(k*128.3)+(l*44.2)+(m*34.08)+(n*28.02));
%Para calcular la Presion seudocritica
Pres=str2double(get(handles.edit30,'String'));
PresionPR=(Pres/(((a*673.1)+(b*708.3)+(c*617.4)+(d*529.1)+(e*550.1)+(f*48
3.5)+(g*489.8)+(h*440.1)+(i*395.9)+(j*362.2)+(k*334.0)+(l*1070.2)+(m*1306
.3)+(n*492.2))));
set(handles.text77,'String',PresionPR);
guidata(hObject,handles);
%Para calcular la temperatura seudocritica
Temp=str2double(get(handles.edit31,'String'));
TemperaturaPR=(Temp/(((a*343.2)+(b*349.9)+(c*666)+(d*734.6)+(e*765.7)+(f*
829.6)+(g*846.2)+(h*914.2)+(i*972.4)+(j*1024.9)+(k*1073.0)+(l*547.5)+(m*6
72.4)+(n*227.01))));
set(handles.text78,'String',TemperaturaPR);
guidata(hObject,handles);
Z=str2double(get(handles.edit34,'String'));
Densidad=(PESO*Pres)/(10.73*Temp*Z);
set(handles.text81,'String',Densidad);
%Calculo del vol Espesifico
Vol=1/Densidad;
set(handles.text82,'String',Vol);
guidata(hObject,handles);
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT
% --- Outputs from this function are returned to the command line.
function varargout = Z_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
set(handles.text6,'String',fx(i) );
end
set(handles.text8,'String',fx(i) );
end
set(handles.text13,'String',fx(i) );
end
function edit7_Callback(hObject, eventdata, handles)
% hObject handle to edit7 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT
% --- Outputs from this function are returned to the command line.
function varargout = Correccion_inertes_OutputFcn(hObject, eventdata,
handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
G=get(handles.radiobutton3,'Value');
if G==1
%Calculo de la presion seudocritica
Psc=677+(15*A)-(37.5*(A^2));
Tsc=168+(325*A)-(12.5*(A^2));
B=HS2+CO2;
C=HS2;
Fsk=(120*((B^(0.9))-(B^(1.6))))+(15*((C^(0.5))-(C^(4))));
Tsc1=Tsc-Fsk;
Psc1=(Psc*Tsc1)/(Tsc+(C*(1-C))*Fsk);
Ppr=P/Psc1;
set(handles.text70,'String',Ppr);
Tpr=T/Tsc1;
set(handles.text69,'String',Tpr);
end
H=get(handles.radiobutton4,'Value');
if H==1
Psc=706+(51.7*A)-(11.1*(A^2));
Tsc=187+(330*A)-(71.5*(A^2));
B=HS2+CO2;
C=HS2;
Fsk=(120*((B^(0.9))-(B^(1.6))))+(15*((C^(0.5))-(C^(4))));
Tsc1=Tsc-Fsk;
Psc1=(Psc*Tsc1)/(Tsc+(C*(1-C))*Fsk);
Ppr=P/Psc1;
set(handles.text70,'String',Ppr);
Tpr=T/Tsc1;
set(handles.text69,'String',Tpr);
end
G=get(handles.radiobutton3,'Value');
if G==1
%Calculo de la presion seudocritica
Psc=677+(15*A)-(37.5*(A^2));
Tsc=168+(325*A)-(12.5*(A^2));
Tsc2=Tsc-(80*CO2)+(130*HS2)-(150*N);
Tpr2=T/Tsc2;
set(handles.text75,'String',Tpr2);
Psc2=Psc-(440*CO2)+(600*HS2)-(170*N);
Ppr2=P/Psc2;
set(handles.text76,'String',Ppr2);
end
H=get(handles.radiobutton4,'Value');
if H==1
Psc=706+(51.7*A)-(11.1*(A^2));
Tsc=187+(330*A)-(71.5*(A^2));;
Tsc2=Tsc-(80*CO2)+(130*HS2)-(250*N);
Tpr2=T/Tsc2;
set(handles.text75,'String',Tpr2);
Psc2=Psc+(440*CO2)+(600*HS2)-(170*N);
Ppr2=P/Psc2;
set(handles.text76,'String',Ppr2);
end
guidata(hObject,handles);
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT
% --- Outputs from this function are returned to the command line.
function varargout = Bg_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT
% --- Outputs from this function are returned to the command line.
function varargout = Propiedad_Roca_OutputFcn(hObject, eventdata,
handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --- Outputs from this function are returned to the command line.
function varargout = Saturacion_Promedio_OutputFcn(hObject, eventdata,
handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)