Académique Documents
Professionnel Documents
Culture Documents
ANDRES
FACULTAD DE INGENIERIA
2º PARCIAL
ESTUDIANTES:
PROBLEMA 8.2
8.2 En ingeniería química, los reactores de flujo tipo tapón (es decir, aquellos en que el fluido va de un extremo al otro con
una mezcla mínima a lo largo del eje longitudinal) se usan para convertir reactantes en productos. Se ha determinado que la
eficiencia de la conversión algunas veces se mejora recirculando
una porción de la corriente del producto, de tal forma que regrese a la entrada para un paso adicional a través del reactor
(figura P8.2). La razón de recirculando se define como
Suponga que se está procesando una sustancia química A para generar un producto B. Para el caso en que A forma a B de
acuerdo con una reacción auto catalítica (es decir, en la cual uno de los productos actúa como catalizador o estimulante en la
reacción), es posible demostrar que una razón óptima de recirculación debe satisfacer
donde XAƒ es la fracción del reactante A qué se convierte en el producto B. La razón óptima de recirculación corresponde a
un reactor de tamaño mínimo necesario para alcanzar el nivel
deseado de conversión. Utilice un método numérico para determinar la razón de recirculación necesaria, de manera que se
minimice el tamaño del reactor para una conversión fraccional de XAƒ = 0.95
Figura P8.2
Representación esquemática de un reactor de flujo tipo tapón con recirculación.
2. ALGORITMO
Newton Raphson
𝑽𝑹 𝟏+𝑹(𝟏−𝑿𝑨𝒇 ) 𝑹+𝟏
𝑹= ; 𝒍𝒏 =
𝑽𝑺 𝑹(𝟏−𝑿𝑨𝒇 ) 𝑹[𝟏+𝑹(𝟏−𝑿𝑨𝒇 )]
𝑹𝟏 = 𝑹𝒐 Volvemos al paso 2
R1 es solución
3. DIAGRAMA DE FLUJO
INICIO
XAƒ , Ro
fR=ln (1+R(1-XAf))/(R(1-XAf))-(R+1)/R[1+R(1-XAf)]
Error=20
h=0,00001
tol=0,001
NO
Error > tol R1 FIN
SI
fR=fr(Ro)
d fR = (fr(Ro+h) - fr(Ro-h))/(2*h)
R1=RO – fR/dfR
Error= R1-Ro
R1=RO
4. CODIFICACION EN MATLAB
PROGRAMA razon.m
clc,clear
global Xaf
%usando newton
Xaf=0.96
h=0.00001
tol=0.001
error=20
i=1
Ro=0.5
while error>tol
fr=razon(Ro);
dfr=(razon(Ro+h)-razon(Ro-h))/(2*h);
R1=Ro-fr/dfr;
error=abs(R1-Ro);
fprintf('i=%g Ro=%g fr=%g dfr=%g R1=%g error=%g \n',i, Ro, fr, dfr, R1, error)
Ro=R1;
i=i+1;
end
R1
PROGRAMA metodo1.m
clc,clear
global Xaf
%usando newton
Xaf=0.96
h=0.00001
tol=0.001
error=20
i=1
Ro=0.5
while error>tol
fr=razon(Ro);
dfr=(razon(Ro+h)-razon(Ro-h))/(2*h);
R1=Ro-fr/dfr;
error=abs(R1-Ro);
fprintf('i=%g Ro=%g fr=%g dfr=%g R1=%g error=%g \n',i, Ro, fr, dfr, R1, error)
Ro=R1;
i=i+1;
end
R1
PROGRAMA FOR_NEWTON.M (GUIDE)
function varargout = FOR_NEWTON(varargin)
% FOR_NEWTON MATLAB code for FOR_NEWTON.fig
% FOR_NEWTON, by itself, creates a new FOR_NEWTON or raises the existing
% singleton*.
%
% H = FOR_NEWTON returns the handle to a new FOR_NEWTON or the handle to
% the existing singleton*.
%
% FOR_NEWTON('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in FOR_NEWTON.M with the given input arguments.
%
% FOR_NEWTON('Property','Value',...) creates a new FOR_NEWTON or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before FOR_NEWTON_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to FOR_NEWTON_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
[y,Fs] = audioread('back.mp3');
sound(y,Fs);
axes(handles.axes2)
a=imread('back.jpg');
image(a);
axis off
axes(handles.axes3)
b=imread('figura.jpg');
image(b);
axis off
% --- Outputs from this function are returned to the command line.
function varargout = FOR_NEWTON_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)
global Xaf
%usando newton
Xaf=str2double(get(handles.edit1,'String'))
h=0.00001;
tol=str2double(get(handles.edit3,'String'))
error=20;
i=1;
Ro=str2double(get(handles.edit2,'String'))
if Ro<=0 || Ro>0.5
msgbox('EL valor dado es inapropiado debido a la naturaleza de la función')
return
end
while error>tol
numit(i)=i;
Rov(i)=Ro;
fr=razon(Ro);
frv(i)=fr;
dfr=(razon(Ro+h)-razon(Ro-h))/(2*h);
dfrv(i)=dfr;
R1=Ro-fr/dfr;
R1v(i)=R1;
error=abs(R1-Ro);
errorv(i)=error;
Ro=R1;
i=i+1;
end
iteraciones=[numit' Rov' frv' dfrv' R1v' errorv'];
set(handles.uitable1,'Data',iteraciones)
set(handles.edit4,'String',num2str(R1))
%para la grafica
syms R
xg=[0.51 0.6 0.7 0.8 0.9 0.96]
n=length(xg);
Xbf=1-xg;
for i=1:n
rg(i)=vpasolve(log((1+R.*Xbf(i))./(R.*Xbf(i)))-(R+1)./(R.*(1+R.*Xbf(i)))==0,R);
end
axes(handles.axes1)
plot(xg,rg,'o-')
title('Razon vs Xaf')
xlabel('Concentración, Xaf')
ylabel('Razon, R')
grid on
5. RESULTADOS DE LA EJECUCION
XAf=0.95