用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/equinor/neqsim --skill write-methods-section命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 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 | write_methods_section |
| description | Draft a publication-quality Methods section for a computational thermodynamics |
Draft a publication-quality Methods section for a computational thermodynamics paper. Includes mathematical notation, algorithm pseudocode, and benchmark design description.
A good Methods section for a flash algorithm paper has these subsections:
State the phase equilibrium conditions:
## 2. Methods
### 2.1 Phase Equilibrium Conditions
At thermodynamic equilibrium, the fugacity of each component $i$ must be equal
across all phases:
$$f_i^V(T, P, \mathbf{y}) = f_i^L(T, P, \mathbf{x}) \quad \forall i = 1, \ldots, N_c$$
where $f_i^V$ and $f_i^L$ are the fugacities of component $i$ in the vapor and
liquid phases, $\mathbf{y}$ and $\mathbf{x}$ are the vapor and liquid mole
fraction vectors, and $N_c$ is the number of components.
The equilibrium ratio (K-value) is defined as:
$$K_i = \frac{y_i}{x_i} = \frac{\hat{\phi}_i^L(T, P, \mathbf{x})}{\hat{\phi}_i^V(T, P, \mathbf{y})}$$
where $\hat{\phi}_i$ denotes the fugacity coefficient.
Describe the EOS used:
### 2.2 Equation of State
Calculations in this work use the Soave-Redlich-Kwong (SRK) equation of state
\cite{Soave1972}:
$$P = \frac{RT}{V - b} - \frac{a(T)}{V(V + b)}$$
with classical van der Waals mixing rules:
$$a = \sum_i \sum_j x_i x_j (a_i a_j)^{1/2} (1 - k_{ij})$$
$$b = \sum_i x_i b_i$$
where $k_{ij}$ are binary interaction parameters.
Describe the algorithm being compared against:
### 2.3 Baseline TP Flash Algorithm
The baseline implementation follows the classical two-stage approach
\cite{Michelsen1982a, Michelsen1982b}:
**Stage 1: Successive Substitution (SS)**
Starting from Wilson K-value estimates:
$$K_i^{(0)} = \frac{P_{c,i}}{P} \exp\left[5.373(1 + \omega_i)\left(1 - \frac{T_{c,i}}{T}\right)\right]$$
the phase fraction $\beta$ is obtained from the Rachford-Rice equation:
$$g(\beta) = \sum_{i=1}^{N_c} \frac{z_i(K_i - 1)}{1 + \beta(K_i - 1)} = 0$$
K-values are updated by:
$$K_i^{(n+1)} = K_i^{(n)} \frac{\hat{\phi}_i^L(\mathbf{x}^{(n)})}{\hat{\phi}_i^V(\mathbf{y}^{(n)})}$$
This is repeated until convergence or a maximum of $N_{SS}$ iterations.
**Stage 2: Newton-Raphson (NR)**
If SS has not converged, the algorithm switches to Newton-Raphson using
Michelsen's u-variable formulation \cite{Michelsen1982b}:
$$u_i = \beta \cdot y_i$$
The residual vector is:
$$r_i = \ln \hat{\phi}_i^V(\mathbf{y}) - \ln \hat{\phi}_i^L(\mathbf{x})$$
and the Jacobian:
$$J_{ij} = \frac{\partial r_i}{\partial u_j}$$
The update is:
$$\mathbf{u}^{(n+1)} = \mathbf{u}^{(n)} - \alpha \mathbf{J}^{-1} \mathbf{r}$$
where $\alpha$ is a line search parameter (Armijo backtracking).
Describe YOUR change clearly:
### 2.4 Proposed Modification: [Name]
We propose modifying the [specific aspect] of the baseline algorithm.
[Describe the mathematical basis]
[Show the modified equations]
[Explain why this should improve convergence]
**Pseudocode:**
\begin{algorithm}
\caption{Modified TP Flash with [Name]}
\begin{algorithmic}
\STATE Initialize K-values using Wilson correlation
\FOR{$n = 1$ to $N_{max}$}
\STATE Solve Rachford-Rice for $\beta$
\STATE Compute $\mathbf{x}, \mathbf{y}$ from K-values and $\beta$
\STATE Evaluate fugacity coefficients
\STATE Update K-values via SS
\IF{[switching criterion met]}
\STATE Switch to Newton-Raphson
\ENDIF
\IF{$\|\mathbf{r}\| < \epsilon$}
\STATE \RETURN converged
\ENDIF
\ENDFOR
\end{algorithmic}
\end{algorithm}
### 2.5 Phase Stability Analysis
Phase stability is verified using the tangent plane distance (TPD) criterion
\cite{Michelsen1982a}:
$$\text{TPD}(\mathbf{w}) = \sum_{i=1}^{N_c} w_i \left[\ln w_i + \ln \hat{\phi}_i(\mathbf{w}) - \ln z_i - \ln \hat{\phi}_i(\mathbf{z})\right]$$
A phase is unstable (and will split) if $\text{TPD} < 0$ for any trial
composition $\mathbf{w}$.
### 2.6 Benchmark Design
To evaluate the proposed modification, we construct a systematic benchmark
covering [N] test cases across [M] fluid families (Table 1).
**Table 1: Fluid families and their characteristics**
| Family | Components | N_c | Characteristics |
|--------|-----------|-----|-----------------|
| ... | ... | ... | ... |
Compositions are generated using Dirichlet sampling around base compositions
with concentration parameter $\alpha = 50$, ensuring realistic variation while
maintaining family character.
The pressure-temperature space is sampled using a logarithmic grid in pressure
([P_min]–[P_max] bara) and linear grid in temperature ([T_min]–[T_max] K),
with additional stress cases near phase boundaries and the critical region.
### 2.7 Implementation
All calculations are performed using NeqSim \cite{neqsim2024}, an open-source
Java library for thermodynamic and process simulation. The baseline and
modified algorithms are implemented in the `TPflash` class of NeqSim version
[version] (commit [hash]).
Timing measurements use `System.nanoTime()` with a warm-up phase of 10
flashes, followed by 3 timed repetitions per case. The median wall-clock time
is reported to minimize sensitivity to JIT compilation and garbage collection.
All experiments were run on [hardware description] with OpenJDK [version].
Use consistent notation throughout:
| Symbol | Meaning |
|---|---|
| $N_c$ | Number of components |
| $z_i$ | Feed composition (mole fraction) |
| $x_i$ | Liquid composition |
| $y_i$ | Vapor composition |
| $K_i$ | Equilibrium ratio |
| $\beta$ | Vapor phase fraction |
| $\hat{\phi}_i$ | Fugacity coefficient |
| $T$ | Temperature (K) |
| $P$ | Pressure (Pa or bara) |
| $R$ | Universal gas constant |
| $\omega_i$ | Acentric factor |
\mathbf{x} for vectors\hat{\phi} for fugacity coefficients\ln not log for natural logarithm\text{TPD} not TPD in math modeAfter drafting the Methods section, run the prose quality tool:
python paperflow.py check-prose papers/<paper_slug>/
The Methods section often has the highest Flesch-Kincaid grade due to technical terminology, which is expected. Focus on: