Você está na página 1de 14

APLICACIÓN DE INTERFAZ “GUIDE” A TURBOMÁQUINAS

(BOMBAS Y TURBINAS):
Una turbomáquina es un dispositivo que aporta o quita energía a un fluido; una bomba
aporta energía, es decir, la impulsa; una turbina por su parte quita energía, es decir,
succiona. En este caso se usa la interfaz GUIDE al cálculo de la potencia de una bomba.
EJEMPLO:
Sabiendo que la velocidad de entrada de agua a una tubería de 3 in (pulgadas) es de 0.4386
m/s, y que la velocidad de salida por una tubería de 2 in es de 0.9868 m/s; que la presión
manométrica en el tubo de entrada es 250 KPa y en el de salida 650 KPa; y que la
diferencia de alturas entre ellas de 20 cm y despreciando las pérdidas de carga (potencial
hidráulico), se pide calcular la potencia útil de la turbina a comprar (en Watts y Hp)
sabiendo que la eficiencia proporcionada por la empresa es de 100 %.
CÁLCULO MANUAL:
Datos:
D1 (diámetro 1) = 3 in = 0.0762 m
D2 (diámetro 2) = 2 in = 0.0508 m
V1 (velocidad de entrada) = 0.4386 m/s
V2 (velocidad de salida) = 0.9868 m/s
P1 (presión de entrada) = 250 KPa = 250*10^3 N/m2
P2 (presión de salida) = 650 KPa = 650*10^3 N/m2
H1 (altura de tubería 1) = 0 m
H2 (altura de tubería 2) = 20 cm = 0.20 m
P (pérdidas) = 0 m
Nt (eficiencia) = 100 % = 1
ϒ (peso específico del agua) = 9810 N/m3
Cálculo de Caudal (Q):
Q = V1*A1 = V2*A2
Q = ((0.4386)π(0.0762)^2)/4 = 0.002 m3/s
Cálculo de la Altura de bomba (Hb):
Hb = (H2 – H2) + (P2 – P1) + ((V2^2)/2g – (V1^2)/2g) + P
Hb = 0.20 + (650*10^3 – 250*10^3) + ((0.9868)^2/19.62 - (0.4386)^2/19.62) + 0
Hb = 41.01 m
Cálculo de Potencia de Bomba (Watts):
Pot1 = ϒ*Q*Hb/Nt = (9810*0.002*41.01)/1 = 804.6162 Watts
Cálculo de Potencia de Bomba (Hp):
Pot2 = Pot1/746 = 804.6162/746 = 1.08 Hp

CÁLCULO CON MATLAB:


function varargout = BOMBAS(varargin)
% BOMBAS MATLAB code for BOMBAS.fig
% BOMBAS, by itself, creates a new BOMBAS or
raises the existing
% singleton*.
%
% H = BOMBAS returns the handle to a new
BOMBAS or the handle to
% the existing singleton*.
%
%
BOMBAS('CALLBACK',hObject,eventData,handles,...)
calls the local
% function named CALLBACK in BOMBAS.M with
the given input arguments.
%
% BOMBAS('Property','Value',...) creates a
new BOMBAS or raises the
% existing singleton*. Starting from the
left, property value pairs are
% applied to the GUI before BOMBAS_OpeningFcn
gets called. An
% unrecognized property name or invalid value
makes property application
% stop. All inputs are passed to
BOMBAS_OpeningFcn via varargin.
%
% *See GUI Options on GUIDE's Tools menu.
Choose "GUI allows only one
% instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES

% Edit the above text to modify the response to


help BOMBAS

% Last Modified by GUIDE v2.5 17-Jun-2018 21:51:31


% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename,
...
'gui_Singleton',
gui_Singleton, ...
'gui_OpeningFcn',
@BOMBAS_OpeningFcn, ...
'gui_OutputFcn',
@BOMBAS_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
if nargin && ischar(varargin{1})
gui_State.gui_Callback =
str2func(varargin{1});
end

if nargout
[varargout{1:nargout}] =
gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT

% --- Executes just before BOMBAS is made visible.


function BOMBAS_OpeningFcn(hObject, eventdata,
handles, varargin)
% This function has no output args, see OutputFcn.
% hObject handle to figure
% eventdata reserved - to be defined in a future
version of MATLAB
% handles structure with handles and user data
(see GUIDATA)
% varargin command line arguments to BOMBAS (see
VARARGIN)

% Choose default command line output for BOMBAS


handles.output = hObject;

% Update handles structure


guidata(hObject, handles);
% UIWAIT makes BOMBAS wait for user response (see
UIRESUME)
% uiwait(handles.figure1);

% --- Outputs from this function are returned to


the command line.
function varargout = BOMBAS_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)

