0% encontró este documento útil (0 votos)
68 vistas2 páginas

Function: %KJ/KG %KJ/KG K %KJ/KG K %K

This document contains code for calculating psychrometric properties. It defines constants for heat capacities and heat of vaporization. It then prompts the user to input a pressure and two variables such as temperature, humidity, enthalpy etc. Based on the variables selected, it generates equations relating those variables. Finally, it calls the solve function to calculate the values of pressure, temperature, humidity and other psychrometric properties by solving the system of equations.

Cargado por

oskrSS
Derechos de autor
© © All Rights Reserved
Nos tomamos en serio los derechos de los contenidos. Si sospechas que se trata de tu contenido, reclámalo aquí.
Formatos disponibles
Descarga como DOCX, PDF, TXT o lee en línea desde Scribd
0% encontró este documento útil (0 votos)
68 vistas2 páginas

Function: %KJ/KG %KJ/KG K %KJ/KG K %K

This document contains code for calculating psychrometric properties. It defines constants for heat capacities and heat of vaporization. It then prompts the user to input a pressure and two variables such as temperature, humidity, enthalpy etc. Based on the variables selected, it generates equations relating those variables. Finally, it calls the solve function to calculate the values of pressure, temperature, humidity and other psychrometric properties by solving the system of equations.

Cargado por

oskrSS
Derechos de autor
© © All Rights Reserved
Nos tomamos en serio los derechos de los contenidos. Si sospechas que se trata de tu contenido, reclámalo aquí.
Formatos disponibles
Descarga como DOCX, PDF, TXT o lee en línea desde Scribd
Está en la página 1/ 2

function a=P()

DHvap=4502;
Cpaire=1;
Cpvap=1.88;
Tref=273.15;

%KJ/Kg
%KJ/Kg*K
%KJ/Kg*K
%K

c=input('Ingrese la presin de trabajo(atm):' );


eq1 = ['P=',num2str(c)] ;
k=input('Ingrese variable 1 (T ha Vh hr Tu Tr H) :','S');
if k=='T'
c=input('Ingrese la Temperatura: ');
eq7 = ['T=',num2str(c)] ;
elseif k=='ha'
c=input('Ingrese la Humedad absoluta: ');
eq7 = ['ha=',num2str(c)] ;
elseif k=='Vh'
c=input('Ingrese el Volumen hmedo: ');
eq7 = ['Vh=',num2str(c)] ;
elseif k=='hr'
c=input('Ingrese la Humedad Relativa: ');
eq7 = ['hr=',num2str(c)] ;
elseif k=='Tu'
c=input('Ingrese la Temperatura de Bulbo Hmedo: ');
eq7 = ['Tu=',num2str(c)] ;
elseif k=='Tr'
c=input('Ingrese la Temperatura de Roco: ');
eq7 = ['Tr=',num2str(c)] ;
elseif k=='H'
c=input('Ingrese la Entalpa: ');
eq7 = ['H=',num2str(c)] ;
end
d=input('Ingrese variable 2(T ha Vh hr Tu Tr H) :','S');
if d=='T'
c=input('Ingrese la Temperatura: ');
eq8 = ['T=',num2str(c)] ;
elseif d=='ha'
c=input('Ingrese la Humedad absoluta: ');
eq8 = ['ha=',num2str(c)] ;
elseif d=='Vh'
c=input('Ingrese el Volumen hmedo: ');
eq8 = ['Vh=',num2str(c)] ;

elseif d=='hr'
c=input('Ingrese la Humedad Relativa: ');
eq8 = ['hr=',num2str(c)] ;
elseif d=='Tu'
c=input('Ingrese la Temperatura de Bulbo Hmedo: ');
eq8 = ['Tu=',num2str(c)] ;
elseif d=='Tr'
c=input('Ingrese la Temperatura de Roco: ');
eq8 = ['Tr=',num2str(c)] ;
elseif d=='H'
c=input('Ingrese la Entalpa: ');
eq8 = ['H=',num2str(c)] ;
end

eq2='Vh=2.83*10^-3*T + 4.56*10^-3*ha';
eq3='Tr=(hr/100)^(1/8)*(110+T)-10';
eq4='Cpaire*(T-Tref)+ha*(DHvap+Cpaire*(T-Tref))= H';
eq5='8.314*T/(Vh*exp(16.4-3885/(T+23.2)))=hr';
eq6='hr-ha/(Tbh-T)=hc/(k*DHvap)';
eq9='Cpaire+Cpvap*ha=Ch';
[P,T,ha,Vh,hr,Tu,Tr,H,Ch]=solve(eq1,eq2,eq3,eq4,eq5,eq6,eq7,eq8,eq9)
end

También podría gustarte