资源预览内容
第1页 / 共16页
第2页 / 共16页
第3页 / 共16页
第4页 / 共16页
第5页 / 共16页
第6页 / 共16页
第7页 / 共16页
第8页 / 共16页
第9页 / 共16页
第10页 / 共16页
亲,该文档总共16页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述
1程序目的利用AGA8-92DC模型计算天然气的压缩因子,该程序主要应用于在输气和配气正常进行的压力P和温度T范围内的管输气的压缩因子计算2数学模型:AGA8-92DC模型2.1模型介绍此模型是已知气体详细的摩尔分数组成和相关压力、温度来计算气体压缩因子。输入变量包括绝对压力、热力学温度和摩尔组成。摩尔组成是以摩尔分数表示下列组分:CO2、N2、H2、CO、CH4、C2H6、C3H8、i-C4H10、n-C4H10、i-C5H12、n-C5H12、n-C6H14、n-C7H16、n-C8H18。2.2 模型适用条件绝对压力:0MPaP12MPa热力学温度:263KT338K高位发热量:30MJm-3HS45 MJm-3相对密度:0.55d0.80天然气中各组分的摩尔分数应在以下范围内:CH4:0.7xCH41.0N2:0xN20.20CO2:0xCO20.20C2H6:0xC2H60.10C3H8:0x C3H80.035C4H10:0x C4H100.015C5H12:0x C5H120.005C6H14:0x C6H140.001C7H16:0x C7H160.0005C8H18和更高碳数烃类:C8H18:0x C8H180.0005H2:0x H20.10CO:0x CO0.03如果已知体积分数组成,则应将其换算成摩尔分数组成。所有摩尔分数大于0.00005的组分都不可忽略。2.3 模型描述2.3.1 已知条件绝对压力P、热力学温度T、组分数N;各组分的摩尔分数Xi,i = 1N ;查附表1、2、3得到的以下数据:58种物质的状态方程参数an,bn, cn,kn,un,gn,qn,fn,sn,wn ;14种识别组分的特征参数Mi,Ei,Ki,Gi,Qi,Fi,Si,Wi ;14种识别组分的二元交互作用参数Eij*,Uij,Kij,Gij* 。2.3.2 待求量压缩因子 Z2.3.3 计算步骤a) 第二维利系数B的计算:二元参数Eij和Gij,由以下两式计算:b) 计算系数Cn*,n = 1358用以下方程求解混合方程,计算混合物参数U,G,Q。c) 计算混合物体积参数K;d) 计算对比密度摩尔密度为:式中,P为绝对压力,Mpa;R为摩尔气体常数;T为热力学温度,K。对比密度r同摩尔密度m相关:e) 利用AGA8-92DC方程,对压缩因子进行迭代计算迭代过程:给出Z0的初始值为1,先计算出m,将m、K和已知量带入AGA8-92DC方程方程,得到新的Z值,当(Z-Z0)的绝对值小于0.000001时,停止迭代,得到Z值。3 程序代码function Z = YSYZ( T,p,x)%计算天然气给定组分的压缩因子% x为天然气组分,按照CO2 N2 H2 CO CH4 C2H6 C3H8 i-C4H10 n-C4H10 i-C5H12 n-C5H12% n-C6H14 n-C7H16 n-C8H18的顺序输入%T 为温度,单位为K%P为压力,单位为兆帕N=14;R=8.314;%状态参数值b=1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,5,5,5,5,5,6,6,7,7,8,8,8,9,9;k=0,0,0,0,0,0,0,0,0,0,0,0,3,2,2,2,4,4,0,0,2,2,2,4,4,4,4,0,1,1,2,2,3,3,4,4,4,0,0,2,2,2,4,4,0,2,2,4,4,0,2,0,2,1,2,2,2,2;c=0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,0,1,1,1,1,0,1,0,1,1,1,1,1,1;g=0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,1,0,0;f=0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;q=0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,1,0,0,1,0,0,0,0,0,1;s=0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;w=0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;a=0.153832600,1.341953000,-2.998583000,-0.048312280,0.375796500,-1.589575000,. -0.053588470,0.886594630,-0.710237040,-1.471722000,1.321850350,-0.786659250,. 2.291290e-9,0.157672400,-0.436386400,-0.044081590,-0.003433888,0.032059050,. 0.024873550,0.073322790,-0.001600573,0.642470600,-0.416260100,-0.066899570,. 0.279179500,-0.696605100,-0.002860589,-0.008098836,3.150547000,0.007224479,. -0.705752900,0.534979200,-0.079314910,-1.418465000,-5.99905e-17,0.105840200,. 0.034317290,-0.007022847,0.024955870,0.042968180,0.746545300,-0.291961300,. 7.294616000,-9.936757000,-0.005399808,-0.243256700,0.049870160,0.033733797,. 1.874951000,0.002168144,-0.658716400,0.000205518,0.009776195,-0.020487080,. 0.015573220,0.006862415,-0.001226752,0.002850908;u=0.0,0.5,1.0,3.5,-0.5,4.5,0.5,7.5,9.5,6.0,12.0,12.5,-6.0,2.0,3.0,2.0,2.0,11.0,-0.5,. 0.5,0.0,4.0,6.0,21.0,23.0,22.0,-1.0,-0.5,7.0,-1.0,6.0,4.0,1.0,9.0,-13.0,21.0,8.0,. -0.5,0.0,2.0,7.0,9.0,22.0,23.0,1.0,9.0,3.0,8.0,23.0,1.5,5.0,-0.5,4.0,7.0,3.0,0.0,1.0,0.0;%特征参数值M=44.0100,28.0135,2.0159,28.0100,16.0430,30.0700,44.0970,58.1230,58.1230,72.1500,72.1500,86.1770,100.2024,114.2310;E=241.960600,99.737780,26.957940,105.534800,151.318300,244.166700,298.118300,324.068900,337.638900,365.599900,370.682300,402.636293,427.722630,450.325022;G=0.189065,0.027815,0.034369,0.038953,0.0,0.079300,0.141239,0.256692,0.281835,0.332267,0.366911,0.289731,0.337542,0.383381;Q=0.690,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0;K=0.4557489,0.4479153,0.3514916,0.4533894,0.4619255,0.5279209,0.5837490,0.6406937,0.6341423,0.6738577,0.6798307,0.7175118,0.7525189,0.7849550;F=zeros(N);S=zeros(N);W=zeros(N);F(3)=1;%交互作用参数值Ex=1.0,1.022740,1.281790,1.5,0.960644,0.925053,0.960237,0.906849,0.897362,0.726255,0.859764,0.855134,0.831229,0.808310;. 1.022740,1.0,1.086320,1.005710,0.971640,0.970120,0.945939,0.946914,0.973384,0.959340,0.945520,1.0,1.0,1.0;.1.281790,1.086320,1.0,1.1,1.170520,1.164460,1.034787,1.3,1.3,1.0,1.0,1.0,1.0,1.0;.1.5,1.005710,1.1,1.0,0.990126,1.0,1.0,1.0,1.0049,1.0,1.0,1.0,1.0,1.0;.0.960644,0.971640,1.170520,0.990126,1.0,1.0,0.994635,1.019530,0.989844,1.00235,0.999268,1.107274,0.88080,0.880973;.0.925053,0.970120,1.164460,1.0,1.0,1.0,1.022560,1.0,1.013060,1.0,1.005320,1.0,1.0,1.0;.0.960237,0.945939,1.034787,1.0,0.994635,1.022560,1.0,1.0,1.0049,1.0,1.0,1.0,1.0,1.0;.0.906849,0.946914,1.3,1.0,1.019530,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0;.0.897362,0.973384
网站客服QQ:2055934822
金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号