al21=-(1+k2*(1-tr2^0.5))*k2*(1/t/tc2)^0.5; a2=0.45724*al2*R^2*tc2^2/pc2*10^-6; a21=0.45724*al21*R^2*tc2^2/pc2*10^-6; b2=0.07780*R*tc2/pc2*10^-6; % 混合法则 k12=0.01; am=0.3233*a1+0.1861*a2+0.4857*(1-k12)*sqrt(a1*a2); am1=0.3233*a11+0.1861*a21+0.4857*(1-k12)*(1/sqrt(4*a1*a2)*(a11*a2+a1*a21)); bm=0.5686*b1+0.4314*b2; % 压缩因子 Z 方程的系数 A=am*p*10^6/(R*t)^2; B=bm*p*10^6/t/R; z=1.0;D=1;fz=1; eps1=0.00001;eps2=0.00001; while D>eps1&&abs(fz)>eps2 fz=z^3-(1-B)*z^2+z*(A-2*B-3*B^2)-(A*B-B^2-B^3); fzz=3*z^2-2*(1-B)*z+A-2*B-3*B^2; y=z; z=z-fz/fzz; D=abs((z-y)/z); end v=z*R*t/p/10^6; fprintf(' 该温度及压力下的混合制冷剂的比体积( m3/mol )为 v=%.6f\n',v); v1=R*t/p/10^6; hr=(t*am1-am)/(2^1.5*bm)*log((v-0.414*bm)/(v+2.414*bm))+R*t*(1-z); sr=am1/(2^1.5*bm)*log((v-0.414*bm)/(v+2.414*bm))-R*log((v-bm)/v)-R*log(v/v1); hr=hr/M; sr=sr/M;