Advertisement
Guest User

Untitled

a guest
Oct 19th, 2017
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.83 KB | None | 0 0
  1. function IR5Isak
  2. [x,y]=ode23s(@batch,[0 120],[4.307 0 0])
  3. plot(x,y)
  4. eta=(4.307-y(:,1))/4.307
  5. figure(1);plot(x,y)
  6. figure(2);plot(x,eta);grid on
  7. figure(3);plot(x,y(:,2));title('vatgas koncentration')
  8. return
  9.  
  10. function dcdt = batch(t,c)
  11.  
  12. % rate equations
  13. k  = 2.8;
  14. Kxyl  = 5.26e-3;
  15. KH2  = 0;
  16.  
  17.  
  18. cA = c(1);
  19. cB = c(2);
  20. cC = c(3);
  21.  
  22.  
  23. %kLa=0.1e10; % intensiv omr?rning
  24. kLa=1000000;
  25. pB=75000/5200;
  26. ctot=4.3089;
  27. p=40;
  28. mcat=75000;  % kg katalysator
  29. T=383.15;
  30. R=0.0831451;
  31.  
  32. % gas-liquid equilibrium constants
  33. cG=p/(R*T);
  34.  
  35. xH2=(cA/(cA+cC))*(log(0.9991)-(0.1144/T)+0.0004228*log(p))+(cC/(cA+cC))*(log(0.9993)-(0.1603/T)+0.00041126*log(p));
  36. Keq = cG/(xH2*ctot);
  37. Rate=(k*cA*cB)/((1+Kxyl*cA+sqrt(KH2*cB))^3);
  38.  
  39. % mass balances
  40. dcdt(1,1) = -pB*Rate;
  41. dcdt(2,1) = (cG-Keq*cB)/(Keq/kLa)-0.8*pB*Rate;
  42. dcdt(3,1) = pB*Rate;
  43.  
  44. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement