Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- clear all;clc;close all
- % Definine variables :
- E = 32400; % Énergie d'activation (Btu/lbmol)
- R = 1.987; % Contante des gaz (Btu/lbmol*R)
- A = 1.696*10^13;% Constante (1/h)
- Vo = 326.34; % Débit de l'alimentation (ft3/h)
- Ftot = 888.88; % Débit molaire total (lbmol/h)
- Rho = 2.8121; % Densité moyenne (lbmol/ft3)
- Hr = -36400; % Enthalpie de la réaction (Btu/lbmol)
- Cp = 18.915; % Chaleur spécifique moyenne (Btu/lbmolF)
- Fao = 43.04; % Débit molaire d'oxyde de propylène (lbmol/h)
- Cao = Fao/Vo;
- Caot = Fao/Vo;
- Cai0 = 0;
- Ti = 535; % Température initiale (°R)
- dt = 1/300; % Delta temps (Heure)
- dV = 5; % Delta volume (ft³)
- V = input('Donner le volume du réacteur ');
- Ca = zeros(V/5,301);
- Ca(1,:) = Cao;
- T = zeros(V/5,301);
- T(1,:) = Ti;
- T(:,1) = Ti;
- ii = 2;
- jj = 1;
- % if V < 10
- % disp('Le volume d''un tel réacteur ne peut être en deça de 10 ft³!')
- % end
- for Vv = 2*dV:dV:V;
- for t = dt:dt:1;
- k = A*exp(-E/(R*T(ii,jj)));
- ra = -k*Ca(ii,jj);
- Ca(ii,jj+1) = ra*dt+(Ca(ii-1,jj)-Ca(ii,jj))*Vo*dt/dV+Ca(ii,jj);
- T(ii,jj+1) = -(Ftot*(T(ii,jj)-T(ii-1,jj)))/Rho*(dt/dV)+(Hr*ra*dt)/(Rho*Cp)+T(ii,jj);
- jj=jj+1;
- % if T > 615
- % disp('La température d''opération d''un tel réacteur est trop haute!')
- % end
- end
- jj=jj-300;
- ii=ii+1;
- % if Ca(ii,jj)-Ca(ii,jj-1) < 1/10000;
- % break
- % end
- end
- subplot(2,2,1); surf(Ca); view(0,0);
- xlabel('Temps (300 = 1 heure)');
- zlabel('Concentration de propylène glycol(lbmol/ft³)');
- subplot(2,2,2); surf(Ca); view(90,0)
- xlabel('Distance parcourue dans le réacteur (1 = 5ft)');
- zlabel('Concentration de propylène glycol(lbmol/ft³)');
- subplot(2,2,3); surf(T); view(0,0);
- xlabel('Temps (300 = 1 heure)');
- zlabel('Température en °R')
- subplot(2,2,4); surf(T); view(90,0)
- xlabel('Distance parcourue dans le réacteur (1 = 5ft)');
- zlabel('Température en °R')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement