You are on page 1of 7

TEMA

:
_Proyecto de Programacin
MATERIA : _Programacin para la ingeniera
FACULTAD

: _Facultad De ingeniera

PROFESOR(A)

: _William Torres Huayta

ALUMNO(A)

: _Valeria Cecilia Carrera

CDIGO

: _2012-36034

AO

: _2do

TACNA-PERU
2013

HUMEDAD RELATIVA
El aire es una mezcla homognea de gases y vapores de agua
Aire=gases + vapor de agua
Si el aire se le quita totalmente el vapor de agua, se tiene lo que se llama aire seco.

La presin atmosfrica es la suma de las presiones parciales de cada uno de los componentes del
aire.
A la presin del vapor de agua se denota con e:
e=presin parcial del vapor de agua
El aire tiene por cada temperatura una determinada capacidad mxima para aceptar el vapor de
agua. En un determinado momento no necesariamente contiene su mxima capacidad el vapor del
agua, y si es mximo, entonces se dice que el aire est saturado de vapor de agua, la presin que
ejerce el vapor de agua en esta situacin se denomina Presin de saturacin del vapor de agua y
se denota con es.
es=Presin de saturacin del agua.
Humedad Relativa:
Es el porcentaje de saturacin del vapor de agua en un determinado ambiente
HR=

presin parcial del vapor de agua


presin de saturacion del agua

x 100 %

Dnde:
HR=Humedad relativa
e=presin parcial del vapor de agua
es=presin de saturacin del vapor del agua a una determinada temperatura.
*Saturado de vapor de agua no indica que est lleno de agua.
En la prctica se utiliza la siguiente frmula:
e=e

sth

(Ts-Th)x0.5

Dnde:

e=Presin de vapor de agua actual en mmHg


esth= Presion de saturacin a temperatura del bulbo hmedo
Th=Temperatura del bulbo Hmedo
Ts=Temperatura del bulbo seco

*La temperatura del bulbo hmedo y del bulbo seco se hallan en un aparato llamado PSICOMETRO.
Se hallara es:
Con la temperatura a la cual se halla la atmsfera se busca en una tabla pscomtrica. Aqu algunos
valores.
T C
16
19
20
21
22
23
24

es (mmHg)
13.60
16.50
17.54
18.65
19.83
21.10
22.40

25
26
27

23.80
25.20
26.70

En el siguiente programa el usuario tendr que seleccionar las temperaturas para, el medio
ambiente actual e ingresar la temperatura captada por el psicmetro.
En funcin a estas dos temperaturas el programa seleccionar las presiones para cada
temperatura y con estas trabajara.
Se obtendr como resultado la humedad relativa de dicho lugar.
Codificacin del Programa:
functionvarargout = Humedad_relativa(varargin)
% HUMEDAD_RELATIVA M-file forHumedad_relativa.fig
%
HUMEDAD_RELATIVA, byitself, creates a new HUMEDAD_RELATIVA orraisestheexisting
%
singleton*.
%
%
H = HUMEDAD_RELATIVA returnsthehandleto a new HUMEDAD_RELATIVA orthehandleto
%
theexistingsingleton*.
%
%
HUMEDAD_RELATIVA('CALLBACK',hObject,eventData,handles,...) callsthe local
%
functionnamed CALLBACK in HUMEDAD_RELATIVA.M withthegiven input arguments.
%
%
HUMEDAD_RELATIVA('Property','Value',...) creates a new HUMEDAD_RELATIVA orraisesthe
%
existingsingleton*. Startingfromtheleft, propertyvaluepairs are
%
appliedtothe GUI beforeHumedad_relativa_OpeningFcngetscalled. An
%
unrecognizedpropertynameorinvalidvaluemakespropertyapplication
%
stop. All inputs are passedtoHumedad_relativa_OpeningFcnviavarargin.
%
%
*See GUI OptionsonGUIDE's Tools menu. Choose "GUI allowsonlyone
%
instancetorun (singleton)".
%
% Seealso: GUIDE, GUIDATA, GUIHANDLES
% Edittheabovetexttomodifythe response tohelpHumedad_relativa
% LastModifiedby GUIDE v2.5 30-Jul-2013 19:54:56
% Begininitializationcode - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',
mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @Humedad_relativa_OpeningFcn, ...
'gui_OutputFcn', @Humedad_relativa_OutputFcn, ...
'gui_LayoutFcn', [] ,...
'gui_Callback',
[]);
ifnargin&&ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end
ifnargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% Endinitializationcode - DO NOT EDIT

% --- ExecutesjustbeforeHumedad_relativaismade visible.


functionHumedad_relativa_OpeningFcn(hObject, eventdata, handles, varargin)
% Thisfunction has no output args, seeOutputFcn.

%
%
%
%

hObjecthandleto figure
eventdatareserved - to be defined in a futureversion of MATLAB
handlesstructurewithhandles and user data (see GUIDATA)
varargincommand line argumentstoHumedad_relativa (see VARARGIN)

% Choose default command line output forHumedad_relativa


handles.output = hObject;
% Updatehandlesstructure
guidata(hObject, handles);
% UIWAIT makesHumedad_relativawaitforuser response (see UIRESUME)
% uiwait(handles.figure1);

% --- Outputs fromthisfunction are returnedtothecommand line.


functionvarargout = Humedad_relativa_OutputFcn(hObject, eventdata, handles)
% varargoutcellarrayforreturning output args (see VARARGOUT);
% hObjecthandleto figure
% eventdatareserved - to be defined in a futureversion of MATLAB
% handlesstructurewithhandles and user data (see GUIDATA)
% Get default command line output fromhandlesstructure
varargout{1} = handles.output;

