You are on page 1of 5

MTODO SIMPSON COMPUESTO T=T+h;

S1=S1+Q;
1.- En un proceso industrial se requiere vapor a 650 K . La planta cuenta
Qa=32.24+0.001924*a+1.055E-5*a^2-3.596E-9*a^3;
con vapor de agua inicialmente a 400 K, se desea calcular la cantidad de
Qb=32.24+0.001924*b+1.055E-5*b^2-3.596E-9*b^3;
calor que se debe suministrar a presin constante a cierta cantidad de vapor S=h/3*(Qa+4*S1+2*S2+Qb);
para llevarlo las condiciones necesarias de trabajo. El cp del vapor de agua fprintf('%4d %8.2f \n',n,S)
es: end
Cp= 32.24+0.001924*T+1.055E-5*T^2-3.596E-9*T^3 (en KJ/Kmol.K) disp('--------------------------')
disp(' ')
Tf
fprintf('El Calor a suministrar al vapor de agua es %.0f KJ/kmol \n',S)
Q= Cp dT
Ti

SOLUCIN:
SOLUCIN:
Mtodo de simpson compuesto
clc,clear all
disp('Mtodo de simpson compuesto') CLCULO DE LA CANTIDAD DE CALOR A SUMINISTRAR
disp('CLCULO DE LA CANTIDAD DE CALOR A SUMINISTRAR') ------------------------
disp(' ') CALOR
disp('------------------------') (KJ/mol)
disp(' CALOR ') -----------------------
disp(' (KJ/mol) ') 1 13916.86
disp('------------------------') 2 6958.43
a=400; b=600; 4 7000.47
for i=1:12 8 7052.30
n=2^(i-1); 16 7070.00
S1=0; S2=0; 32 7076.54
T=a; h=(b-a)/n; 64 7079.20
Q=32.24+0.001924*T+1.055E-5*T^2-3.596E-9*T^3 ; 128 7080.37
if n>2 256 7080.92
for j=1:n/2-1 512 7081.18
T=T+h;
1024 7081.31
Q=32.24+0.001924*T+1.055E-5*T^2-3.596E-9*T^3;
2048 7081.37
S1=S1+Q;
T=T+h; -------------------------
S2=S2+Q; El Calor a suministrar al vapor de agua es 7081 KJ/kmol
end
end
if i~=j
producto1=producto1*(x-P(j))/(P(i)-P(j));
producto2=producto2*(y-P(j))/(P(i)-P(j));
CUADRATURA DE GAUSS: end
Ejemplo 6.3 end
fprintf('\n\n *(Ejemplo 6.3) La fugacidad del butano a 40 atm y 200 C*') xi=xi+producto1; % suma cada termino
fprintf('\n--------------------------------------------------------------\n') yi=yi+producto2;
% intervalos de integracin: end
a=0; b=40; z1=yi
% coeficientes z2=xi
w1=1; w2=w1; f1=(z2-1)/t2;
t1=-(b-a)/2*1/sqrt(3)+(b+a)/2 f2=(z1-1)/t1;
t2=(b-a)/2*1/sqrt(3)+(b+a)/2 s=(b-a)/2*(w1*f1+w2*f2)
fprintf('\nLa fugacidad del butano a 40 atm y 200 C es: %6.4f \n\n',exp(s))
% interpolacion por el polinomio de lagrange
P=[5 8 15 19 25 30 35 40]; z=[0.937 0.887 0.832 0.800 0.781 0.754 0.729 RESULTADOS:
0.697];
x=t2; *(Ejemplo 6.4) La fugacidad del butano a 40 atm y 200 C*
y=t1;
Tabla=[P;z]; --------------------------------------------------------------
disp(' ') t1 = 8.4530
disp(' P z') t2 = 31.5470
disp(' (atm) ') P z
disp(' ================') (atm)
fprintf('%10.0f % 7.2f\n',Tabla) ========
disp(' ----------------') 5 0.94
disp(' ') 8 0.89
n=length(P); %longitud del vector 15 0.83
% validar longitud igual 19 0.80
if length(z)~=n, error('x e y deben ser la misma longitud');end; 25 0.78
xi=0; 30 0.75
yi=0; 35 0.73
%calculo de los n factores de lagrange 40 0.70
for i=1:n ----------------
% cada factor es el producto (x-xj)/(xi-xj) donde i~=J
producto1=z(i); z1 = 0.8842
producto2=z(i); z2 = 0.7433
for j=1:n
s = -0.4367 plot(Tc,fc,'r');
hold on
La fugacidad del butano a 40 atm y 200 C es: 0.6462 plot(T,f)
MTODO DE SIMSONPS stem(T,f)
a) La cantidad de calor necesaria para elevar la temperatura de 1000gr function y=funcion(T)
de H2O desde 1000C hasta 2000C se puede evaluar de la siguiente cp=2.64*10e-7.*T.^2+1.56*10e-4.*T+0.132; % calor especfico, J/g*K
forma: m=1000; % masa del agua, gr
T2 y=m.*cp; % valor de la entalpa
H=m Cp ( T ) dT RESULTADO
T1
CALCULO DE INTEGRALES POR LA REGLA DE SIMPSON 1/3

