Tricky indeed. Here's another try to include Equilibrium effects:
Notation:
Suffix r for reactants (index j) and p for products (index i).
Choose any one reactant as denoted by suffix "ro"
ν denotes stoichiometric indices
First find ε based on given mass of one product
[tex]
\epsilon= \left ( \frac{m_P}{MW_P \cdot \nu_P}\right ) \\
[/tex]
Now solve this non-linear eqn. for the single variable n
r0[tex]
K_{eq}=\frac{1}{(n_{r0}-\nu_{r0} \cdot \epsilon)^{\nu_{r0}}} \cdot \prod_{products,i}(\nu_{P_i} \cdot \epsilon )^{\nu_{P_i}} \cdot \frac{1}{\prod_{reactants,j,j \not= r0} \left( \frac{\nu_{rj}}{\nu_{ro}} \cdot n_{r0} - \nu_{rj} \cdot \epsilon \right)^{\nu_{rj}}}
[/tex]
Finally get the mass of reactant
[tex]
m_{r0}=n_{r0} \cdot MW_{ro}
[/tex]
This should work when all reactants are fed in stoichiometric proportions. I dont think there's a way to account for excesses.
Darn the formatting; not sure if the equations are legible.