Advertisement
Guest User

Untitled

a guest
Jun 28th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.92 KB | None | 0 0
  1. clear all;clc;close all
  2.  
  3. % Definine variables :
  4. E = 32400; % Énergie d'activation (Btu/lbmol)
  5. R = 1.987; % Contante des gaz (Btu/lbmol*R)
  6. A = 1.696*10^13;% Constante (1/h)
  7. Vo = 326.34; % Débit de l'alimentation (ft3/h)
  8. Ftot = 888.88; % Débit molaire total (lbmol/h)
  9. Rho = 2.8121; % Densité moyenne (lbmol/ft3)
  10. Hr = -36400; % Enthalpie de la réaction (Btu/lbmol)
  11. Cp = 18.915; % Chaleur spécifique moyenne (Btu/lbmolF)
  12. Fao = 43.04; % Débit molaire d'oxyde de propylène (lbmol/h)
  13. Cao = Fao/Vo;
  14. Caot = Fao/Vo;
  15. Cai0 = 0;
  16. Ti = 535; % Température initiale (°R)
  17. dt = 1/300; % Delta temps (Heure)
  18. dV = 5; % Delta volume (ft³)
  19. V = input('Donner le volume du réacteur ');
  20. Ca = zeros(V/5,301);
  21. Ca(1,:) = Cao;
  22. T = zeros(V/5,301);
  23. T(1,:) = Ti;
  24. T(:,1) = Ti;
  25. ii = 2;
  26. jj = 1;
  27.  
  28. % if V < 10
  29. % disp('Le volume d''un tel réacteur ne peut être en deça de 10 ft³!')
  30. % end
  31.  
  32. for Vv = 2*dV:dV:V;
  33. for t = dt:dt:1;
  34. k = A*exp(-E/(R*T(ii,jj)));
  35. ra = -k*Ca(ii,jj);
  36. Ca(ii,jj+1) = ra*dt+(Ca(ii-1,jj)-Ca(ii,jj))*Vo*dt/dV+Ca(ii,jj);
  37. T(ii,jj+1) = -(Ftot*(T(ii,jj)-T(ii-1,jj)))/Rho*(dt/dV)+(Hr*ra*dt)/(Rho*Cp)+T(ii,jj);
  38. jj=jj+1;
  39. % if T > 615
  40. % disp('La température d''opération d''un tel réacteur est trop haute!')
  41. % end
  42. end
  43. jj=jj-300;
  44. ii=ii+1;
  45. % if Ca(ii,jj)-Ca(ii,jj-1) < 1/10000;
  46. % break
  47. % end
  48. end
  49.  
  50. subplot(2,2,1); surf(Ca); view(0,0);
  51. xlabel('Temps (300 = 1 heure)');
  52. zlabel('Concentration de propylène glycol(lbmol/ft³)');
  53.  
  54. subplot(2,2,2); surf(Ca); view(90,0)
  55. xlabel('Distance parcourue dans le réacteur (1 = 5ft)');
  56. zlabel('Concentration de propylène glycol(lbmol/ft³)');
  57.  
  58. subplot(2,2,3); surf(T); view(0,0);
  59. xlabel('Temps (300 = 1 heure)');
  60. zlabel('Température en °R')
  61.  
  62. subplot(2,2,4); surf(T); view(90,0)
  63. xlabel('Distance parcourue dans le réacteur (1 = 5ft)');
  64. zlabel('Température en °R')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement