material-energy-balances
>- Compute simple component totals and reaction conversion / yield metrics for steady-state process calculations. Use when summing stream component amounts or sanity-checking reaction metrics. Don't use for full inlet/outlet balance residuals, degree-of-freedom analysis, dynamic / transient balances
- License 许可
- MIT
- 最近更新
- 2026-11-09
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- material-energy-balances
- risk
- low
- source
- https://github.com/jskherman/engg-skills
- license
- MIT
- version
- 1.0.0
- category
- chemical-engineering
- description
- >- Compute simple component totals and reaction conversion / yield metrics for steady-state process calculations. Use when summing stream component amounts or sanity-checking reaction metrics. Don't use for full inlet/outlet balance residuals, degree-of-freedom analysis, dynamic / transient balances
- imported_at
- 2026-09-20
- source_path
- skills/material-energy-balances/SKILL.md
- source_repository
- jskherman/engg-skills
- disable-model-invocation
- false
02 资源文件 2
- 参考文档references/workflow.md167 B
- 脚本scripts/balance_solver.py2.0 KB
03 SKILL.md 正文
Material and Energy Balances
Overview
Steady-state helper calculations:
- Component totals from one or more
NAME=amountentries. - Conversion and yield from supplied limiting-reactant and product amounts.
- JSON envelopes that make the basis and assumptions explicit.
Prerequisites
uvavailable.
When to Use
- Summing component amounts from a hand-built stream table.
- Sanity-checking a single stream or component set on a consistent basis.
- Computing rough conversion and yield metrics from known feed/reacted/product amounts.
Don't use for
- Transient (dynamic) balances; the math involves dC/dt and requires a state-space approach.
- Rigorous flowsheet convergence; use a simulator.
- Detailed equilibrium / reactor design; this skill is balance-only.
- Full node closure with separate inlet and outlet stream tables.
- Degree-of-freedom counting.
- Selectivity calculations; only conversion and yield are exposed by the CLI.
Utility Scripts
uv run scripts/balance_solver.py component-total --stream A=10 --stream B=5 --output /tmp/total.jsonuv run scripts/balance_solver.py reaction-metrics --feed-limiting 10 --reacted-limiting 8 --desired-product 7.2 --theoretical-product 8 --output /tmp/reaction.json
Procedure
- Identify the stream, component set, or reaction metric you need.
- Keep all values on a consistent molar or mass basis.
- For totals, pass each component amount as a repeated
--stream NAME=amount. - For conversion/yield, supply limiting-reactant feed, reacted amount, desired product amount, and theoretical product amount.
- Inspect the JSON assumptions before using the result in a larger balance.
Pitfalls
- Mixing mass and molar basis silently.
- Forgetting recycle streams.
- Reporting "conversion 97%" without naming the key reactant and the basis (per pass vs overall).
- Using yield where you mean selectivity (yield is mol product / mol reactant fed; selectivity is mol product / mol reactant reacted).
- Computing residuals only in absolute terms; relative residuals (residual / inlet) are usually more useful.
- Using mass balance closure to justify a doubtful instrument when energy balance also fails to close.
- Counting equations without subtracting redundant ones (a total-balance plus all-component balances over-counts).
- Not propagating measurement uncertainty when judging closure ("looks closed at 0.5%" might be within instrument noise).
Fallback Strategies
- If the residual is large but the data is suspect, suggest data reconciliation (Crowe's method or similar).
- For dynamic balances, surface that this skill does not cover them.
Verification
- Run the listed script with representative inputs and an
--outputfile when a deterministic calculation is available. - Confirm the JSON result contains
ok: true, expected units, and no unhandled warnings. - Check result magnitudes against the stated assumptions, references, and a hand calculation or known operating range before reporting them.
References
references/workflow.md— detailed checklist for a node closure.
Anti-Patterns
- Reporting a balance that does not close as if it does.
- Hiding the basis in the report.
- Using component balances to detect bias without ruling out leakage, recycle, or unmeasured purge.
04 同仓库更多 Skills
dei-assessment
Assess diversity, equity, and inclusion with metrics. TRIGGERS - Use when user needs help with dei-assessment related tasks.
dei-action-plan
Create DEI action plans with goals and initiatives. TRIGGERS - Use when user needs help with dei-action-plan related tasks.
culture-fit-assessment
Design culture add assessment processes. TRIGGERS - Use when user needs help with culture-fit-assessment related tasks.
cowork-to-code-bridge
Use an already-installed, independently verified cowork-to-code bridge to run narrowly approved actions on the user's own macOS, Linux, or WSL2 machine through a local file queue.
counter-offer-response
Draft counter-offer responses for retention. TRIGGERS - Use when user needs help with counter-offer-response related tasks.
continuous-feedback-system
Design continuous feedback systems. TRIGGERS - Use when user needs help with continuous-feedback-system related tasks.