I have a problem understanding how to calculate the change/dependence of the concentrations at the chemical equilibrium using multiple reactions. The concentration of my reactants and products at chemical equilibrium are given.
E.g.: For a simple reaction like $\ce{C + O <=> CO}$ at chemical equilibrium with concentrations $\ce{10C}$, $\ce{5O}$ and $\ce{2CO}$, I calculate the equilibrium constant $K_{eq} = 2/(5*10) = 0.04$. Then I can use the ICE table and calculate $x$ to derive the concentration of $\ce{CO}$ at chemical equilibrium at various input concentrations for the reactants: e.g., for an input concentration of $\ce{22C}$ and $\ce{7O}$ (and $\ce{0CO}$) I get a concentration of about $\ce{3CO}$.
BUT how do I calculate the change of my products, if I have to consider multiple reactions with the same reactants involved? E.g., $\ce{C + O <=> CO}$ and $\ce{C + N <=> CN}$ again with given concentrations at chemical equilibrium of $\ce{10C}$, $\ce{5O}$, $\ce{30N}$, $\ce{2CO}$, and $\ce{8CN}$.
These two reactions are obviously coupled, so solving them independently is not possible (without proper decoupling). I'm also not sure if the equilibrium constant for the reactions can be determined. If I just 'ignore' one of the reactions at a time and calculate the equilibrium constant using the remaining concentrations, I would neglect the coupling which can have a strong effect, e.g., an increase in the input concentration of $\ce{C}$ may influence one reaction by ~90% and have almost no influence at the other (depending on a saturation effect).
I'm also not sure if it is NOT allowed to throw all products and reactants together and just consider them as a single reaction like $\ce{10C + 5O + 30N <=> 2CO + 8CN}$, calculate the equilibrium constant and apply my variation of input concentration like in the example above. How would I account for the case N=0 and CO != 0?!
I think that the only reliable approach would be an iterative calculation of the concentration until convergence is achieved. But I don't have a clue how to do this.
EDIT: I have found part of the solution myself. As I mentioned above, I have to use a system of coupled equation and solve it. So here are my thoughts about it. There has to be conservation of mass (or elements), so the following equations have to hold:
$\ce{C + CN + CO -} nC = 0$
$\ce{N + CN -} nN = 0$
$\ce{O + CO -} nO = 0$
where $nX$ represents the concentration of a certain species. Second, the equilibrium constants also need to be specified like the following:
$\ce{CO - K_1*C*O = 0}$
$\ce{CN - K_2*C*N = 0}$
Solving these coupled equations numerically is no problem. I did some testing and can confirm that at least the uncoupled case ($nN = 0$) leads to exact the same results as the method above. Extending this case to include multiple and more complicated reactions should not be a problem. The only remaining question is how to determine the equilibrium constants for these coupled equations?!
EDIT: I used the same approach to solve the following system of equations for the equilibrium constants:
$\ce{K_2*K_1 - \frac{CN}{(C*N)}*\frac{CO}{(C*O)} = 0}$
$\ce{K_2/K_1 - \frac{CN}{CO}*\frac{O}{C}} = 0$
I used the solution for these equilibrium constants, plugged them into the equations above and calculated the concentrations at equilibrium. The solutions are consistent. (Note: Got myself confused and interchanged $K_1$ with $K_2$ within my computations.)
Conclusion To calculate variations of the input concentrations at chemical equilibrium 2 major steps are needed.
1) Calculate the equilibrium constants $K_x$ for every reaction $x$ at given concentrations. Solve that system of $x$ equations (details in 2nd edit) with a numerical solver of your choice.
2) Adjust/variate the input abundance and use another system of $z$ equations (conversation of mass/element and reaction equations - details in 1st edit) to calculate the new concentrations at equilibrium.
Note: Make sure to always have $n$ equations for $n$ variables.