Van der Waals Isotherms

p[v_,t_]:=((8t)/(3v-1))-(3/(v^2))

vl[t_]:=1-2659.84 (((1-t))^3)+11440.55 (((1-t))^4)-17766.11 (((1-t))^5)+14.9451 (-1+t)+279.1356 (((-1+t))^2)

vg[t_]:=1-18.8392 (-1+t)-133.412 (((-1+t))^2)-1111.96 (((-1+t))^3)-3661.78 (((-1+t))^4)-5325.71(((-1+t))^5)

pm[v_,t_]:=If[v≤vl[t]||v≥vg[t],p[v,t],(1-0.864592 (((1-t))^3)-0.946667 (((1-t))^4)+3.999832 (-1+t)+4.793989 (((-1+t))^2))]

iso[m_,v_,t_]:=If[m==1,pm[v,t],p[v,t]]

Manipulate[Plot[{p[v,1],p[v,t],iso[m,v,t]},{v,1/3,5},PlotStyle->{{Thick,Red},{Thick,Gray},{Thick,Black}},PlotRange->{{0,5},{-.5,1.5}},Filling->{2->{3}},AspectRatio->.75,Frame->True,FrameLabel->{Style[Row[{"reduced volume ",v}],14],Style[Row[{"reduced pressure ",p}],14],Style["Van der Waals isotherms",16]},ImageSize->{600,400},Epilog->Inset[Text@Style["⟵ critical isotherm",12,Red],{1.2,1.4}]],{{t,.80,"isotherm temperature t"},.80,1.20,Appearance->"Labeled"},{{m,0,"Maxwell construction"},{0,1},ControlType->Checkbox},SaveDefinitions->True]

THIS NOTEBOOK IS THE SOURCE CODE FROM

"Van der Waals Isotherms" from The Wolfram Demonstrations Project
 http://demonstrations.wolfram.com/VanDerWaalsIsotherms/

Contributed by: S. M. Blinder

A full-function Wolfram Mathematica 6 system is required to edit this notebook.
GET WOLFRAM MATHEMATICA 6 »

© The Wolfram Demonstrations Project & Contributors   |   Terms of Use   |   Make a new version of this Demonstration »