Einführung in Mathematica VI

van der Waals - Gas

© Jürgen Schnack, 2009/04/22

van der Waals - Gas I

(p+(a/(v^2)))*(v-b)=R*T

Gaskonstante R=8.31451 (((m^2) kg)/((s^2) K mol    ))

van der Waals - Gas II

R=8.31451;

a=20;
b=1;

Explizite Darstellung, V in ((m^3)/mol), T in K

p[T_,v_]=((R*T)/((v-b)))-(a/(v^2));

van der Waals - Gas III

Plot[{p[0.4,v],p[0.5,v],p[0.6,v],p[0.7,v],p[0.8,v],p[0.9,v],p[1.0,v]},{v,b,20},PlotRange->{{0,20},{-3,3}},PlotStyle->{Red,Green,Blue,Cyan,Black},
AxesLabel->{"V","p"},
PlotLabel->"Isothermen",
TextStyle->{FontFamily->Helvetica,FontSize->18}]

van der Waals - Gas IV: krit. Punkt

dp1[T_,v_]=D[p[T,v],v]

dp2[T_,v_]=D[dp1[T,v],v]

KP1=Solve[{dp1[T,v]==0,dp2[T,v]==0},{T,v}]

van der Waals - Gas V

Plot[{p[0.7127210053179233,v],p[0.5,v],p[0.6,v],p[0.7,v],p[0.8,v],p[0.9,v],p[1.0,v]},{v,b,20},PlotRange->{{0,20},{-3,3}},
PlotStyle->{Red,Black,Black,Black,Black,Black,Black},
AxesLabel->{"V","p"},
PlotLabel->"Isothermen",
TextStyle->{FontFamily->Helvetica,FontSize->18}]

van der Waals - Gas VI: 
Maxwell-Konstruktion

Plot[{0.6,p[0.65,v],p[0.66,v],p[0.67,v],p[0.68,v]},{v,b,20},PlotRange->{{0,10},{0.3,0.75}},
PlotStyle->{Red,Black,Black,Black,Black,Black,Black},
AxesLabel->{"V","p"},
PlotLabel->"Isothermen",
TextStyle->{FontFamily->Helvetica,FontSize->18}]

van der Waals - Gas VII: 
Maxwell-Konstruktion

Plot[{p[0.65,v],0.45,0.5,0.55},{v,b,20},PlotRange->{{0,10},{0.3,0.75}},
PlotStyle->{Red,Green,Black,Blue},
AxesLabel->{"V","p"},
PlotLabel->"Isothermen",
TextStyle->{FontFamily->Helvetica,FontSize->18}]

van der Waals - Gas VIII: 
Maxwell-Konstruktion

p1=0.5;
sol=Solve[p[0.65,v]==p1,v]

v1=v/.sol[[1]]
v3=v/.sol[[3]]

MI=Integrate[p[0.65,v]-p1,{v,v1,v3}]

van der Waals - Gas IX: 
Maxwell-Konstruktion

po=0.55;
sol=Solve[p[0.65,v]==po,v];
v1=v/.sol[[1]];
v3=v/.sol[[3]];
MI=Integrate[p[0.65,v]-po,{v,v1,v3}]

pu=0.45;
sol=Solve[p[0.65,v]==pu,v];
v1=v/.sol[[1]];
v3=v/.sol[[3]];
MI=Integrate[p[0.65,v]-pu,{v,v1,v3}]

While[Abs[MI]≥0.001,
p1=(po+pu)/2.0;
sol=Solve[p[0.65,v]==p1,v];
v1=v/.sol[[1]];
v3=v/.sol[[3]];
MI=Integrate[p[0.65,v]-p1,{v,v1,v3}];
Print[p1,"  ",MI];
If[MI≥0.0,pu=p1,po=p1]]