PhÇn tÝnh LgKp theo 2pp PhÇn tÝnh theo Nerst procedure BT_lg_Kp; { Phan dung tinh lgKp } begin lg_Kp:= ((110280+6*1.987*298.16+1.987*(6*(4130/(exp(4130/298.16)-1)) + (3350/(exp(3350/298.16)-1)) - 2*(1357/(exp(1357/298.16)-1)) - 4*(2336/(exp(2336/298.16)-1)) - 2*(4176/(exp(4176/298.16)-1)) - 4*(4776/(exp(4776/298.16)-1)) - (3)*(801/(exp(801/298.16)- 1)) ) )/4.576)/T + (6/2.303)*ln(T) + (1/2.303)*( 6*(4130/T) - 6*(ln(exp(4130/T)-1)) + (3350/T) - (ln(exp(3350/T)-1)) - 2*(1357/T) + 2*(ln(exp(1357/T)-1)) - 4*(2336/T) + 4*(ln(exp(2336/T)-1)) - 2*(4176/T) + 2*(ln(exp(4176/T)- 1)) - 4*(4776/T) + 4*(ln(exp(4776/T)-1)) - (3)*(801/T) + (3)*(ln(exp(801/T)- 1))) - 3.629;end; PhÇn tÝnh theo Temkin { Dung chung cho phuong phap Temkin } function M0(x:real):real; begin M0:=ln(x/298.16)-1+298.16/x;end; function M1(x:real):real; begin M1:=x/2+sqr(298.16)/2/x-298.16;end; function M2(x:real):real; begin M2:=sqr(x)/6+(298.16*sqr(298.16))/x/3- sqr(298.16)/2;end; function M_2(x:real):real; begin M_2:=1/2/sqr(x)-1/298.16/x+1/sqr(298.16)/2;end; {---------------------------------------------------------------} procedure BT_lg_Kp; { Phan dung tinh lgKp } begin lg_Kp:= 110280/4.576/T+61.674/4.576+(1/4.576)*(M0(T)*3.68+M1(T)*(-4.14E- 03) +M_2(T)*(8.6E+04)); PhÇn tÝnh nhiÖt ®é theo 2pp Ph¬ng ph¸p Nerts procedure BT_lg_Kp; { Phan dung tinh lgKp } begin lg_Kp := -(9543.778 +1920/(exp(960/298.16)-1)+1830/(exp(1830/298.16)-1)) /(4.576*T)+(1/4.606)*ln(T) + (1.987/4.576)*(3355/T -ln(exp(3085/T)-1)-ln(exp(2290/T)-1)-ln(exp(5730/T)-1) -ln(exp(5510/T)-1)+ln(exp(6130/T)-1) + 2*ln(exp(960/T)-1) + ln(exp(1830/T)-1)+ln(exp(3380/T)-1)) + 0.85; end; delta:=5;T:=300;BT_lg_Kp; repeat tg:=lg_Kp;T:=T+delta;BT_lg_Kp; if (lg_Kp/tg)<0 then delta:=-delta/2; until abs(lg_Kp)<1.e-10; Ph¬ng ph¸p Temkin {---------------------------------------------------------------} { Dung chung cho phuong phap Tem kin } function M0(x:real):real; begin M0:=ln(x/298.16)-1+298.16/x;end; function M1(x:real):real; begin M1:=x/2+sqr(298.16)/2/x-298.16;end; function M2(x:real):real; begin M2:=sqr(x)/6+(298.16*sqr(298.16))/x/3- sqr(298.16)/2;end; function M_2(x:real):real; begin M_2:=1/2/sqr(x)-1/298.16/x+1/sqr(298.16)/2;end; {---------------------------------------------------------------} procedure BT_lg_Kp; { Phan dung tinh lgKp } begin lg_Kp:= -9840/4.576/T+10/4.576+(1/4.576)*(M0(T)*(-3)+M1(T)*(5.6E-04) + M_2(T)*(1.8E+05)); end; delta:=5;T:=300;BT_lg_Kp; repeat tg:=lg_Kp;T:=T+delta;BT_lg_Kp; if (lg_Kp/tg)<0 then delta:=-delta/2; until abs(lg_Kp)<1.e-10; PhÇn tÝnh c¬ häc thèng kª TÝnh tØ sè Function ham_a(x:extended):extended; var P, Q: extended; Begin P := 3*(3*exp(-2*Tq/x) + 7*exp(-12*Tq/x)); Q := 1 + 5*exp(-6*Tq/x) + 7*exp(-20*Tq/x); ham_a:= P- Q; End; T:=10; k:=1; a:=ham_a(T); While abs(a) >= eps do begin c:=a; t :=t+del_t/k; a:=ham_a(T); If a*c <0 then k:= k*(-2); end; T×m hscb lgKp cña pu theo phuong phap co hoc thong ke Function ham_lgKp(x:extended):extended; Var D1,Q1,Q2:extended; Begin D1:=(1-exp(-2290/x))*(1-exp(-5510/x))*(1-exp(-5730/x)); Q1:=4*(5 + 3*exp(-158.5*h*c/(k*x))+exp(-226.5*h*c/(k*x)))/ (1 + 3*exp(-30650*h*c/(k*x)) + 6*exp(-33800*h*c/(k*x))); lgKp1:=-1.1674 +(1/2.303)*ln(D1) +(7/4.606)*ln(x) +(1/2.303) *ln(Q1)-47936.6425/x; lgKp2:= 0.804867 + (1/2.303)*ln(1-exp(-6130/x)) +(3/4.606)*ln(x) -22566.13275/x; Q2:= sqr(5+3*exp(-158.5*h*c/(k*x))+exp(-226.5*h*c/(k*x))) /(3 + 2*exp(-7917.46*h*c/(k*x)) + exp(-13196.38*h*c/(k*x))); lgKp3:= 0.3864 +(1/2.303)*ln(1-exp(-2224/x))+(3/4.606)*ln(x) +(1/2.303)*ln(Q2) -(25780.4693/x); Ham_lgKp:=lgKp1-lgKp2-0.5*lgKp3; End; For i:= 0 to 26 do Begin T:= 400 +100*i; lgKp := ham_lgKp(T); Su dung thuat toan tim nghiem tinh nhiet do ma co Kp= cho pu …… …… Function ham_lgKp(x:extended):extended; Var D1,Q1,Q2:extended; Begin D1:=(1-exp(-2290/x))*(1-exp(-5510/x))*(1-exp(-5730/x)); Q1:=4*(5 + 3*exp(-158.5*h*c/(k*x))+exp(-226.5*h*c/(k*x)))/ (1 + 3*exp(-30650*h*c/(k*x)) + 6*exp(-33800*h*c/(k*x))); lgKp1:=-1.1674 +(1/2.303)*ln(D1) +(7/4.606)*ln(x) +(1/2.303) *ln(Q1)-47936.6425/x; lgKp2:= 0.8049 + (1/2.303)*ln(1-exp(-6130/x)) +(3/4.606)*ln(x) -22566.13275/x; Q2:= sqr(5+3*exp(-158.5*h*c/(k*x))+exp(-226.5*h*c/(k*x))) /(3 + 2*exp(-7917.46*h*c/(k*x)) + exp(-13196.38*h*c/(k*x))); lgKp3:= 0.3864 +(1/2.303)*ln(1-exp(-2224/x))+(3/4.606)*ln(x) +(1/2.303)*ln(Q2) -(25780.4693/x); Ham_lgKp:=lgKp1-lgKp2-0.5*lgKp3; End; Tm:=400; del_t:=5; repeat Tn:=Tim; Tm:=Tm + del_T; Tim := Ham_lgKp(Tm) + 10; if Tn*Tim < 0 then del_T:=del_T/(-2); until abs(Tim) <= 1e-15; HÖ c©n b»ng Su dung thuat toan Newton tim hscb cho CH4 o 2600K va 2000000Pa Const kCH4 = 1.3692e+12; kCH3 = 2.6194e+8; kCH2 = 3.5625e+4; kCH = 3.9193e+3; kC2H = 2.5913e-1; kC2H2 = 2.9128e+1; kC2H4 = 1.1299e+12; kC3 = 1.8172e-3; kC2 = 1.8917e-1; kH2 = 1.6203e+2; eps = 1e-10; P = 2000000; T = 2600; Var pHo,pCo,A,B,C,D,E,F,del_pH,del_pC,H,G,pH1,pC1,xH,xC,xCH4, xCH3,xCH2,xCH,xC2H,xC2H2,xC2H4,xC2,xC3,xH2 : extended; k:integer; fx:text; Function Ham_A(pH,pC:extended):extended; Begin Ham_A:=sqr(pH)*sqr(pH)*pC/kCH4+sqr(pH)*pH*pC/kCH3+sqr(pH)*pc/kCH2 +pH*pC/kCH+pH*sqr(pC)/kC2H+sqr(pH)*sqr(pC)/kC2H2 +sqr(pH)*sqr(pH)*sqr(pC)/kC2H4+sqr(pC)*pC/kc3 +sqr(pC)/kC2+sqr(pH)/kH2+pC+pH-P; end; Function Ham_B(pH,pC:extended):extended; Begin Ham_B:=sqr(pH)*sqr(pH)/kCH4+sqr(pH)*pH/kCH3+sqr(pH)/kCH2 +pH/kCH+2*pH*pC/kC2H+2*sqr(pH)*pC/kC2H2+2*sqr(pH) *sqr(pH)*pC/kC2H4+3*sqr(pC)/kC3+2*pC/kC2+1; end; Function Ham_C(pH,pC:extended):extended; Begin Ham_C:=4*sqr(pH)*pH*pC/kCH4+3*sqr(pH)*pC/kCH3+2*pH*pC/kCH2 +pC/kCH+sqr(pC)/kC2H+2*pH*sqr(pC)/kC2H2+4*sqr(pH)*pH *sqr(pC)/kC2H4+2*pH/kH2+1; end; Function Ham_D(pH,pC:extended):extended; Begin Ham_D:=0.25*pH+0.5*sqr(pH)/kH2-0.25*sqr(pH)*pH*pC/kCH3-0.5 *sqr(pH)*pC/kCH2-0.75*pH*pC/kCH-(7/4)*pH*sqr(pC)/kC2H -1.5*sqr(pH)*sqr(pC)/kC2H2-sqr(pH)*sqr(pH)*sqr(pC)/kC2H4 -3*sqr(pC)*pC/kC3-2*sqr(pC)/kC2-pC; end; Function Ham_E(pH,pC:extended):extended; Begin Ham_E:=0.25*sqr(pH)*pH/kCH3+0.5*sqr(pH)/kCH2+0.75*pH/kCH +3.5*pH*pC/kC2H+3*sqr(pH)*pC/kC2H2+2*sqr(pH)*sqr(pH) *pC/kCH2+4*pC/kC2+9*sqr(pC)/kC3+1; end; Function Ham_F(pH,pC:extended):extended; Begin Ham_F:=1/4+pH/kH2-0.75*sqr(pH)*pC/kCH3-pH*pC/kCH2-0.75 *pC/kCH-(7/4)*sqr(pC)/kC2H-3*sqr(pC)*pH/kC2H2-4*sqr(pC) *sqr(pH)*pH/kC2H4; end; pHo:=20;pCo:=3e-2;k:=0; Repeat k:=k-1; A:=Ham_A(pHo,pCo);B:=Ham_B(pHo,pCo);C:=Ham_C(pHo,pCo); D:=Ham_D(pHo,pCo);E:=Ham_E(pHo,pCo);F:=Ham_F(pHo,pCo); del_pH:= -(A*E+B*D)/(B*F+C*E); del_pC:= -(A+C*del_pH)/B; pH1:=del_pH+pHo; pC1:=del_pC+pCo; H:=abs(del_pH/pHo); G:=abs(del_pC/pCo); if pH1 < 0 then pHo:=0.001 else begin if pH1 <P then pHo:=pH1 else pHo:=P; end; if pC1 <0 then pCo:=0.001 else begin if pC1 <P then pCo:=pC1 else pCo:=P; end; until (H+G) < eps; Writeln(' SO LAN LAP LA k = ',k); xH:=pHo/p; xC:=pCo/p; xCH4:=xH*xH*xH*xH*xC*p*p*p*p/kCH4; xCH3:=xH*xH*xH*xC*p*p*p/kCH3; xCH2:=xH*xH*xC*p*p/kCH2; xcH:=xH*xC*p/kCH; xC2H:=xH*xC*xC*p*p/kC2H; xC2H2:=xH*xH*xC*xC*p*p*p/kC2H2; xC2H4:=xH*xH*xH*xH*xC*xC*p*p*p*p*p/kC2H4; xC2:=xC*xC*p/kC2; xC3:=xC*xC*xC*p*p/kC3; xH2:=xH*xH*p/kH2; Su dung thuat toan Newton c¶i tiÕn tim hscb cho CH4 o 2600K va 2000000Pa Const kCH4 = 1.3692e+12; kCH3 = 2.6194e+8; kCH2 = 3.5625e+4; kCH = 3.9193e+3; kC2H = 2.5913e-1; kC2H2 = 2.9128e+1; kC2H4 = 1.1299e+12; kC3 = 1.8172e-3; kC2 = 1.8917e-1; kH2 = 1.6203e+2; eps = 1e-10; P = 2000000; T = 2600; var tong1,tong,pH,pC,pC1,pH1,d_lnpH,d_lnpC,a,b,C,d,e,f,H,g,i, s,l,xC,xH,xCH4,xCH3,xCH2,xCH,xC2H,xC2H2,xC2H4, xH2,xC2,xC3, m,n,r0,r,delta,Cv,Cp,ks,z:extended; k:integer; f1:text; Function Q1(t1,t:extended):extended; begin q1:=4*8.314+(exp(t1/t)*sqr(t1/t))/(sqr(exp(t1/t)-1)); end; FunCtion Q2(t1,t:extended):extended; begin q2:=8.314+(exp(t1/t)*sqr(t1/t))/(sqr(exp(t1/t)-1)); end; FunCtion Ham_a(pC,pH:extended):extended; begin Ham_a:=pC*pC*pH*pH*pH*pH/kC2H4+pC*pH*pH*pH*pH/kCH4+pC*pH*pH*pH/kCH3 +pC*pH*pH/kCH2+pC*pH/kCH+pC*pC*pH/kC2H+pC*pC*pH*pH/kC2H2 +pC*pC/kC2+pC*pC*pC/kC3+pH*pH/kH2+pC+pH; end; FunCtion Ham_b(pC,pH:extended):extended; begin Ham_b:=2*pC*pC*pH*pH*pH*pH/kC2H4+pC*pH*pH*pH*pH/kCH4+pC*pH*pH*pH/kCH3 +pC*pH*pH/kCH2+pC*pH/kCH+2*pC*pC*pH/kC2H+2*pC*pC*pH*pH/kC2H2 +2*pC*pC/kC2+3*pC*pC*pC/kC3+pC; end; FunCtion Ham_C(pC,pH:extended):extended; begin Ham_C:=4*pC*pC*pH*pH*pH*pH/kC2H4+4*pC*pH*pH*pH*pH/kCH4+3*pC*pH*pH* pH/kCH3+2*pC*pH*pH/kCH2+pC*pH/kCH+pC*pC*pH/kC2H+2*pC*pC*pH *pH/kC2H2+2*pH*pH/kH2+pH; end; FunCtion Ham_d(pC,pH:extended):extended; begin Ham_d:=2*pC*pH*pH*pH*pH/kCH4+pC*pH*pH*pH/kCH3+2*pH*pH/kH2+pH; end; FunCtion Ham_e(pC,pH:extended):extended; begin Ham_e:=pC*pH/kCH+3*pC*pC*pH/kC2H+2*pC*pC*pH*pH/kC2H2+4*pC*pC/kC2+ 6*pC*pC*pC/kC3+2*pC; end; FunCtion Ham_f(pC,pH:extended):extended; begin Ham_f:=2*pC*pH*pH*pH*pH/kCH4+pC*pH*pH*pH/kCH3; end; FunCtion Ham_g(pC,pH:extended):extended; begin Ham_g:=pC*pH/kCH+6*pC*pC*pH/kC2H+4*pC*pC*pH*pH/kC2H2+8*pC*pC/kC2 +18*pC*pC*pC/kC3+2*pC; end; FunCtion Ham_H(pC,pH:extended):extended; begin Ham_H:=8*pC*pH*pH*pH*pH/kCH4+3*pC*pH*pH*pH/kCH3+4*pH*pH/kH2+pH; end; FunCtion Ham_i(pC,pH:extended):extended; begin Ham_i:=pC*pH/kCH+3*pC*pC*pH/kC2H+4*pC*pC*pH*pH/kC2H2; end; pH:=20;pC:=3e-02;k:=0; repeat k:=k+1; a:=Ham_a(pC,pH); b:=Ham_b(pC,pH); C:=Ham_C(pC,pH); d:=Ham_d(pC,pH); e:=Ham_e(pC,pH); f:=Ham_f(pC,pH); g:=Ham_g(pC,pH); H:=Ham_H(pC,pH); i:=Ham_i(pC,pH); d_lnpC:=(C*d*e*ln(d/e)-a*(H*e-i*d)*ln(a/p))/(b*(H*e-i*d)-C*(e*f-d*g)); d_lnpH:=-(a*ln(a/p)+b*d_lnpC)/C; pC1:=exp(ln(pC)+d_lnpC); pH1:=exp(ln(pH)+d_lnpH); s:=b*d_lnpC+C*d_lnpH; l:=(f/d-g/e)*d_lnpC+(H/d-i/e)*d_lnpH; if pH1<0 then pH:=0.001 else begin if pH1<p then pH:=pH1 else pH:=p; end; if pC1<0 then pC:=0.01 else begin if pC1<p then pC:=pC1 else pC:=p; end; until (abs(l)+abs(s))< eps;tong1:=abs(l)+abs(s); xH:=pH/p; xC:=pC/p; xCH4:=xC*xH*xH*xH*xH*p*p*p*p/kCH4; xCH3:=xC*xH*xH*xH*p*p*p/kCH3; xCH2:=xC*xH*xH*p*p/kCH2; xCH:=xC*xH*p/kCH; xC2H:=xC*xC*xH*p*p/kC2H; xC2H2:=xC*xC*xH*xH*p*p*p/kC2H2; xC2H4:=xC*xC*xH*xH*xH*xH*p*p*p*p*p/kC2H4; xC2:=xC*xC*p/kC2; xC3:=xC*xC*xC*p*p/kC3; xH2:=xH*xH*p/kH2; tong:=xH+xC+xCH4+xCH3+xCH2+xCH+xC2H+xC2H2+xC2H4+xC2+xC3+xH2; M:=16.043*xCH4+15.035*xCH3+14.027*xCH2+13.019*xCH+25.03*xC2H+ 26.038*xC2H2+28.054*xC2H4+24.022*xC2+36.033*xC3+2.016*xH2 +1.008*xH+12.011*xC; r0:=(m*273.15*p)/(1000*101300*0.0224*t); n:=1/(0.25*xH+0.75*xCH3+0.5*xCH2+0.25*xCH+0.25*xC2H+0.5*xC2H2 +xC2H4+0.5*xH2+xCH4); r:=8.314/m; delta:=1-(xC2H4/n); Cp:=(xCH4*(q1(4196.2,t)+2*q1(2206.5,t)+3*q1(4343.6,t) +3*q1(1878.9,t))+xCH3*(q1(4316.4,t)+q1(1438.8,t) +2*q1(4460.3,t)+2*q1(2374,t))+xCH2*(q1(4136.4,t) +q1(1582.7,t)+q1(4604.1,t))+xC2H4*(q1(1931.1,t) +q1(1478,t)+q1(4354.4,t)+q1(2334.6,t)+q1(4463.8,t) +q1(1778,t)+q1(1365.7,t)+q1(1357,t)+q1(4468.2,t) +q1(1165.9,t)+q1(4301.3,t)+q1(2076.9,t)) +xC3*(q1(1726.2,t)+2*q1(719.4,t)+q1(2834.4,t)) +xC2*q2(2670.3,t)+xH2*q2(6130,t)+xCH*q2(4127,t) +(xC+xH)*8.314*2.5)/m; Cv:=Cp-r; ks:=Cp/Cv; KET QUA TINH THANH PHAN HE HBr THEO PHUONG PHAP NEWTON for i:= 0 to 2 do Begin T:= 1800 + 600*i; khbr:=exp(-43622.5465/t)*2.5132*t*sqrt(t)*(1-exp(-4200/t)); kh2 :=exp(-51987.9215/t)*6.3618*t*sqrt(t)*(1-exp(-6130/t)); kbr2:=exp(-22865.6265/t)*24.3267*t*sqrt(t)*(1-exp(-461/t)); xh:=1; xbr:=0.01; Repeat k:=k+1; xhbr:=Po*xh*xbr/khbr; xh2 :=Po*sqr(xh)/kh2; xbr2:=Po*sqr(xbr)/kbr2; f1 :=xh+xh2+xhbr+xbr2+xbr-1; f1h :=(xh+2*xh2+xhbr)/xh; f1br:=(xhbr+2*xbr2+xbr)/xbr; f2 :=xh+2*xh2-xbr-2*xbr2; f2h :=(xh+2*2*xh2)/xh; f2br:=-(xbr+2*2*xbr2)/xbr; dxh :=(f1*f2br-f1br*f2)/(f1br*f2h-f1h*f2br); dxbr:=(f1h*f2-f1*f2h)/(f1br*f2h-f1h*f2br); xh :=xh+dxh; xbr :=xbr+dxbr; if xbr>1 then xbr:=1; if xbr<0 then xbr:=0.01; if xh >1 then xh :=1; if xh <0 then xh :=0.01; until abs(dxh/xh)+abs(dxbr/xbr)<eps; m:=79.916*xbr+1.008*xh+2.016*xh2+159.832*xbr2+80.924*xhbr; KET QUA TINH THANH PHAN HE HBr THEO PHUONG PHAP NEWTON CAI TIEN For i:=0 to 2 do Begin T:=1800 + 600*i; khbr:=exp(-43622.5465/t)*2.5132*t*sqrt(t)*(1-exp(-4200/t)); kh2 :=exp(-51987.9215/t)*6.3618*t*sqrt(t)*(1-exp(-6130/t)); kbr2:=exp(-22865.6265/t)*24.3267*t*sqrt(t)*(1-exp(-461/t)); xh:=1; xbr:=0.01; k:=0; repeat K:=k+1; xhbr:=Po*xh*xbr/khbr; xh2 :=Po*sqr(xh)/kh2; xbr2:=Po*sqr(xbr)/kbr2; f1 :=xh+xh2+xhbr+xbr2+xbr; f1h :=xh+2*xh2+xhbr; f1br:=xhbr+2*xbr2+xbr; f2 :=xh+2*xh2; f2h :=xh+2*2*xh2; f3 :=xbr+2*xbr2; f3br:=xbr+2*2*xbr2; dlnxh :=(-f1*f2*f3br*ln(f1)-f1br*f2*f3*ln(f2/f3))/(f1h*f2*f3br +f1br*f2h*f3); dlnxbr:=(f1h*f2*f3*ln(f2/f3)-f1*f2h*f3*ln(f1))/(f1h*f2*f3br +f1br*f2h*f3); xh :=exp(ln(xh)+dlnxh); xbr :=exp(ln(xbr)+dlnxbr); f4 :=f1br*dlnxbr+f1h*dlnxh; f5 :=f2h*f3*dlnxh-f2*f3br*dlnxbr; if xbr>1 then xbr:=1; if xh >1 then xh :=1; Until abs(f4)+abs(f5)<eps; m:=79.916*xbr+1.008*xh+2.016*xh2+159.832*xbr2+80.924*xhbr; Su dung thuat toan Newton de tinh nong do phan mol can bang cac cau tu he NH3 o ap suat P, va tai nhiet do T For i:= 0 to 3 do Begin T:= 1000+1000*i; If i>1 then T:= 500 + 1000*i; qdt :=8*(4+6*exp(-27664.4/t)+4*exp(-27675/t)); qdd :=(1-exp(-1357/t))*sqr((1-exp(-2336/t))) *(1-exp(-4176/t))*sqr((1-exp(-4776/t))); knh3 :=exp(-139308/t)*9154e-7*sqr(sqr(t))*sqr(t)*qdt*qdd; qdt :=16*sqr((4+6*exp(-27664.4/t)+4*exp(-27675/t))); qdd :=(1-exp(-4719/t))*(1-exp(-4783/t))*(1-exp(-2283/t))* sqr((1-exp(-1834/t)))*(1-exp(-1579/t))*(1-exp(-1122/t))* (1-exp(-504.5/t))*(1-exp(-4768/t))*(1-exp(-4819/t))* (1-exp(-2342/t))*(1-exp(-1366/t)); kn2h4:=exp(-204060.39/t)*267e3*sqr(sqr(sqr(t)))*sqr(t)*t*qdt*qdd; qdt :=4*(4+6*exp(-27664.4/t)+4*exp(-27675/t))/ (2+2*exp(-14751.08/t)); qdd :=(1-exp(-4863/t))*(1-exp(-2014/t))*(1-exp(-4949/t)); knh2 :=exp(-3965.3/t)*533e-4*t*sqrt(t)*qdt*qdd; qdt :=2*(4+6*exp(-27664.4/t)+4*exp(-27675/t))/ (3+2*exp(-12952/t)+exp(-25184/t)); knh :=exp(-41771.5/t)*540460*t*sqrt(t)*qdt*(1-exp(-4699.088/t)); qdt :=sqr((4+6*exp(-27664.4/t)+4*exp(-27675/t)))/ (1+3*exp(-72251.5/t)+6*exp(-85747.7/t)); kn2 :=exp(-113272/t)*2.7417*t*sqrt(t)*qdt*(1-exp(-3350/t)); kh2 :=exp(-51987.9215/t)*6.3618*t*sqrt(t)*(1-exp(-6130/t)); xn:=0.01; xh:=0.01; repeat xnh3 :=sqr(Po)*Po*xn*sqr(xh)*xh/knh3; xn2h4:=sqr(sqr(Po))*Po*sqr(xn)*sqr(sqr(xh))/kn2h4; xnh2 :=sqr(Po)*Po*xn*sqr(xh)/knh2; xnh :=Po*xn*xh/knh; xn2 :=Po*sqr(xn)/kn2; xh2 :=Po*sqr(xh)/kh2; f1 :=xnh3+xn2h4+xnh2+xnh+xn2+xh2+xn+xh-1; f1n:=(xnh3+2*xn2h4+xnh2+xnh+2*xn2+xn)/xn; f1h:=(3*xnh3+4*xn2h4+2*xnh2+xnh+2*xh2+xh)/xh; f2 :=2*xn2h4+xnh2+2*xnh+6*xn2+3*xn-2*xh2-xh; f2n:=(2*2*xn2h4+xnh2+2*xnh+2*6*xn2+3*xn)/xn; f2h:=(4*2*xn2h4+2*xnh2+2*xnh-2*2*xh2-xh)/xh; dxh :=(f1*f2n-f1n*f2)/(f1n*f2h-f1h*f2n); dxn:=(f1h*f2-f1*f2h)/(f1n*f2h-f1h*f2n); xn :=xn+dxn; xh :=xh+dxh; if xn>1 then xn:=1; if xn<0 then xn:=0.01; if xh>1 then xh:=1; if xh<0 then xh:=0.01; until abs(dxh/xh)+abs(dxn/xn)<eps; . PhÇn tÝnh LgKp theo 2pp PhÇn tÝnh theo Nerst procedure BT_lg_Kp; { Phan dung tinh lgKp } begin lg_Kp:= ((110280+6*1.987*298.16+1.987*(6*(4130/(exp(4130/298.16)-1)). {---------------------------------------------------------------} procedure BT_lg_Kp; { Phan dung tinh lgKp } begin lg_Kp:= 110280/4.576/T+61.674/4.576+(1/4.576)*(M0(T)*3.68+M1(T)*(-4.14E-