229 title(top,‘FontSize’,14)
230
231
232 function out = fvdw(P,V,T,a,b)
233 %computes the value of the vdw equation in the form f(V) = 0 …
242 out = -R*T/(V-b)ˆ2+2*a/Vˆ3;
243
244 function out = plot Psat guess(P,T,a,b)
245 %make a plot of the initial guess. returns figure handle for …
saving
256 axis([Vmin,Vmax,0,3])
257 xlabel(‘$\underline{V}$ (L/mol)’,‘FontSize’,14)
258 ylabel(‘$P$ (MPa)’,‘FontSize’,14)
259 top = strcat(‘Guess of Psat for $T = $’,num2str(T),‘K’);
260 title(top,‘FontSize’,14)
270 Vg = find V(Psat,Vg,T,a,b);
271 fGeval = fGdep(Psat,Vl,Vg,T,a,b);
272
273 %start iterating
274 k = 1;