FORSCHUNGSZENTRUM JÜLICH GmbH Zentralinstitut für Angewandte Mathematik D-545 Jülich, Tel. (046) 6-640 Interner Bericht Calculation of Chemical Equilibrium Compositions Johannes Grotendorst, Jürgen Dornseiffer* KFA-ZAM-IB-9406 Februar 994 (Stand 08.06.94) (*) Institut für Angewandte Physikalische Chemie, Forschungszentrum Jülich This worksheet will be published in a collection of application on worksheets for the next Maple release.
Calculation of Chemical Equilibrium Compositions Johannes Grotendorst Central Institute for Applied Mathematics Research Centre Juelich D-545 Juelich Germany Juergen Dornseiffer Institute for Applied Physical Chemistry Research Centre Juelich D-545 Juelich Germany The catalytic reaction between steam and hydrocarbon into mixtures of hydrogen, carbon monoxide, carbon dioxide and methane forms the basic feedstock (synthesis gas) to produce ammonia, methanol and other chemicals. For reactor design and to find the most economic reaction conditions it is necessary to study theoretically the reaction behaviour with respect to the operating parameters. In the present thermodynamic study we examine the temperature dependence of chemical compositions at equilibrium. We consider the following simple system of steam reforming reactions:. The methane-steam equality CH4 + HO <-> CO + 3H. The water-gas shift CO + HO <-> CO + H To set up a practical computation model we formulate the equilibrium condition for each separate reaction in terms of the reaction extents xi[ and xi[. If ne[j is the number of moles of chemical species B[j (j..5) present at equilibrium and n[j is the initial number of moles of that species, then > ne[j n[j+sum(alpha[j,i*xi[i, i..); ne [ j n + [ j i α [, j i [ i holds, where alpha[i,j are the stoichiometric coefficients of species B[j in each of the equations (i) [O&W, 80. The matrix of stoichiometric coefficients for these molecular mass balance equations is given by
> with(linalg): alpha : matrix ([[-, 0, [-, -, [, -, [3,, [0, ); Warning: new definition for norm Warning: new definition for trace - 0 - - α : - 3 0 A feed mixture of n[ moles of methane with n[ moles of steam results in the following composition of the participating components at equilibrium: > xi : vector(): print(xi); n : vector(5): for k from 3 to 5 do n[k:0 print(n); ne : add(n, multiply (alpha, xi)); [ [ [ n n [ 0 0 0 ne : [ n - n - - - 3 + The equilibrium constants of the reactions in terms of the partial pressures > p : vector([p[ch4, P[HO, P[CO, P[H, P[CO); p : [ P P [ HO P [ CO P [ H P [ CO are calculated by > for i from to do eqn[i : K[i Product(p[j^alpha[j,i, j..5); print("); print(value(")); K 5 j [ K [ α [ j, p [ j 3 P CO P [ H P P [ HO
K 5 j [ K [ α [ j, p [ j P H P [ CO P [ HO P [ CO Now, if we insert the relation p[j x[j*p, where p[j denotes the partial pressure, P the total pressure and x[j the mole fraction of chemical component B[j, then we obtain > for j from to 5 do p[j : x[j * P j: j : for i from to do print(value(eqn[i)); P [ K [ 3 x 3 x [ 4 x x [ K [ x 4 x [ 5 x x [ 3 The individual mole fractions x[j are calculated by dividing ne[j by the total number of moles. Thus, the sum over the component index should yield unity. > nsum : sum(ne[j, j..5); x : map (y -> y/nsum, ne); Sum(x[j, j..5) simplify(sum(x[j, j..5)); x : n - % nsum : n + + [ n - - % n - % 3 [ + % % % : n + + [ n 5 j x j The equilibrium mixture defined by xi[ and xi[ must simultaneously satisfy the equilibrium condition for each reaction, i.e. we have to solve the following equations for the reaction extents simultaneously: [ 3
> for i from to do f[i : ln(value(rhs(eqn[i))) - ln(lhs(eqn[i))0; print("); ln P 3 ( - ) ( 3 + ) - ( n - [ ) ( ) ln ( [ ) n + + n ( n - - ) ( 3 + ) ln - ( - - ) ( ) ln( K [ ) - 0 n [ [ K 0 Before solving this system of nonlinear equations we determine the temperature dependence of the constants K[ and K[. To obtain an expression for the reaction enthalpy we apply Kirchhoff s law with a polynomial ansatz for the description of the molar heat capacity. We have > diff(h[p(t), T) sum(a[j*(s*t)^j, j0..6); expand(dsolve(", H[P(T))); assign("); H ( ) T [ P T A + + + + + + [ 0 A s T A s T A [ 3 s 3 T 3 A [ 4 s 4 T 4 A [ 5 s 5 T 5 A [ 6 s 6 T 6 H [ P ( T) A [ 0 T + A s T + A s T 3 + A 3 s 3 T 4 + A 4 s 4 T 5 + A 5 s 5 T 6 + A 6 s 6 T 7 + _C 7 [ 3 [ 4 [ 5 [ 6 [ Here, s (0^(-3)) denotes a scaling factor of the temperature T as used in thermochemical tables. Inserting the expression for H[P(T) into the equation of van t Hoff and then integrating yields > diff(lnk[p(t),t) H[P(T) /(R*T^); expand(dsolve(", lnk[p(t))); assign("); lnk ( ) [ P T 4 A [ 6 s 6 T 6 R lnk ( ) T [ P T H [ P R T ( T) A [ 5 s 5 T 5 A [ 4 s 4 T 4 A [ 3 s 3 T 3 + + + + 30 R 0 R R 6 A s T A [ 0 ln( T) _C + + - + _C R R R T A s T R 4
The coefficients A[j are determined by the corresponding coefficients of the pure substances in each reaction [Pro, 69. > U0:matrix([[a0[CH4, a0[ho, a0[co, a0[h, a0[co, [a[ch4, a[ho, a[co, a[h, a[co, [a[ch4, a[ho, a[co, a[h, a[co, [a3[ch4, a3[ho, a3[co, a3[h, a3[co, [a4[ch4, a4[ho, a4[co, a4[h, a4[co, [a5[ch4, a5[ho, a5[co, a5[h, a5[co, [a6[ch4, a6[ho, a6[co, a6[h, a6[co); a0 [ CH4 a0 [ HO a0 [ CO a0 [ H a0 [ CO a a [ HO a [ CO a [ H a [ CO a a [ HO a [ CO a [ H a [ CO U0 : a3 a3 [ HO a3 [ CO a3 [ H a3 [ CO a4 a4 [ HO a4 [ CO a4 [ H a4 [ CO a5 a5 [ HO a5 [ CO a5 [ H a5 [ CO a6 a6 [ HO a6 [ CO a6 [ H a6 [ CO > U:subs(a0[CH47.98404, a0[ho7.988860, a0[co7.849, a0[h6.8304, a0[co4.34933, a[ch4-.47, a[ho-.5067, a[co-6.66893, a[h4.70657, a[co0.80895, a[ch463.73457, a[ho6.66376, a[co7.896, a[h-0.935, a[co-.94590, a3[ch4-75.569, a3[ho-4.655970, a3[co-7.8709, a3[h.54086, a3[co6.84483, a4[ch443.969, a4[ho.696464, a4[co8.8605, a4[h-7.0663, a4[co-7.935665, a5[ch4-.5673, a5[ho-0.3706, a5[co-.3489, a5[h.93395, a5[co.67, a6[ch4.469695, a6[ho0.0399444, a6[co0.447785, a6[h-0.08409, a6[co-0.40873, eval(u0)); 7.98404 7.988860 7.849 6.8304 4.34933 -.47 -.5067-6.66893 4.70657 0.80895 63.73457 6.66376 7.896-0.935 -.94590 U : -75.569-4.655970-7.8709.54086 6.84483 43.969.696464 8.8605-7.0663-7.935665 -.5673 -.3706 -.3489.93395.67.469695.0399444.447785 -.08409 -.40873 5
> V:multiply(U,alpha); 0.454-5.9334 0.38769 33.6947-85.877036-57.8586 V : 00.48370 5.38750-57.7788-5.50857 6.393307 6.730507 -.8900684 -.73398334 The integration constants _C and _C can be calculated by using special values for K[ and K[ at the temperature T98.5 Kelvin [Bar, 93. Inserting the value for the gas constant R and taking into account the conversion factor F between the unit cal (used in Prothero s termochemical table [Pro, 69) and the SI unit Joule we eventually arrive at: > R:8.34: H[:0685: H[:-465: lnk[:-57.36: lnk[:.546: s:0^(-3): F:4.868: > for i from to do for k from 0 to 6 do A[k:F*V[k+, i od; solve({h[isubs(t98.5, H[P(T))},_C); print(op("));assign("); solve({lnk[isubs(t98.5,lnk[p(t))},_c); print(op("));assign("); ln(k[i)eval(lnk[p(t)); print(");assign("); _C: _C :_C: _C : _C 9793.6485 _C -0.9747954 ln( K ) -.664 0-9 T 6 +.758049 0-5 T 5 -.4396968 0 - T 4 +.406958900 0-8 T 3 -.707740 0-5 T +.005333975 T + 5.6456333 ln( T) - 3068.75734 T - 0.9747954 6
_C -39066.8 _C 8.848534 ln( K ) -.8800535667 0-0 T 6 +.9796 0-5 T 5 -.64844540 0 - T 4 +.5409453 0-8 T 3 -.48567998 0-5 T +.0084839800 T -.66553963 ln( T) + 4698.9885 + 8.848534 T Thus, the complete expressions for the reactions extents xi[ and xi[ are given by > f:lhs(f[); f:lhs(f[); f : ln f : ln P 3 ( - ) ( 3 + ) ( ) - ( ) + + n ( - - ) n [ n [ n [ +.664 0-9 T 6 -.758049 0-5 T 5 +.4396968 0 - T 4 -.406958900 0-8 T 3 +.707740 0-5 T -.005333975 T - 5.6456333 ln( T) + 3068.75734 T + 0.9747954 ( 3 + ) ( - - ) ( ) n [ +.8800535667 0-0 T 6 -.9796 0-5 T 5 - [ +.64844540 0 - T 4 -.5409453 0-8 T 3 +.48567998 0-5 T -.0084839800 T +.66553963 ln( T) - 4698.9885 T - 8.848534 Next, we assume P5 bar and a steam to carbon atom ratio HO : C :, i.e. > P:5; n[:; n[:; P : 5 n : [ n : [ Now, solving the nonlinear equations for xi[ and xi[ at different values of T (800..00 Kelvin) results in the following temperature dependence of the reaction extents and of the various mole fractions for steam, hydrogen, carbon monoxide, carbon dioxide, and methane. > for k from to do l[k:null for k from to 5 do l[k:null 7
> for j from 0 to 0 do T : 800 + j*0: fsolve({f, f}, {xi[, xi[}, {xi[0..., xi[0...0.3}); assign("); xit:map(eval, xi); for k from to do l[k : l[k, [T, xit[k; od; xt:map(eval, x); for k from to 5 do l[k : l[k, [T, xt[k; od; xi[: xi[ ; xi[: xi[ ; > with(plots): T: T : > pl:plot({seq([l[k, k..)}, T800..00): > t[:textplot([050, 0.88, xi[, alignabove): t[:textplot([950, 0.3, xi[, alignabove): t[3:textplot([030, -0.045, (Kelvin), alignbelow): > display({pl, seq(t[i, i..3)}); > pl:plot({seq([l[k, k..5), }, T800..00): > t[:textplot([930, 0.4, CH4, alignabove): t[:textplot([000, 0.5, HO, alignabove): t[3:textplot([040, 0.3, CO, alignabove): t[4:textplot([000, 0.555, H, alignabove): t[5:textplot([850, 0.08, CO, alignabove): t[6:textplot([000,.0, Sum of x[j, alignabove): t[7:textplot([800,.04, x[j, alignleft): t[8:textplot([030, -0.045, (Kelvin), alignbelow): 8
> display({pl, seq(t[i, i..8)}); References [O&W, 80 A. Ovenston and J.R. Walls, Chem. Engineering Sci. 35, 67-633, (980). [Pro, 69 A. Prothero, Comb. Flame. 3, 399-408, (969). [Bar, 93 I. Barin Thermochemical Data of Pure Substances, VCH Verlagsgesellschaft, Weinheim (993). 9