% Get default command line output from handles


structure
varargout{1} = handles.output;

function diametro1_Callback(hObject, eventdata,


handles)
% hObject handle to diametro1 (see GCBO)
% eventdata reserved - to be defined in a future
version of MATLAB
% handles structure with handles and user data
(see GUIDATA)

% Hints: get(hObject,'String') returns contents of


diametro1 as text
% str2double(get(hObject,'String')) returns
contents of diametro1 as a double

% --- Executes during object creation, after


setting all properties.
function diametro1_CreateFcn(hObject, eventdata,
handles)
% hObject handle to diametro1 (see GCBO)
% eventdata reserved - to be defined in a future
version of MATLAB
% handles empty - handles not created until
after all CreateFcns called

% Hint: edit controls usually have a white


background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

function diametro2_Callback(hObject, eventdata,


handles)
% hObject handle to diametro2 (see GCBO)
% eventdata reserved - to be defined in a future
version of MATLAB
% handles structure with handles and user data
(see GUIDATA)

% Hints: get(hObject,'String') returns contents of


diametro2 as text
% str2double(get(hObject,'String')) returns
contents of diametro2 as a double

% --- Executes during object creation, after


setting all properties.
function diametro2_CreateFcn(hObject, eventdata,
handles)
% hObject handle to diametro2 (see GCBO)
% eventdata reserved - to be defined in a future
version of MATLAB
% handles empty - handles not created until
after all CreateFcns called

% Hint: edit controls usually have a white


background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function altura1_Callback(hObject, eventdata,
handles)
% hObject handle to altura1 (see GCBO)
% eventdata reserved - to be defined in a future
version of MATLAB
% handles structure with handles and user data
(see GUIDATA)

% Hints: get(hObject,'String') returns contents of


altura1 as text
% str2double(get(hObject,'String')) returns
contents of altura1 as a double

% --- Executes during object creation, after


setting all properties.
function altura1_CreateFcn(hObject, eventdata,
handles)
% hObject handle to altura1 (see GCBO)
% eventdata reserved - to be defined in a future
version of MATLAB
% handles empty - handles not created until
after all CreateFcns called

% Hint: edit controls usually have a white


background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

function altura2_Callback(hObject, eventdata,


handles)
% hObject handle to altura2 (see GCBO)
% eventdata reserved - to be defined in a future
version of MATLAB
% handles structure with handles and user data
(see GUIDATA)
% Hints: get(hObject,'String') returns contents of
altura2 as text
% str2double(get(hObject,'String')) returns
contents of altura2 as a double

% --- Executes during object creation, after


setting all properties.
function altura2_CreateFcn(hObject, eventdata,
handles)
% hObject handle to altura2 (see GCBO)
% eventdata reserved - to be defined in a future
version of MATLAB
% handles empty - handles not created until
after all CreateFcns called

% Hint: edit controls usually have a white


background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

function velocidad1_Callback(hObject, eventdata,


handles)
% hObject handle to velocidad1 (see GCBO)
% eventdata reserved - to be defined in a future
version of MATLAB
% handles structure with handles and user data
(see GUIDATA)

% Hints: get(hObject,'String') returns contents of


velocidad1 as text
% str2double(get(hObject,'String')) returns
contents of velocidad1 as a double

% --- Executes during object creation, after


setting all properties.
function velocidad1_CreateFcn(hObject, eventdata,
handles)
% hObject handle to velocidad1 (see GCBO)
% eventdata reserved - to be defined in a future
version of MATLAB
% handles empty - handles not created until
after all CreateFcns called

% Hint: edit controls usually have a white


background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

function velocidad2_Callback(hObject, eventdata,


handles)
% hObject handle to velocidad2 (see GCBO)
% eventdata reserved - to be defined in a future
version of MATLAB
% handles structure with handles and user data
(see GUIDATA)

% Hints: get(hObject,'String') returns contents of


velocidad2 as text
% str2double(get(hObject,'String')) returns
contents of velocidad2 as a double

% --- Executes during object creation, after


setting all properties.
function velocidad2_CreateFcn(hObject, eventdata,
handles)
% hObject handle to velocidad2 (see GCBO)
% eventdata reserved - to be defined in a future
version of MATLAB
% handles empty - handles not created until
after all CreateFcns called

% Hint: edit controls usually have a white


background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

function presion1_Callback(hObject, eventdata,


handles)
% hObject handle to presion1 (see GCBO)
% eventdata reserved - to be defined in a future
version of MATLAB
% handles structure with handles and user data
(see GUIDATA)

% Hints: get(hObject,'String') returns contents of


presion1 as text
% str2double(get(hObject,'String')) returns
contents of presion1 as a double

% --- Executes during object creation, after