7 2 4
Cp=2.64 10 T +1.56 10 T + 0.132 Digite el valor del lmite inferior (a): -1000
Digite el valor del lmite superior (a): 2000
Digite un nmero par de intervalos(n): 4
Determinar H empleando la tcnica del trapecio y la regla de Simpson.
SOLUCIN El valor de la integral es: I= 4449.000000 KJ
function entalpia13
clc,
fprintf('CALCULO DE INTEGRALES POR LA REGLA DE SIMPSON
1/3\n\n')
a=input('Digite el valor del lmite inferior (a): ');
b=input('Digite el valor del lmite superior (a): ');
n=input('Digite un nmero par de intervalos(n): ');
h=(b-a)/n;
T=a:h:b;
f=funcion(T);
if n>2
Delta_H=h/3*(f(1)+4*sum(f(2:2:n-1))+2*sum(f(3:2:n-1))+f(n+1));
else
Delta_H=h/3*(f(1)+4*f(2)+f(3));
end
% Imprimiendo resultado
fprintf('\n\n El valor de la integral es: I=%12.6f KJ\n',Delta_H/1000);
% Trazo la grfica de la funcin en el intervalo [a,b]
h2=(b-a)/100;
Tc=a+(0:100)*h2;
fc=funcion(Tc);
for j=1:n-1
x=x+h;
f=0.235*exp(0.0473*x^(1/2));
s=f+s;
end
MTODO TRAPEZOIDAL COMPUESTO end
a) Como parte de un clculo de diseo es necesario evaluar el cambio fa=0.235*exp(0.0473*a^(1/2));
de entalpia de un vapor orgnico raro que se enfriara de 1800 C a fb=0.235*exp(0.0473*b^(1/2));
150C en un intercambiador de calor. s=h/2*(fa+2*s+fb);
La capacidad calorfica se ajusta a la siguiente ecuacin: e=abs((-1731-s)/-1731*100);
0.5

Cp=0.235 e(0.473 T )
fprintf('%4d \t %8.6f \t\t %8.6f\n',n,s,e)

Determinar la el cambio de entalpia end


cal fprintf('La entalpia del vapor es %.6f cal/g \n',s)
H= Cp dT ,[ ]
gr
RESULTADO
SOLUCIN
***********************************
clc,clear all
* Universidad Nacional de Trujillo*
%Universidad Nacional de Trujillo
* FACULTAD DE INGENIERIA QUIMICA*
%Profesor : DR.Ing Guillermo Evangelista
***********************************
%Libro: Nieves y Dominguez 3era edicin
Profesor : DR.Ing Guillermo Evangelista
fprintf('\t\t***********************************')
Libro: Nieves y Dominguez 3era edicin
fprintf('\n\t\t* Universidad Nacional de Trujillo*')
TEMA:INTEGRACION NUMERICA
fprintf('\n\t\t* FACULTAD DE INGENIERIA QUIMICA *')
MTODO DEL TRAPEZIO COMPUESTO
fprintf('\n\t\t***********************************')
La funcion es :0.235*exp(0.0473*x^(1/2))
fprintf('\n\t\tProfesor : DR.Ing Guillermo Evangelista')
fprintf('\n\t\tLibro: Nieves y Dominguez 3era edicin')
N aproxi. al rea Error en
fprintf('\n\t\tTEMA:INTEGRACION NUMERICA')
porcentaje
fprintf('\n\t\tMTODO DEL TRAPEZIO COMPUESTO')
======================================
fprintf('\n\t\tLa funcion es :0.235*exp(0.0473*x^(1/2))')
1 -1788.310557 3.310835
fprintf('\n\n N aproxi. al rea Error en porcentaje')
2 -1743.237178 0.706943
fprintf('\n======================================\n')
4 -1733.764933 0.159730
a=1800;b=150;
8 -1731.729833 0.042163
for i=1:11
16 -1731.266385 0.015389
n=2^(i-1);
32 -1731.155052 0.008957
h=(b-a)/n;x=a;s=0;
64 -1731.127573 0.007370
if n>1
128 -1731.120726 0.006974
256 -1731.119016 0.006876
512 -1731.118589 0.006851
1024 -1731.118482 0.006845
La entalpia del vapor es -1731.118482 cal/g

You might also like