Professional Documents
Culture Documents
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 = agua_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)
%Condiciones de rio
%Qr = 5.787; % m3/s Caudal
%Tr = 20; % oC Temperatura
%Or = 7.5; % mg/L Oxigeno disuelto
%Lr = 2; % mg/L DBO
Qr=str2double(get(handles.Qr,'string'));
Tr=str2double(get(handles.Tr,'string'));
Or=str2double(get(handles.Or,'string'));
Lr=str2double(get(handles.Lr,'string'));
handles.Qr=Qr;
handles.Tr=Tr;
handles.Or=Or;
handles.Lr=Lr;
%X = 40; % km
X=str2double(get(handles.X,'string'));
handles.X=X;
%Canal rectangular
%So = 0.00022; % pendiente S0
%B = 10; % anchura B del canal
%n = 0.035; % rugosidad n,
%Kd(20)= 0.5; %1/dia.
%tethad = 1.047;
%tethaa = 1.024;
%Vs=0.2; % m/d (POC)
So=str2double(get(handles.So,'string'));
B=str2double(get(handles.B,'string'));
n=str2double(get(handles.n,'string'));
Kd(20)=str2double(get(handles.Kd,'string'));
tethad=str2double(get(handles.tethad,'string'));
tethaa=str2double(get(handles.tethaa,'string'));
Vs=str2double(get(handles.Vs,'string'));
handles.So=So;
handles.B=B;
handles.n=n;
handles.Kd=Kd(20);
handles.tethad=tethad;
handles.tethaa=tethaa;
handles.Vs=Vs;
set(handles.textQo,'string',Qo);
set(handles.textLo,'string',Lo);
set(handles.textOo,'string',Oo);
set(handles.textTo,'string',To);
set(handles.textOs,'string',Os);
set(handles.texth,'string',h);
set(handles.textU,'string',U);
set(handles.textKa,'string',Ka(20));
set(handles.textK1,'string',K1);
set(handles.textK2,'string',K2);
set(handles.textKs,'string',Ks);
set(handles.textKr,'string',Kr);
set(handles.textOD,'string',OD);
set(handles.textDD,'string',DD);
set(handles.textDo,'string',Do);
set(handles.textDc,'string',Dc);
set(handles.textTc,'string',tc);
set(handles.textL,'string',L);
%axes(handles.axes1)
%hancles.P1=plot(Tv,DD,'-b',Tv,OODD,'-.g','LineWidth',2,'MarkerSize',4);
%legend('Deficit Oxigeno Disuelto (mg/L)','Oxigeno Disuelto (mg/L)');
%xlabel('Tiempo (d)');
%ylabel('[] Oxigeno (mg/L)');
title('Grafico de balance de Oxigeno');
text(tc,Dc,'\leftarrow Dc');
text(tc,Oc,'\leftarrow Oc');
grid on
handles.Tv=Tv;
handles.DD=DD;
handles.OODD=OODD;
handles.LL=LL;
guidata(hObject, handles);