Species & Initial Amounts
| Species | Initial moles ni,0 |
|---|
Stoichiometry Matrix νi,r (negative for reactants, positive for products)
Example Data Table
This dataset demonstrates the water-gas shift and steam reforming system at 1000 K (illustrative K values).
| Species | ni,0 |
|---|---|
| CO | 1.0 |
| H2O | 1.5 |
| CO2 | 0.2 |
| H2 | 0.5 |
| CH4 | 0.6 |
| Reaction | Stoichiometry νi,r | K (dimensionless) |
|---|---|---|
| R1 | CO(−1), H2O(−1), CO2(+1), H2(+1) | 1.0 |
| R2 | CH4(−1), H2O(−1), CO(+1), H2(+3) | 0.01 |
Formulas Used
We assume ideal behavior (activities ≈ concentrations) and unity volume. For each reaction r with stoichiometric vector νi,r (negative for reactants, positive for products), the law of mass action at equilibrium is:
∏i ciνi,r = Kr
which we solve in log-form:
fr(ξ) = Σi νi,r ln(ni) − ln Kr = 0,
with reaction extents ξ so that
ni = ni,0 + Σr νi,r ξr.
The Jacobian used in Newton iterations is:
Jr,s = Σi νi,r νi,s / ni.
A backtracking line search ensures non-negativity of ni each step.
How to Use
- Enter the number of species and reactions, then fill species names and initial moles.
- Enter νi,r for each reaction: negative for reactants, positive for products.
- Provide dimensionless equilibrium constants K at the listed temperature (use authoritative data).
- Click Solve Equilibrium. Inspect equilibrium moles, reaction quotients Q, and residuals.
- Export results with Download CSV or Download PDF.
- Use the example to verify the workflow before applying your own system.
FAQs
1) Is this the original FastChem algorithm?
No. This tool is FastChem-inspired and uses a simplified law-of-mass-action solver with reaction extents and Newton iterations for instructional and quick-study use.
2) Does it handle activity coefficients?
No. It assumes ideal behavior (activities ≈ concentrations). For non-ideal systems, use proper thermodynamic models and activity coefficients.
3) What if residuals stay large?
Check stoichiometry signs, initial moles, and K values. Try different initial amounts or scale inputs to help conditioning.
4) Are units important?
Moles are used; volume is assumed unity so activities are proportional to moles. If using concentrations, keep the same reference when entering K.
5) Can species go negative during solve?
The solver uses a backtracking line search to keep all ni positive. If your inputs are extreme, the solve may fail; adjust inputs.
6) How accurate are results?
Accuracy depends on the validity of K at the specified temperature and the ideal assumptions. For research-grade work, use validated equilibrium codes and data.