Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- T=200; %K
- a=1.505; %L^2*bar/mol^2
- b=0.03985; %L/mol
- R=8.3144598*10^-2; %L*?bar/K*?mol
- for P=(1:1:5)
- A=(a.*P)/((R*T)^2)
- B=(b.*P)/(R*T)
- r=roots([1,-(1+B),A,-A.*B]);
- Z(P)=r(imag(r)==0);
- gamma=exp((Z-1)-(A./Z)-(log(Z-B)))
- end
- F=(1:1:5);
- plot(F,gamma)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement