Advertisement
Guest User

Untitled

a guest
Oct 19th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.91 KB | None | 0 0
  1. function IR5cIsak
  2. [x,y]=ode23s(@batch,[0:1:140],[3.996 0 0])
  3. plot(x,y)
  4. eta=(3.996-y(:,1))/3.996;
  5. figure(1);plot(x,y);title('C')
  6. legend('Cxylos','CH2','Cxylitol')
  7. figure(2);plot(x,eta);grid on;title('omsättningsgrad')
  8. figure(3);plot(x,y(:,2));title('vatgas koncentration')
  9. return
  10.  
  11. function dcdt = batch(t,c)
  12.  
  13. % rate equations
  14. k  = 2.8;
  15. Kxyl  = 5.26e-3;
  16. KH2  = 0;
  17.  
  18.  
  19. cA = c(1);
  20. cB = c(2);
  21. cC = c(3);
  22.  
  23. kLa=57.5*1.5;
  24. pB=75000/5200;
  25. ctot=3.997;
  26. p=40;
  27. mcat=75000;  % kg katalysator
  28. T=383.15;
  29. R=0.0831451;
  30. V=5200;
  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. vatgasflode=(cG-Keq*cB)/(Keq/kLa)*V
  44.  
  45. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement