kill(all);

peter.vlasschaert@gmail.com,13/07/2017  'version 1'

VAN  DER WAAlS EQUATION OF STATE (thermodynamics part 3)
P=R*T/(V-b)-a/V^2,   a/V^2 = ('intermolecular forces of attraction')
                                      b      = ('volume occupied by the gas molecules')

p1:P=R*T/(V-b)-a/V^2;

p2=(dP/dV) =0  by T = T_c , V = V_c ,  (index : c =critical)

p2:diff(p1,V,1)$
p3:ev(p2,V=V_c,T=T_c);
p4:p3-part(p3,2,2);

p5=(d(dp)/dV^2) =0  by T = T_c , V = V_c ,  (index : c =critical)

p5:diff(p1,V,2)$
p6:ev(p5,V=V_c,T=T_c);
p7:p6-part(p6,2,2);

find : a,b (from p4,p7)

p8:part(solve(p4,a),1);

find b:

p9:ev(p7,p8);
p10:part(solve(p9,b),1);

find a:

p11:ev(p8,p10);

find  P=P_c

p12:ev(p1,P=P_c,T=T_c,V=V_c);

p13:ev(p12,p11,p10);

find :  definition  'Z_c =(P_c*V_c)/(R*T_c)'

rem: Z_c ( = critical compressibility factor) is 3/8 'van der Waals fluid'
         

p14:p13*V_c;
p15:part(p14,2,1,1);
p16:denom(part(p14,2));

p161:Z_c=(P_c*V_c)/(R*T_c);

p17:Z_coef=p15/p16;

Z_c = float(part(p17,2));

rem: real gases : 0.22<Z_coef<0.3

find : V_c

p18:part(solve(p14,V_c),1);

find a,b:

find b with V_c

p19:ev(p10,p18);

find a with V_c

p20:ev(p11,p18);