Calculting equilibrium composition of a mixture of gases - Exercise 16-89 from Çengel’s Thermodynamics book (7th ed)

Exercise from Çengel’s Thermodynamics
Author

Fábio P. Fortkamp

Published

March 17, 2022

This is exercise 16-89 from [1]: a mixture of 1 mol of H2O, 2 mols of O2 and 5 mols of N2 is heated up to 2200 K and 5 atm of pressure. The final composition will have the formation of H2 as well; what is the equilibrium composition, and is it reasonable to assume there will be no OH in the final composition?

I teach several classes on heat engines, steam generators and internal combustion engines, and for me the prime application of chemical thermodynamics and equilibrium composition is emissions. For a given combustion reaction, will pollutants such as NO and CO be formed? How much of them? The exercise explained above is a nice example of such calculations.

All calculations below assume all components are ideal gases.

First, we need to write the reaction:

H2O+2O2+5N2xH2O+yO2+zN2+wH2

where the unknowns x,y,v,w form a vector to be found with an appropriate system of equations. Since we have three elements (N,O,H), or equivalently (N2,O2,H2)), we can write three mass balances:

For hydrogen gas:

x+w1=0

For oxygen gas:

2.50.5xy=0

For nitrogen gas:

5z=0

(Do you have any doubts on why these equations are as such?)

One missing equation has to be determined from equilibrium considerations. Looking at tables of equilibrium constants, I posit that the free hydrogen gas is formed by dissociation:

H2OH2+12O2 whose equilibrium constant at 2200 K is lnKp=6.768.

The definition of equilibrium coefficient for this latter equation is [1]:

Kp=NH2νH2NO2νO2NH2OνH2O(PNtotal)νH2+νO2νH2O where the νi are the stoichiometric coefficients in the dissociation equation, the Ni are the real molar contents in the actual system where the dissociation occur, and P is the pressure in atm:

Kp=w1y0.5x1(5x+y+z+w)0.5

Take a minute and see if you can understand this equation. It took me almost an hour to properly understand it.

The vector of unknowns then is the solution of a 4-dimensional function, and this problem can be solved numerically with R:

library(rootSolve)
model <- function(a) c(F1 = 1-a[1] - a[4], 
                       F2 = 2.5-0.5*a[1]-a[2],
                       F3 = 5-a[3],
                       F4 = ((a[4]*a[2]**0.5)/(a[1])*(5/(sum(a)))^0.5) -exp(-6.768))

ss <- multiroot(f = model, start = c(1,1,1,1), positive=TRUE)
print(ss)
$root
[1] 0.998972571 2.000513714 5.000000000 0.001027429

$f.root
           F1            F2            F3            F4 
 1.692006e-15 -1.332268e-15  0.000000e+00  1.414678e-13 

$iter
[1] 4

$estim.precis
[1] 3.612301e-14

Keep in mind that I had to tweak this code until it worked. For instance, if you write the fourth equation in terms of logarithms, and not with exponentials as I did, you might have some numerical problems (try!). Also, the solution is sensitive to initial conditions; the final solution makes sense, as oxygen and nitrogen are practically preserved and some of the water vapor in fact dissociates.

As for the underlying assumption: will there be OH in the final composition? The equilibrium constant for H2OOH+12H2 at 2200 K is lnKp=7.148. The dissociation constants from water vapor to H2 and OH are very similar, and hence the reactions will occur in parallel, giving some amount of OH in the products, contrary to our assumptions. If you actually perform an experiment similar to this problem and encounter some errors in the final composition, this is a likely source of deviations.

The smaller the value of Kp, the harder is for the reaction to occur; you can see from the above equations that this coefficient is a measure of how much products form from the reactants. Hence, for similar Kp, the amount of H2 and OH formed will also be similar.

References

[1]: Çengel, Y. A., & Boles, M. A. Termodinâmica (7 ed.). Porto Alegre: AMGH, 2013.