您好,欢迎访问三七文档
当前位置:首页 > 临时分类 > matlab的计算过程模板
题目:用MATLAB计算样品C17H15O2N3S2的焓H、熵S、吉布斯自由能G学生姓名:何建云学号:201020829院系:化工学院专业:制药工程年级:2010级1用MATLAB计算样品C17H15O2N3S2的焓H、熵S、吉布斯自由能G(化工学院制药工程何建云201020829)经过前期的热分析计算已经得出样品C17H15O2N3S2的比热Cp与温度T的关系式如下:Cp=2.9423-1.5318×10-2T-+2.9868×10-5T2。现在需要计算样品的焓、熵、吉布斯自由能,已知它们与比热的关系式:a(0),a(1),a(2)是从图上读出。Cp=a(0)+a(1)*T+a(2)*T2+a(3)*T3=a(0)T+a(1)*T2/2+a(2)*T2/3+a(3)*T3/4=a(0)log(T)+a(1)*T+a(2)*T2/2+a(3)*T3/3有基本积分公式:将Cp=2.9423-1.5318×10-2T+2.9868×10-5T2带入上述计算式子可得到:=2.9423.*(t-298.15)-0.007659.*(t.^2-298.15.^2)+0.000009956.*(t.^3-298.15.^3)=2.9423.*(log(t)-log(298.15))-0.015318.*(t-298.15)+0.0000140975.*(t.^2-298.15.^2)↑↑↑就代表自然对数ln代表t的平方用MATLAB软件计算样品的H,S,G;其中T以5K为间隔,从283K计算到353K。样品的相对分子质量为357。MATLAB计算过程如下:→↑↓↓下列红色部分代表需要输入或者重要的部2分。蓝色是说明文字。Togetstarted,selectMATLABHelporDemosfromtheHelpmenu.Theelementtypenamemustbeterminatedbythematchingend-tag/name.Couldnotparsethefile:d:\matlab7\toolbox\ccslink\ccslink\info.xmlt=283:5:353→→→→→→起点温度:间隔温度:终点温度。t=283288293298303308313318323328333338343348353h=2.9423.*(t-298.15)-0.007659.*(t.^2-298.15.^2)+0.000009956.*(t.^3-298.15.^3)h=Columns1through10-15.3578-10.3396-5.2744-0.15455.027410.278915.607521.020526.525432.1298Columns11through1537.841143.666749.614155.690861.9043a=h.*0.357←←←←←←注:0.357代表的是相对分子质量缩小1000倍;另外a就是最后所需要的焓值。a=Columns1through10-5.4827-3.6913-1.8830-0.05521.79483.66965.57197.50439.469611.4703Columns11through1513.509315.589017.712219.881622.0998s=2.9423.*(log(t)-log(298.15))-0.015318.*(t-298.15)+0.0000140975.*(t.^2-298.15.^2)s=Columns1through9-0.0455-0.0303-0.0153-0.00040.01430.02890.04350.05800.0725Columns10through150.08700.10150.11610.13070.14540.1602b=s.*0.357←←←←←←注:0.357代表的是相对分子质量缩小1000倍;另外b就是最后所需要的熵值。b=Columns1through9-0.0162-0.0108-0.0055-0.00020.00510.01030.01550.02070.0259Columns10through150.03110.03620.04140.04670.05190.0572c=a-t.*b←←←←←←注:0.357代表的是相对分子质量M缩小1000倍;3另外c就是最后所需要的吉布斯自由能值。c=Columns1through9-0.8865-0.5755-0.2828-0.00800.24930.48950.71280.91941.1097Columns10through151.28381.44171.58371.70971.81981.9140最后结果是:注:在录入数据时需要注意上面各项的单位:kJ/mol和J/mol;kJ/K·mol和J/K·mol;kJ/mol和J/mol。最好是写成乘积的形式:kJ/K·mol→→→kJ·K-1·mol-1。T(K)H(kJ/mol)S(kJ/K·mol)G(kJ/mol)283-5.4827-0.0162-0.8865288-3.6913-0.0108-0.5755293-1.8830-0.0055-0.2828298-0.05520.0002-0.00803031.79480.00510.24933083.66960.01030.48953135.57190.01550.71283187.50430.02070.91943239.46960.02591.109732811.47030.03111.283833313.50930.03621.441733815.58900.04141.583734317.71220.04671.709734819.88160.05191.819835322.09980.05721.9140
本文标题:matlab的计算过程模板
链接地址:https://www.777doc.com/doc-2882201 .html