欢迎来到天天文库
浏览记录
ID:52230220
大小:823.50 KB
页数:21页
时间:2020-03-25
《高等工程热力学作业.doc》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、高等工程热力学作业(编程)第三章实际气体状态方程第四章实际气体导出热力学性质与过程题目:一、用PR方程计算制冷剂R290、R600a和混合制冷剂R290/R600a:50/50wt%的PVT性质。二、用PR方程计算制冷剂R290、R600a和混合制冷剂R290/R600a的导出热力学性质焓和熵。源程序:1、牛顿迭代法求ZfunctionZ=newton(A,B,Z)err=1e-6;forn=0:1000f=Z^3-(1-B)*Z^2+Z*(A-2*B-3*B^2)-(A*B-B^2-B^3);Z=Z-f/(3*Z^2-2*(1-B)*Z+(A-2*B-3*B^2));if(abs(
2、f)3、R^2*N1(2)^2/N1(3)/10^6;aa1=0.45724*R^2*N1(2)^2/N1(3)/10^6*2*sqrt(alpha1)*(-k1/(2*sqrt(N1(2)*T)));b1=0.07780*R*N1(2)/N1(3)/10^6;k2=0.37464+1.54226*N2(4)-0.26992*N2(4)^2;alpha2=(1+k2*(1-(T/N2(2))^0.5))^2;a2=0.45724*alpha2*R^2*N2(2)^2/N2(3)/10^6;aa2=0.45724*R^2*N2(2)^2/N2(3)/10^6*2*sqrt(alpha2)*(-4、k2/(2*sqrt(N2(2)*T)));b2=0.07780*R*N2(2)/N2(3)/10^6;a3=0.25*a1+0.5*(1-0.01)*sqrt(a1*a2)+0.25*a2;aa3=0.25*aa1+0.5*(1-0.01)*1/2/sqrt(a1*a2)*(a1*aa2+a2*aa1)+0.25*aa2;b3=0.5*(b1+b2);a=[a1a2a3];b=[b1b2b3];beta=[aa1aa2aa3];fori=1:3;A(i)=a(i)*p*10^6/(R^2*T^2);B(i)=b(i)*p*10^6/(R*T);Z(i)=newton(A(i),B(5、i),1);vv(i)=R*T*Z(i)/p/10^6;digits(5);v(i)=vpa(vv(i),5);i=i+1;enda=[a1a2a3];b=[b1b2b3];beta=[aa1aa2aa3];end%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%3、余函数法求ar、sr、hrfunction[ar,sr,hr]=as(p,T)[v,Z,a,b,beta]=vv(p,T);R=8.31451;fori=1:3;sr(i)=-R*log((v(i)-b(i))/v(i))+beta(6、i)/(2*sqrt(2)*b(i))*log((v(i)-0.414*b(i))/(v(i)+2.414*b(i)))-R*log(v(i)/(R*T/p/10^6));ar(i)=R*T*log((v(i)-b(i))/v(i))-a(i)/(2*sqrt(2)*b(i))*log((v(i)-0.414*b(i))/(v(i)+2.414*b(i)))+R*T*log(v(i)/(R*T/p/10^6));hr(i)=ar(i)+T*sr(i)+R*T*(1-Z(i));endend%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%7、%%%%%%%%%%%%%%%%%%%%%4求绝对焓熵(以0℃饱和液体为标准)function[h,s]=hs(p,T)M1=44.096;M2=58.122;x1=(1/M1)/(1/M1+1/M2);x2=(1/M2)/(1/M1+1/M2);Mm=M1*x1+M2*x2;M=[M1M2Mm];ps=[0.0156960.329790.47446];T0=273.15;R=8.31451;c1=[-95.806.945-3.597*10^(-3)7.2
3、R^2*N1(2)^2/N1(3)/10^6;aa1=0.45724*R^2*N1(2)^2/N1(3)/10^6*2*sqrt(alpha1)*(-k1/(2*sqrt(N1(2)*T)));b1=0.07780*R*N1(2)/N1(3)/10^6;k2=0.37464+1.54226*N2(4)-0.26992*N2(4)^2;alpha2=(1+k2*(1-(T/N2(2))^0.5))^2;a2=0.45724*alpha2*R^2*N2(2)^2/N2(3)/10^6;aa2=0.45724*R^2*N2(2)^2/N2(3)/10^6*2*sqrt(alpha2)*(-
4、k2/(2*sqrt(N2(2)*T)));b2=0.07780*R*N2(2)/N2(3)/10^6;a3=0.25*a1+0.5*(1-0.01)*sqrt(a1*a2)+0.25*a2;aa3=0.25*aa1+0.5*(1-0.01)*1/2/sqrt(a1*a2)*(a1*aa2+a2*aa1)+0.25*aa2;b3=0.5*(b1+b2);a=[a1a2a3];b=[b1b2b3];beta=[aa1aa2aa3];fori=1:3;A(i)=a(i)*p*10^6/(R^2*T^2);B(i)=b(i)*p*10^6/(R*T);Z(i)=newton(A(i),B(
5、i),1);vv(i)=R*T*Z(i)/p/10^6;digits(5);v(i)=vpa(vv(i),5);i=i+1;enda=[a1a2a3];b=[b1b2b3];beta=[aa1aa2aa3];end%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%3、余函数法求ar、sr、hrfunction[ar,sr,hr]=as(p,T)[v,Z,a,b,beta]=vv(p,T);R=8.31451;fori=1:3;sr(i)=-R*log((v(i)-b(i))/v(i))+beta(
6、i)/(2*sqrt(2)*b(i))*log((v(i)-0.414*b(i))/(v(i)+2.414*b(i)))-R*log(v(i)/(R*T/p/10^6));ar(i)=R*T*log((v(i)-b(i))/v(i))-a(i)/(2*sqrt(2)*b(i))*log((v(i)-0.414*b(i))/(v(i)+2.414*b(i)))+R*T*log(v(i)/(R*T/p/10^6));hr(i)=ar(i)+T*sr(i)+R*T*(1-Z(i));endend%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7、%%%%%%%%%%%%%%%%%%%%%4求绝对焓熵(以0℃饱和液体为标准)function[h,s]=hs(p,T)M1=44.096;M2=58.122;x1=(1/M1)/(1/M1+1/M2);x2=(1/M2)/(1/M1+1/M2);Mm=M1*x1+M2*x2;M=[M1M2Mm];ps=[0.0156960.329790.47446];T0=273.15;R=8.31451;c1=[-95.806.945-3.597*10^(-3)7.2
此文档下载收益归作者所有