setting all properties.
function presion1_CreateFcn(hObject, eventdata,
handles)
% hObject handle to presion1 (see GCBO)
% eventdata reserved - to be defined in a future
version of MATLAB
% handles empty - handles not created until
after all CreateFcns called

% Hint: edit controls usually have a white


background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

function presion2_Callback(hObject, eventdata,


handles)
% hObject handle to presion2 (see GCBO)
% eventdata reserved - to be defined in a future
version of MATLAB
% handles structure with handles and user data
(see GUIDATA)
% Hints: get(hObject,'String') returns contents of
presion2 as text
% str2double(get(hObject,'String')) returns
contents of presion2 as a double

% --- Executes during object creation, after


setting all properties.
function presion2_CreateFcn(hObject, eventdata,
handles)
% hObject handle to presion2 (see GCBO)
% eventdata reserved - to be defined in a future
version of MATLAB
% handles empty - handles not created until
after all CreateFcns called

% Hint: edit controls usually have a white


background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

function perdidas_Callback(hObject, eventdata,


handles)
% hObject handle to perdidas (see GCBO)
% eventdata reserved - to be defined in a future
version of MATLAB
% handles structure with handles and user data
(see GUIDATA)

% Hints: get(hObject,'String') returns contents of


perdidas as text
% str2double(get(hObject,'String')) returns
contents of perdidas as a double

% --- Executes during object creation, after


setting all properties.
function perdidas_CreateFcn(hObject, eventdata,
handles)
% hObject handle to perdidas (see GCBO)
% eventdata reserved - to be defined in a future
version of MATLAB
% handles empty - handles not created until
after all CreateFcns called

% Hint: edit controls usually have a white


background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

function eficiencia_Callback(hObject, eventdata,


handles)
% hObject handle to eficiencia (see GCBO)
% eventdata reserved - to be defined in a future
version of MATLAB
% handles structure with handles and user data
(see GUIDATA)

% Hints: get(hObject,'String') returns contents of


eficiencia as text
% str2double(get(hObject,'String')) returns
contents of eficiencia as a double

% --- Executes during object creation, after


setting all properties.
function eficiencia_CreateFcn(hObject, eventdata,
handles)
% hObject handle to eficiencia (see GCBO)
% eventdata reserved - to be defined in a future
version of MATLAB
% handles empty - handles not created until
after all CreateFcns called

% Hint: edit controls usually have a white


background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

% --- Executes on button press in calcular.


function calcular_Callback(hObject, eventdata,
handles)
% hObject handle to calcular (see GCBO)
% eventdata reserved - to be defined in a future
version of MATLAB
% handles structure with handles and user data
(see GUIDATA)
d1=get(handles.diametro1,'string');
d2=get(handles.diametro2,'string');
h1=get(handles.altura1,'string');
h2=get(handles.altura2,'string');
v1=get(handles.velocidad1,'string');
v2=get(handles.velocidad2,'string');
p1=get(handles.presion1,'string');
p2=get(handles.presion2,'string');
p=get(handles.perdidas,'string');
nt=get(handles.eficiencia,'string');

d1=str2num(d1);
d2=str2num(d2);
h1=str2num(h1);
h2=str2num(h2);
v1=str2num(v1);
v2=str2num(v2);
p1=str2num(p1);
p2=str2num(p2);
p=str2num(p);
nt=str2num(nt);

Q=(((pi*d1^2)*(v1))/4);
HB=((h2-h1)+(p2/9810-p1/9810)+((v2^2)/19.62-
(v1^2)/19.62)+p);
POT1=((9810*Q*HB)/(0.01*nt));
POT2=(POT1/746);

set(handles.salida1,'string',num2str(POT1));
set(handles.salida2,'string',num2str(POT2));
set(handles.salida3,'string',num2str(Q));
set(handles.salida4,'string',num2str(HB));
% --- Executes on button press in borrar.
function borrar_Callback(hObject, eventdata,
handles)
% hObject handle to borrar (see GCBO)
% eventdata reserved - to be defined in a future
version of MATLAB
% handles structure with handles and user data
(see GUIDATA)
set(handles.diametro1,'string','');
set(handles.diametro2,'string','');
set(handles.altura1,'string','');
set(handles.altura2,'string','');
set(handles.velocidad1,'string','');
set(handles.velocidad2,'string','');
set(handles.presion1,'string','');
set(handles.presion2,'string','');
set(handles.perdidas,'string','');
set(handles.eficiencia,'string','');
set(handles.salida1,'string','');
set(handles.salida2,'string','');
set(handles.salida3,'string','');
set(handles.salida4,'string','');
CONCLUSIÓN:
Se comprueba finalmente que los resultados son los mismos (simple diferencia por error
de redondeo).

Você também pode gostar