Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2017
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. T=200; %K
  2. a=1.505; %L^2*bar/mol^2
  3. b=0.03985; %L/mol
  4. R=8.3144598*10^-2; %L*?bar/K*?mol
  5.  
  6. for P=(1:1:5)
  7. A=(a.*P)/((R*T)^2)
  8. B=(b.*P)/(R*T)
  9. r=roots([1,-(1+B),A,-A.*B]);
  10. Z(P)=r(imag(r)==0);
  11. gamma=exp((Z-1)-(A./Z)-(log(Z-B)))
  12. end
  13. F=(1:1:5);
  14.  
  15. plot(F,gamma)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement