# Equilibrium among chemical reactions

Consider a reaction $aA+bB \rightleftharpoons cC$, where $a$, $b$, and $c$ are molar coefficients of species $A$, $B$, and $C$, respectively.

We can consider an extent of reaction variable $\xi$ that varies from $0$ in reactants to $1$ in products. If we start with $A_0$, $B_0$, and $C_0$ moles of the three species, then the equilibrium moles of the species will be $$ \begin{align*} & A = A_0 - aA_0\xi, \newline & B = B_0 - bB_0\xi, \newline & C = C_0 + cC_0\xi. \newline \end{align*} $$

The total moles are $A+B+C$, and the mole fractions are $x_A = A/(A+B+C)$, and similarly for $B$ and $C.$ This gives equations for mole fractions in terms of known initial amounts and $\xi$,

$$ \begin{align*} & x_A = (A_0 - aA_0\xi)/n_t, \newline & x_B = (B_0 - bB_0\xi)/n_t, \newline & x_C = (C_0 + cC_0\xi)/n_t, \newline & n_t = (A_0+B_0+C_0-aA_0-bB_0+cC_0). \end{align*} $$

Now, for ideal gases the equilibrium composition is computed using the equilibrium constante $K_{eq}$:

$$K_{eq} = \frac{(P_C/P_o)^c}{(P_A/P_o)^a(P_B/P_o)^b},$$

where $P_0$ is the reference pressure (e.g., 1 atm). Partial pressures like $P_A$ are given by $P_A=x_AP$, where $P$ is the total gas pressure, in the same units as $P_o$. Then $K_{eq}$ can be written in terms of the known $P$, $P_o$, initial moles $A_0$, $B_0$, $C_0$, and the unknown $\xi$. If $K_{eq}$ is known, we can solve for $\xi$, which then gives the compositions $x_A$, $x_B$, $x_C$. The value of $K_{eq}$ is given by the relation

$$K_{eq} = e^{-\Delta G^o/RT},$$

where $R$ is the gas constant (8314.46 J/kmol$\cdot$K), $T$ is temperature, and $\Delta G^o$ is the Gibbs energy of reaction evaluated at the reference pressure $P_o$:

$$\Delta G^o = (cG_C^o) - (aG_A^o - bG_B^o).$$

In general $G = H-TS$, so $G^o_A = H^o_A - TS_A^o$, and similarly for species $B$ and $C$. $H$ and $S$ for each species are functions of temperature and given by polynomial expressions, from which $G$ is computed.

Note that $K_{eq}$ is a function of temperature, but not a function of pressure, even though the first expression for $K_eq$ above has partial pressures in it. (In effect, if pressure changes, the mole fractions of the species change to compensate. So, while $K_{eq}$ is not a function of pressure, the equilibrium composition is, but only if there is a change of moles from reactants to products.)

## Summary

- At a given $T$ and $P$, compute $\Delta G^o$, and then compute $K_{eq}=e^{-\Delta G^o/RT}$.
- Then insert $x_A=(A_0-aA_0\xi)/n_t$, etc. into $K_{eq}=(P_C/P_o)^c/[(P_A/P_o)^a(P_B/P_o)^b]$, with $P_i=x_iP$, which gives an expression for $K_{eq}$ in terms of $\xi$.
- Solve for $\xi$.
- Then recover the mole fractions from $\xi$.

## Two chemical reactions

If we we have two reactions, say,

$$\begin{align*} aA + bB &\rightleftharpoons cC, \newline c_2C &\rightleftharpoons dD, \end{align*}$$

then we would have two extents of reaction: $\xi_1$ and $\xi_2$, and the moles would be given by: $$ \begin{align*} & A = A_0 - aA_0\xi_1, \newline & B = B_0 - bB_0\xi_1, \newline & C = C_0 + cC_0\xi_1 - c_2C_0\xi_2, \newline & D = D_0 + dD_0\xi_2. \end{align*} $$

Mole fractions would be defined as above, and we would have two equilibrium constants $K_{eq,1}$ and $K_{eq,2}$, which would each depend on both $\xi_1$, and $\xi_2$. $K_{eq,1}$ in terms of the species partial pressures would be as above, and we would have $K_{eq,2} = (P_D/P_o)^d/(P_C/P_o)^{c_2}$. This gives two equations in two unknowns $\xi_1$ and $\xi_2$, which, when solved, can then be used to find the mole fractions $x_i$.

Additional reactions can be treated similiarly, and quickly increases the complexity of the system.