neqsim-cpa-water-boundaries
Skill167 starsChanged 7 months agoApache-2.0View on GitHub
Calculate and explain liquid-water, ice and hydrate onset temperatures together with Statoil CPA and mixing rule 10. USE WHEN: water dew point with CPA, vannduggpunkt med CPA, frost/ice formation, hydrate comparison, inhibitors such as MEG or methanol, or oil/gas/water multiphase fluids.
In this repository140 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- analyze-convergenceSkill
- analyze-gibbs-convergenceSkill
- book-creationSkill
- design-flash-benchmarkSkill
- design-reactor-benchmarkSkill
- figure-discussionSkill
- generate-publication-figuresSkill
- journal-formattingSkill
- neqsim-acid-gas-treatingSkill
- neqsim-advanced-control-mpc-and-virtual-sensingSkill
- neqsim-agent-handoffSkill
- neqsim-agentic-process-optimizationSkill
- neqsim-api-patternsSkill
- neqsim-autonomous-investigationSkill
- neqsim-capability-mapSkill
- neqsim-capacity-and-utilization-analysisSkill
- neqsim-capacity-increase-screeningSkill
- neqsim-ccs-hydrogenSkill
- neqsim-code-healthSkill
- neqsim-code-hygieneSkill
- neqsim-code-reviewSkill
- neqsim-column-internals-and-rate-basedSkill
- neqsim-compressor-antisurge-recycleSkill
- neqsim-consequence-analysisSkill
- neqsim-continuous-task-improvementSkill
- neqsim-controllability-operabilitySkill
- neqsim-cooling-waterSkill
- neqsim-depressurization-mdmtSkill
- neqsim-distillation-designSkill
- neqsim-document-intelligence-extractionSkill
- neqsim-dynamic-equipment-implementationSkill
- neqsim-dynamic-simulationSkill
- neqsim-electrolyte-systemsSkill
- neqsim-emulsion-separationSkill
- neqsim-energy-systems-and-electrificationSkill
- neqsim-engineering-design-packageSkill
- neqsim-eos-regressionSkill
- neqsim-equipment-cost-estimationSkill
- neqsim-exploration-strategy-selectionSkill
- neqsim-field-developmentSkill
- neqsim-field-economicsSkill
- neqsim-firewater-deluge-designSkill
- neqsim-flow-accelerated-corrosionSkill
- neqsim-flow-assuranceSkill
- neqsim-flow-assurance-study-reportSkill
- neqsim-forward-separator-trainSkill
- neqsim-future-operation-studySkill
- neqsim-hazid-fmea-eta-ftaSkill
- neqsim-heat-integrationSkill
- neqsim-hydrogen-productionSkill
- neqsim-input-validationSkill
- neqsim-integrated-production-and-lifecycleSkill
- neqsim-in-writingSkill
- neqsim-java8-rulesSkill
- neqsim-jurisdiction-regulatory-basisSkill
- neqsim-literature-searchSkill
- neqsim-lng-liquefactionSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
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
- Very specific: line 29
Use SystemSrkCPAstatoil and numeric setMixingRule(10).
- Distinctive: line 44
Verify finite positive pressure and finite positive water content.
- Distinctive: line 82
Treat these as separate onset calculations.
- Distinctive: line 93
Use the tested setup and qualification guide.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
CPA water, ice and hydrate boundaries
For a request such as water dew point with CPA or vannduggpunkt med CPA, calculate and report all three boundaries by default, unless the user explicitly requests only one. Explain the phase reference and convergence status of each.
Choose the interface
For a new fluid defined by JSON, prefer the connected run_flow_assurance
capability with analysis: "waterPhaseBoundaries". Read its current schema and
use validateInput before invocation. Supply explicit pressure_bara,
temperature_C and a wet-basis components map. This analysis selects Statoil
CPA and mixing rule 10 by default; the tested example also states model: "CPA"
explicitly. Use only schema-defined fields for characterized oil fractions.
See the executed JSON example.
For an existing configured, tuned or characterized Java fluid, retain that object's full model basis and use the combined facade operation below. Do not reconstruct it from a simpler JSON component map that omits its characterization or tuned parameters.
Configure the actual fluid
- Use
SystemSrkCPAstatoiland numericsetMixingRule(10). For a new fluid, add every component before selecting the mixing rule. Use kelvin and absolute pressure in bara. - Retain the complete component inventory, oil characterization, tuned parameters and phase options of an existing configured CPA fluid. Do not rebuild characterized oil from component names, strip oil or inhibitors, or force its overall composition into a single gas phase.
- State the moisture basis. For wet-gas ppmv, use
y_water = ppmv * 1e-6and multiply normalized dry-gas fractions by1 - y_water. For an oil/gas/water fluid, retain its actual water inventory and inhibitor concentrations rather than replacing these with gas ppmv. - Include MEG, methanol and other supplied inhibitors in the fluid. State their
concentration and whether it is defined in the aqueous phase or in the whole
fluid. Enable
setMultiPhaseCheck(true)when the supplied system can contain oil, gas and aqueous liquid. Do not add free water to obtain a hydrate result. - Verify finite positive pressure and finite positive water content. The Java facade requires an already configured Statoil-CPA/rule-10 fluid; an unsupported model is an input problem, not permission for a silent conversion that loses characterization or tuning.
Calculate once and inspect every result
For an existing Java fluid, call
new ThermodynamicOperations(fluid).cpaWaterPhaseBoundaryTemperatures().
It returns WaterPhaseBoundaryResult and calculates on independent copies,
preserving the supplied fluid. Inspect getLiquidWater(), getIce() and
getHydrate() separately. For each boundary, retain getStatus(),
isConverged(), getTemperatureC(), getResidual(), getPhaseReference(),
getWaterActivity() and getDiagnostic().
Report failed or inapplicable boundaries explicitly. Do not turn NaN, an
unconverged iterate or a NOT_APPLICABLE result into a dew-point temperature.
In a multiphase input, the fixed-feed-gas liquid-water dew point may be
inapplicable; retain the reason while reporting the independently calculated
ice and hydrate boundaries.
For the MCP route, inspect top-level status first. For error, report the
error diagnostic and any retained partial data; do not assume a data object
exists. For success or partial, inspect the data.liquidWater, data.ice
and data.hydrate objects. Each contains
status, converged, temperature_C, residual, waterActivity,
phaseReference and diagnostic. Unavailable numerical values are JSON null.
A partial comparison is not an all-boundaries-converged result; explain every
failed or inapplicable boundary while retaining the usable results.
Explain the three temperatures
| Boundary | Physical meaning | Interpretation |
| Liquid water | Appearance of a water-rich liquid | Below freezing, this is an undercooled, metastable liquid reference |
| Ice | Equilibrium with pure ice Ih | Uses the existing fusion/heat-capacity approximation with an IAPWS-slope pressure correction; it is not the full IAPWS ice EOS |
| Hydrate | Equilibrium with a water/guest-gas clathrate | Uses the water activity and fluid-phase split of the actual inhibited or uninhibited fluid |
Treat these as separate onset calculations. The highest applicable equilibrium temperature is a candidate first boundary during cooling; after a phase forms, water and guest inventories change, so the other tabulated temperatures are not a sequential cooling trajectory. Equilibrium does not predict nucleation delay or hydrate growth rate.
Report composition, pressure, moisture/inhibitor bases, CPA model, rule 10, NeqSim version, phase references and per-boundary diagnostics. Compare with GERG-water only when requested and label its ISO ice/liquid reference separately; do not replace this CPA calculation with GERG-2008 or ISO 18453.
Use the tested setup and qualification guide. The gas-quality agent and thermo-fluid agent route these requests.
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.