% --- Executesonselectionchange in temp.


functiontemp_Callback(hObject, eventdata, handles)
% hObjecthandletotemp (see GCBO)
% eventdatareserved - to be defined in a futureversion of MATLAB
% handlesstructurewithhandles and user data (see GUIDATA)
% Hints: contents = cellstr(get(hObject,'String')) returnstempcontents as cellarray
%
contents{get(hObject,'Value')} returnsselecteditemfromtemp

% --- Executesduringobjectcreation, aftersettingallproperties.


functiontemp_CreateFcn(hObject, eventdata, handles)
% hObjecthandletotemp (see GCBO)
% eventdatareserved - to be defined in a futureversion of MATLAB
% handlesempty - handlesnotcreateduntilafterallCreateFcnscalled
% Hint: listboxcontrolsusuallyhave a whitebackgroundon Windows.
%
See ISPC and COMPUTER.
ifispc&&isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

function edit1_Callback(hObject, eventdata, handles)


% hObjecthandleto edit1 (see GCBO)
% eventdatareserved - to be defined in a futureversion of MATLAB
% handlesstructurewithhandles and user data (see GUIDATA)
% Hints: get(hObject,'String') returnscontents of edit1 as text
%
str2double(get(hObject,'String')) returnscontents of edit1 as a double

% --- Executesduringobjectcreation, aftersettingallproperties.


function edit1_CreateFcn(hObject, eventdata, handles)

% hObjecthandleto edit1 (see GCBO)


% eventdatareserved - to be defined in a futureversion of MATLAB
% handlesempty - handlesnotcreateduntilafterallCreateFcnscalled
% Hint: editcontrolsusuallyhave a whitebackgroundon Windows.
%
See ISPC and COMPUTER.
ifispc&&isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

% --- Executesonbuttonpress in pushbutton1.


function pushbutton1_Callback(hObject, eventdata, handles)
% hObjecthandleto pushbutton1 (see GCBO)
% eventdatareserved - to be defined in a futureversion of MATLAB
% handlesstructurewithhandles and user data (see GUIDATA)
tem=get(handles.temp,'value');
switchtem
case 1
Es=13.60;
Ts=16;
case 2
Es=16.50;
Ts=19;
case 3
Es=17.54;
Ts=20;
case 4
Es=18.65;
Ts=21;
case 5
Es=19.83;
Ts=22;
case 6
Es=21.10;
Ts=23;
case 7
Es=22.40;
Ts=24;
case 8
Es=23.80;
Ts=25;
case 9
Es=25.20;
Ts=26;
otherwise
Es=26.70;
Ts=27;
end
tem2=get(handles.temp2,'value');
switch tem2
case 1
Es2=13.60;
T=16;
case 2
Es2=16.50;
T=19;
case 3
Es2=17.54;
T=20;
case 4
Es2=18.65;
T=21;
case 5

Es2=19.83;
T=22;
case 6
case 7

Es2=21.10;
T=23;
Es2=22.40;
T=24;

case 8
case 9

Es2=23.80;
T=25;

Es2=25.20;
T=26;
otherwise
Es2=26.70;
T=27;
end
e=Es2-(Ts-T)*0.5;
H=e/Es*100;
set(handles.humedad,'string',H);
functionhumedad_Callback(hObject, eventdata, handles)
% hObjecthandleto humedad (see GCBO)
% eventdatareserved - to be defined in a futureversion of MATLAB
% handlesstructurewithhandles and user data (see GUIDATA)
% Hints: get(hObject,'String') returnscontents of humedad as text
%
str2double(get(hObject,'String')) returnscontents of humedad as a double

% --- Executesduringobjectcreation, aftersettingallproperties.


functionhumedad_CreateFcn(hObject, eventdata, handles)
% hObjecthandleto humedad (see GCBO)
% eventdatareserved - to be defined in a futureversion of MATLAB
% handlesempty - handlesnotcreateduntilafterallCreateFcnscalled
% Hint: editcontrolsusuallyhave a whitebackgroundon Windows.
%
See ISPC and COMPUTER.
ifispc&&isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

% --- Executesonselectionchange in temp2.


function temp2_Callback(hObject, eventdata, handles)
% hObjecthandleto temp2 (see GCBO)
% eventdatareserved - to be defined in a futureversion of MATLAB
% handlesstructurewithhandles and user data (see GUIDATA)
% Hints: contents = cellstr(get(hObject,'String')) returns temp2 contents as cellarray
%
contents{get(hObject,'Value')} returnsselecteditemfrom temp2

% --- Executesduringobjectcreation, aftersettingallproperties.


function temp2_CreateFcn(hObject, eventdata, handles)
% hObjecthandleto temp2 (see GCBO)
% eventdatareserved - to be defined in a futureversion of MATLAB
% handlesempty - handlesnotcreateduntilafterallCreateFcnscalled
% Hint: listboxcontrolsusuallyhave a whitebackgroundon Windows.
%
See ISPC and COMPUTER.
ifispc&&isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))

set(hObject,'BackgroundColor','white');
end

EJEMPLO ILUSTRATIVO:
Supongamos que la presin atmosfrica en la academia, el da jueves a las 2 de la tarde se tiene una
temperatura de 20 C y con el psicmetro se determin que la temperatura del bulbo hmedo es de
16 C. Hallar la humedad relativa en la academia.
Solucin:

Se obtiene que la Humedad relativa de la academia a las 2 de la tarde es de un 66.13%.

You might also like