equation-of-state-selection
Skill7 starsChanged 6 months agoApache-2.0View on GitHub
Recommend an appropriate equation of state (or activity-coefficient model) for a stated fluid system, using the same kind of decision logic that DWSIM, Aspen HYSYS, Aspen Plus, and AVEVA PRO/II publish in their property-method selection guides. Use when starting a new flow-sheet or property calculation and you need a justified pick (PR vs SRK vs PRSV vs translated PR vs IAPWS vs activity coefficient vs CPA/SAFT). Don't use to actually run the flash (use vle-flash-calculations) or to do steam-table calculations (use steam-tables-iapws).
In this repository31 other files it gives its agents.
- absorption-stripping-designSkill
- bayesian-hierarchical-process-modelsSkill
- caustic-merox-extractionSkill
- censored-regressionSkill
- compositional-data-analysisSkill
- control-valve-sizing-isa75Skill
- convective-heat-transfer-correlationsSkill
- design-of-experimentsSkill
- dimensionless-numbersSkill
- distillation-shortcut-designSkill
- distributed-lag-modelsSkill
- engg-skills-commonSkill
- engineering-skill-creatorSkill
- engineering-statisticsSkill
- heat-exchanger-sizingSkill
- literature-search-engineeringSkill
- material-energy-balancesSkill
- pipe-flow-pressure-dropSkill
- process-causal-inference-dagsSkill
- process-units-conversionSkill
- reactor-sizing-and-kineticsSkill
- relief-valve-sizing-api520Skill
- separator-vessel-sizingSkill
- sour-gas-amine-treatingSkill
- statistical-process-controlSkill
- steam-tables-iapwsSkill
- thermo-process-propertiesSkill
- time-series-process-data-analysisSkill
- two-phase-flowSkill
- uvSkill
- vle-flash-calculationsSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 74
Run the recommender; it returns a primary pick and an alternative.
- Distinctive: line 106
If you cannot identify a clean class for the system, run two flashes with PR and SRK and compare against any available data.
- Distinctive: line 110
If components include known associating species (water, alcohols, organic acids), and a CPA or SAFT implementation is not available, fall …
- Very specific: line 116
Run the listed script with representative inputs and an --output file when a deterministic calculation is available.
- Distinctive: line 118
Check result magnitudes against the stated assumptions, references, and a hand calculation or known operating range before reporting them.
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Equation of State Selection
Overview
A structured decision tool that takes a component list and an application context (gas processing, refinery LPG, sour gas, amine sweetening, glycol dehydration, hydrocarbon polymerisation, steam utility, etc.) and returns:
- A primary EOS / property method recommendation.
- The Python backend (thermo class, chemicals correlation, or external).
- Rationale and the public-source basis for the recommendation.
- Specific caveats (binary interaction parameters, volume translation, validity range).
The logic is original and based on publicly available documentation from DWSIM, Carlson's Don't gamble with physical properties for simulations (CEP, 1996), and the Aspen / HYSYS / PRO/II training materials. No proprietary text, table, or default is reproduced.
Prerequisites
uvavailable on PATH.- On first use the script writes
LICENSE_NOTIFICATION.txtlisting the underlying library citations.
When to Use
- Starting a flow-sheet and the property method has not been chosen.
- The current method gives results that disagree with lab or plant data.
- A reviewer asks "why did you pick PR?" and you need a defensible answer.
Don't use for
- Running the actual flash — that is
vle-flash-calculations. - Steam tables — that is
steam-tables-iapws. - Tuning kij values (this skill recommends a family, not parameter values).
Utility Scripts
uv run scripts/select_eos.py --components propane,n-butane,h2s --application sour_lpg --pressure-pa 1200000 --output /tmp/select.jsonuv run scripts/select_eos.py --components methanol,water --application polar_low_pressure --pressure-pa 200000 --output /tmp/select_mw.jsonuv run scripts/select_eos.py --components dea,water,h2s,methane --application amine_sweetening --pressure-pa 5000000 --output /tmp/select_amine.json
Procedure
- Enumerate components with their real names. Note any polar, associating, electrolyte, or reactive species.
- State the application context: LPG storage, refinery off-gas, sour gas, amine, glycol, electrolyte, polymer, hydrate, supercritical extraction.
- Note the pressure and temperature range you care about (skip extremes only if you are sure the system stays away from them).
- Run the recommender; it returns a primary pick and an alternative. The alternative is the screening "second opinion" — run a flash with both and compare densities and K-values.
- Validate: against lab data, regressed VLE, or a trusted simulator. If the primary EOS misses, switch to the alternative and document the swap.
- Re-run the recommender whenever components, pressure regime, or application change materially.
Pitfalls
- Using PR for amine sweetening because it is the "default". Amine systems need rate-based reactive packages; cubic EOS is screening only.
- Using IAPWS for a water-containing hydrocarbon flash. IAPWS handles only pure water/steam; for water + hydrocarbon you need a method that handles immiscibility.
- Reaching for SRK as the "industry default". PR has the larger binary
parameter database in
thermo/chemicalsand is usually a better starting point for hydrocarbons. - Picking a cubic EOS for a system containing alcohols, organic acids, or
water. These associate; CPA (cubic-plus-association) or activity-coefficient
- Henry's law are usually better.
- Treating the result as final without doing the second-opinion flash.
- Picking a method without naming it in the final report; the property method is part of the calculation, not an implementation detail.
- Using one EOS for the whole flowsheet without re-validating at zones where the regime changes (e.g. compressor inlet vs cryogenic exchanger outlet).
- Ignoring the model validity envelope when integrating very far in T or P.
- Forgetting to revisit the choice when a new component is added that breaks the original system class (e.g. adding water to a hydrocarbon stream).
Fallback Strategies
- If you cannot identify a clean class for the system, run two flashes with PR and SRK and compare against any available data. If they disagree by more than 5% in liquid density or 10% in K-value, escalate to an experimental data check or a more advanced method.
- If components include known associating species (water, alcohols, organic acids), and a CPA or SAFT implementation is not available, fall back to Raoult + Antoine for low-pressure screening with a warning.
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/decision_matrix.md— full decision matrix.references/method_validity_ranges.md— published validity envelopes for PR / SRK / PRSV / PR-Translated.- DWSIM Property Package Selection: https://dwsim.org/wiki/index.php?title=Property_Package_Selection
- Carlson, E.C., "Don't gamble with physical properties for simulations," Chemical Engineering Progress, October 1996.
Anti-Patterns
- "Aspen uses PR-Peneloux by default, so it must be right."
- "We always use SRK at this site."
- "The simulator converged, so the method is fine."
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

