用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/equinor/neqsim --skill design-flash-benchmark命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Process modeling and flowsheet construction patterns for NeqSim. USE WHEN: building executable NeqSim process simulations, ProcessSystem flowsheets, or runnable process models with streams, separators, compressors, heat exchangers, valves, pumps, distillation columns, recycles, adjusters, topology checks, result extraction, and engineering validation.
Dynamic simulation guidance for NeqSim. USE WHEN: running transient simulations, modeling startup/shutdown, tuning PID controllers, analyzing pressure/level dynamics, performing blowdown/depressurization, or setting up measurement devices and control loops. Covers runTransient, DynamicProcessHelper, controller tuning, and dynamic equipment configuration.
Flow assurance analysis patterns for NeqSim. USE WHEN: predicting hydrate formation, wax appearance, asphaltene stability, CO2/H2S corrosion (NORSOK M-506, de Waard-Milliams, FeCO3 film), mineral scale (saturation index, scale kinetics, brine mixing / seawater incompatibility), scale/solids valve plugging & Cv/opening drift (ValveScaleDrift), scale/deposit remediation & dissolver/solvent/wash selection for cleaning fouled equipment (ScaleRemediationAdvisor), elemental sulfur (S8) deposition from oxygen ingress / H2S oxidation at pressure or temperature letdown (compressor inlets, valves, dry-gas seals, letdown stations), per-segment pipeline corrosion+scale profiles, inspected metal-loss screening, pipeline hydraulics, DNV-RP-F109 on-bottom stability screening, DNV-RP-F105 free-span screening, DNV-RP-F104 CO2-envelope screening, DNV-RP-F110 global-buckling response screening, DNV-RP-F114 pipe-soil screening, water/liquid hammer screening, slug flow, thermal analysis, or chemical inhibitor dosing. Covers all f
基于 SOC 职业分类
正在显示 SKILL.md
| name | design_flash_benchmark |
| description | Create a structured test matrix for comparing flash algorithm performance |
Create a structured test matrix for comparing flash algorithm performance across fluid types, thermodynamic conditions, and difficulty levels.
Choose from these standard families:
| Family | Components | Mole Fractions | Characteristics |
|---|---|---|---|
| Lean gas | CH4(0.90), C2(0.05), C3(0.03), N2(0.01), CO2(0.01) | Fixed or ±10% | Easy, mostly single-phase |
| Rich gas | CH4(0.70), C2(0.10), C3(0.08), nC4(0.05), nC5(0.03), N2(0.02), CO2(0.02) | Fixed or ±15% | Moderate, clear two-phase |
| Gas condensate | CH4(0.65), C2(0.08), C3(0.06), nC4(0.04), nC5(0.03), nC6(0.02), nC7(0.02), nC10(0.05), N2(0.02), CO2(0.03) | ±20% | Near-critical behavior |
| CO2-rich | CO2(0.80), CH4(0.10), N2(0.05), H2S(0.03), C2(0.02) | ±15% | Strong non-ideality |
| Wide-boiling | CH4(0.50), nC4(0.15), nC10(0.15), nC16(0.10), nC20(0.10) | ±20% | Large volatility range |
| Sour gas | CH4(0.60), CO2(0.15), H2S(0.10), C2(0.08), C3(0.05), N2(0.02) | ±15% | Acid gas behavior |
For each family, define the pressure-temperature sampling grid:
import numpy as np
def generate_pt_grid(T_min_K, T_max_K, P_min_bara, P_max_bara, n_T=20, n_P=20):
"""Generate a regular PT grid."""
T_values = np.linspace(T_min_K, T_max_K, n_T)
P_values = np.logspace(np.log10(P_min_bara), np.log10(P_max_bara), n_P)
cases = []
for T in T_values:
for P in P_values:
cases.append({"T_K": float(T), "P_bara": float(P)})
return cases
Standard ranges by family:
| Family | T range (K) | P range (bara) | Focus region |
|---|---|---|---|
| Lean gas | 200–400 | 1–200 | Dew point region |
| Rich gas | 220–450 | 5–300 | Two-phase dome |
| Gas condensate | 250–500 | 10–500 | Near cricondenbar |
| CO2-rich | 250–400 | 10–200 | CO2 critical region |
| Wide-boiling | 300–600 | 1–100 | Large T range |
Add cases specifically designed to challenge the algorithm:
Use Dirichlet sampling to generate composition variants:
from numpy.random import dirichlet
def perturb_composition(base_comp, n_variants=10, concentration=50):
"""Generate composition variants around a base composition.
Higher concentration = less perturbation.
"""
names = list(base_comp.keys())
alpha = np.array([base_comp[n] for n in names]) * concentration
variants = []
for _ in range(n_variants):
x = dirichlet(alpha)
variants.append(dict(zip(names, x.tolist())))
return variants
Every benchmark case must record:
| Metric | Type | Unit | How to Measure |
|---|---|---|---|
converged | bool | — | Did the flash converge? |
iterations | int | — | Total iterations (SS + NR) |
ss_iterations | int | — | Successive substitution iterations only |
nr_iterations | int | — | Newton-Raphson iterations only |
cpu_time_ms | float | ms | Wall-clock time (median of 3 runs) |
residual_norm | float | — | Final norm of equilibrium residuals |
stability_tested | bool | — | Was stability analysis triggered? |
stability_iters | int | — | TPD minimization iterations |
n_phases | int | — | Number of phases at equilibrium |
beta_vapor | float | — | Vapor phase fraction |
phase_id_correct | bool | — | Correct phase identification? |
Target: 500–2000 cases per algorithm version.
| Component | Cases |
|---|---|
| 6 families × 20 PT points | 120 base cases |
| 10 composition variants each | 1200 cases |
| 50 stress cases | 50 cases |
| Total | ~1250 cases |
Output benchmark_config.json:
{
"benchmark_id": "tpflash_2026_01",
"created": "2026-03-31",
"algorithms": ["baseline", "candidate_eigenvalue_switch"],
"eos_models": ["SRK"],
"timing_repeats": 3,
"families": [
{
"name": "lean_gas",
"base_composition": {"methane": 0.90, "ethane": 0.05, "propane": 0.03, "nitrogen": 0.01, "CO2": 0.01},