PSV Orifice Screening
Use this skill for public, educational pressure-safety-valve (PSV) orifice screening. It estimates the required effective orifice area for critical gas flow using the open API 520 Part I equation and maps it to a standard API letter designation so an agent can scope a relief study before detailed sizing.
When to Use
- When a user asks roughly what PSV orifice letter a gas relief case needs.
- When an agent needs a quick relief-area triage before detailed API 520 sizing.
- When examples must run without confidential valve data, vendor capacity charts, or company relief specs.
Inputs
relief_rate: required relief mass flow W in kg/h.
relieving_pressure: upstream relieving pressure P1 in bar absolute.
temperature: relieving temperature T in kelvin.
compressibility: gas compressibility factor Z, default 1.0.
molecular_weight: gas molecular weight M in g/mol.
specific_heat_ratio: ratio of specific heats k, default 1.3.
discharge_coefficient: effective discharge coefficient Kd, default 0.975.
back_pressure_correction: back-pressure correction Kb, default 1.0.
combination_correction: rupture-disk combination correction Kc, default 1.0.
Outputs
coefficient_c: the C coefficient from k.
required_area_mm2: required effective orifice area.
selected_orifice: the smallest standard API orifice that meets the area, or none.
selected_orifice_area_mm2: the area of the selected orifice.
area_margin_ratio: ratio of selected area to required area.
psv_warning: ok, watch, or oversize-needed.
assumptions: public assumptions used by the placeholder model.
Engineering Method
The Python class PsvOrificeModel uses the open API 520 Part I critical gas-flow equation only:
- the coefficient uses
C = 0.03948 * sqrt(k (2 / (k + 1))^((k + 1) / (k - 1))) in SI-consistent screening form.
- the required area uses
A = (W / (C Kd P1 Kb Kc)) * sqrt(T Z / M).
- the area is mapped to the standard API 526 orifice letters (D through T) using their published effective areas.
- the warning is a simple rule-based label aligned with API 520 intent.
This is educational and screening-only logic. It assumes critical (choked) gas flow and does not check the choked-flow criterion, subcritical flow, liquid or two-phase relief, fire-case sizing, inlet or outlet pressure-drop limits, or vendor certified capacities. It is not a replacement for validated relief-valve sizing and a qualified safety review.
Python Usage Pattern
from psv_orifice_screening import PsvOrificeModel
model = PsvOrificeModel()
result = model.evaluate(
relief_rate=50000.0,
relieving_pressure=20.0,
temperature=323.15,
molecular_weight=19.0,
)
print(result.selected_orifice)
print(result.required_area_mm2)
print(result.psv_warning)
Related NeqSim Functionality
For validated PSV sizing, redirect to existing NeqSim classes:
neqsim.process.util.fire.ReliefValveSizing — API 520 gas, liquid, and two-phase relief sizing including fire case.
neqsim.process.equipment.valve.SafetyValve — safety-valve equipment model for process simulations.
This skill is a public API 520 triage layer that decides when to invoke those validated relief classes.
Validation Checklist
Common Mistakes
| Symptom |
Cause |
Fix |
| Orifice too small |
Choked-flow assumption invalid at low overpressure |
Check the critical-flow criterion and use subcritical sizing if needed |
| Area off by orders of magnitude |
Mixed mass and molar units |
Keep W in kg/h and M in g/mol consistently |
| Fire case under-sized |
Fire-case heat input not included |
Use the API 521 fire-case relief rate as input |
Limitations
- No proprietary valve data, vendor capacity charts, or company relief specs are included.
- No liquid, two-phase, or fire-case sizing logic is performed.
- No inlet or outlet pressure-drop or certified-capacity checks are included.
References
1---2name: neqsim-psv-orifice-screening3description: Educational pressure-safety-valve orifice screening using the public API 520 Part I critical gas-flow equation. USE WHEN: a task needs a public, screening-level required PSV orifice area and a mapped API orifice letter before detailed relief-valve sizing and selection.4---56# PSV Orifice Screening78Use this skill for public, educational pressure-safety-valve (PSV) orifice screening. It estimates the required effective orifice area for critical gas flow using the open API 520 Part I equation and maps it to a standard API letter designation so an agent can scope a relief study before detailed sizing.910## When to Use1112- When a user asks roughly what PSV orifice letter a gas relief case needs.13- When an agent needs a quick relief-area triage before detailed API 520 sizing.14- When examples must run without confidential valve data, vendor capacity charts, or company relief specs.1516## Inputs1718- `relief_rate`: required relief mass flow `W` in kg/h.19- `relieving_pressure`: upstream relieving pressure `P1` in bar absolute.20- `temperature`: relieving temperature `T` in kelvin.21- `compressibility`: gas compressibility factor `Z`, default 1.0.22- `molecular_weight`: gas molecular weight `M` in g/mol.23- `specific_heat_ratio`: ratio of specific heats `k`, default 1.3.24- `discharge_coefficient`: effective discharge coefficient `Kd`, default 0.975.25- `back_pressure_correction`: back-pressure correction `Kb`, default 1.0.26- `combination_correction`: rupture-disk combination correction `Kc`, default 1.0.2728## Outputs2930- `coefficient_c`: the `C` coefficient from `k`.31- `required_area_mm2`: required effective orifice area.32- `selected_orifice`: the smallest standard API orifice that meets the area, or `none`.33- `selected_orifice_area_mm2`: the area of the selected orifice.34- `area_margin_ratio`: ratio of selected area to required area.35- `psv_warning`: `ok`, `watch`, or `oversize-needed`.36- `assumptions`: public assumptions used by the placeholder model.3738## Engineering Method3940The Python class `PsvOrificeModel` uses the open API 520 Part I critical gas-flow equation only:4142- the coefficient uses `C = 0.03948 * sqrt(k (2 / (k + 1))^((k + 1) / (k - 1)))` in SI-consistent screening form.43- the required area uses `A = (W / (C Kd P1 Kb Kc)) * sqrt(T Z / M)`.44- the area is mapped to the standard API 526 orifice letters (D through T) using their published effective areas.45- the warning is a simple rule-based label aligned with API 520 intent.4647This is educational and screening-only logic. It assumes critical (choked) gas flow and does not check the choked-flow criterion, subcritical flow, liquid or two-phase relief, fire-case sizing, inlet or outlet pressure-drop limits, or vendor certified capacities. It is not a replacement for validated relief-valve sizing and a qualified safety review.4849## Python Usage Pattern5051```python52from psv_orifice_screening import PsvOrificeModel5354model = PsvOrificeModel()55result = model.evaluate(56 relief_rate=50000.0,57 relieving_pressure=20.0,58 temperature=323.15,59 molecular_weight=19.0,60)6162print(result.selected_orifice)63print(result.required_area_mm2)64print(result.psv_warning)65```6667## Related NeqSim Functionality6869For validated PSV sizing, redirect to existing NeqSim classes:7071- `neqsim.process.util.fire.ReliefValveSizing` — API 520 gas, liquid, and two-phase relief sizing including fire case.72- `neqsim.process.equipment.valve.SafetyValve` — safety-valve equipment model for process simulations.7374This skill is a public API 520 triage layer that decides when to invoke those validated relief classes.7576## Validation Checklist7778- [ ] Relief rate, pressure, temperature, and molecular weight are positive and in the stated units.79- [ ] Example inputs are public and synthetic.80- [ ] Tests cover an orifice selection, an oversize-needed case, and invalid input.81- [ ] Results are described as educational screening indicators.82- [ ] Real sizing is redirected to validated methods, API 520, API 526, and qualified review.8384## Common Mistakes8586| Symptom | Cause | Fix |87| --- | --- | --- |88| Orifice too small | Choked-flow assumption invalid at low overpressure | Check the critical-flow criterion and use subcritical sizing if needed |89| Area off by orders of magnitude | Mixed mass and molar units | Keep `W` in kg/h and `M` in g/mol consistently |90| Fire case under-sized | Fire-case heat input not included | Use the API 521 fire-case relief rate as input |9192## Limitations9394- No proprietary valve data, vendor capacity charts, or company relief specs are included.95- No liquid, two-phase, or fire-case sizing logic is performed.96- No inlet or outlet pressure-drop or certified-capacity checks are included.9798## References99100- NeqSim repository: https://github.com/equinor/neqsim101- NeqSim Skills Guide: https://github.com/equinor/neqsim/blob/master/docs/integration/skills_guide.md