neqsim-compressor-power-screening
Skill4 starsChanged 5 months agoApache-2.0View on GitHub
Educational centrifugal-compressor power screening using the public polytropic-head equation (API 617 / API 619 style). USE WHEN: a task needs a public, screening-level estimate of polytropic head, discharge temperature, and gas power for a single compression stage before detailed compressor selection.
In this repository90 other files it gives its agents.
- neqsim-document-intelligence-extractionSkill
- neqsim-co2-emissions-screeningSkill
- neqsim-energy-emissions-screeningSkill
- neqsim-weather-dataSkill
- neqsim-anp-open-dataSkill
- neqsim-artificial-lift-screeningSkill
- neqsim-asset-value-npv-screeningSkill
- neqsim-capex-opex-screeningSkill
- neqsim-design-basis-screeningSkill
- neqsim-economy-basis-screeningSkill
- neqsim-ncs-infrastructure-networkSkill
- neqsim-ncs-ownership-equitySkill
- neqsim-ncs-value-chain-optimizationSkill
- neqsim-norwegian-continental-shelf-dataSkill
- neqsim-psc-bid-economics-screeningSkill
- neqsim-reservoir-depletion-screeningSkill
- neqsim-reservoir-facility-value-chainSkill
- neqsim-reservoir-model-builderSkill
- neqsim-resource-classification-screeningSkill
- neqsim-hydrate-margin-checkSkill
- neqsim-hydrate-screeningSkill
- neqsim-multiphase-flow-slug-screeningSkill
- neqsim-olga-multiphase-simulatorSkill
- neqsim-produced-water-scale-screeningSkill
- neqsim-surf-cooldown-screeningSkill
- neqsim-two-phase-flow-regime-screeningSkill
- neqsim-wax-margin-checkSkill
- neqsim-acoustic-induced-vibration-screeningSkill
- neqsim-adsorbent-capillary-condensation-screeningSkill
- neqsim-ageing-life-extension-screeningSkill
- neqsim-cfd-couplingSkill
- neqsim-compressor-antisurge-recycleSkill
- neqsim-compressor-operating-window-checkSkill
- neqsim-continuous-improvement-toolkitSkill
- neqsim-control-authority-screeningSkill
- neqsim-control-valve-cv-screeningSkill
- neqsim-dry-gas-seal-screeningSkill
- neqsim-dynamic-instrument-controller-setupSkill
- neqsim-dynamic-process-preparationSkill
- neqsim-fem-couplingSkill
- neqsim-fired-heater-duty-screeningSkill
- neqsim-flow-induced-vibration-screeningSkill
- neqsim-gas-scrubber-sizing-screeningSkill
- neqsim-gas-turbine-performance-screeningSkill
- neqsim-heat-exchanger-fouling-assessmentSkill
- neqsim-line-velocity-checkSkill
- neqsim-noise-screeningSkill
- neqsim-pipe-wall-thickness-screeningSkill
- neqsim-piping-flexibility-screeningSkill
- neqsim-pressure-drop-screeningSkill
- neqsim-pump-hydraulics-screeningSkill
- neqsim-reciprocating-compressor-screeningSkill
- neqsim-reliability-data-screeningSkill
- neqsim-sand-erosion-screeningSkill
- neqsim-separator-modellingSkill
- neqsim-teg-dehydration-modelingSkill
- neqsim-uncertainty-quantificationSkill
- neqsim-utility-balance-screeningSkill
- neqsim-water-dewpoint-dehydration-screeningSkill
- neqsim-benchmark-reference-dataSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 7 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 20
When a user asks roughly how much power a compression stage needs.
- Distinctive: line 21
When an agent needs a quick polytropic-head and discharge-temperature estimate.
- Distinctive: line 22
When examples must run without confidential compressor curves, vendor data, or company specs.
- Distinctive: line 59
When the binding limit is the driver / rated maximum power (not surge), a common operations question is *how large a power margin to keep* …
- Distinctive: line 130
No proprietary compressor curves, vendor data, or company specs are included.
- Distinctive: line 131
No intercooling, mechanical losses, or surge and stonewall limits are modeled.
- Distinctive: line 132
No real-gas property variation across the stage is included.
≈ “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
Compressor Power Screening
Use this skill for public, educational centrifugal-compressor power screening. It estimates polytropic head, discharge temperature, and gas power for a single compression stage using the open polytropic-head equation so an agent can scope a compression study and check against a rated driver power before detailed selection.
When to Use
- When a user asks roughly how much power a compression stage needs.
- When an agent needs a quick polytropic-head and discharge-temperature estimate.
- When examples must run without confidential compressor curves, vendor data, or company specs.
Inputs
suction_pressure: stage suction pressureP1in bar absolute.discharge_pressure: stage discharge pressureP2in bar absolute.suction_temperature: stage suction temperatureT1in kelvin.mass_flow: gas mass flow in kg/s.molecular_weight: gas molecular weightMin g/mol.specific_heat_ratio: ratio of specific heatsk, default 1.3.compressibility: average compressibility factorZ, default 1.0.polytropic_efficiency: polytropic efficiency, default 0.78.rated_power: optional rated driver power in kW for the comparison.
Outputs
pressure_ratio:P2 / P1.polytropic_head_kj_kg: polytropic head.discharge_temperature_k: estimated discharge temperature.gas_power_kw: gas power on the shaft.power_margin_ratio: ratio of rated power to gas power, ornullif no rated power supplied.compressor_warning:ok,watch,over-rated, orno-rating.assumptions: public assumptions used by the placeholder model.
Engineering Method
The Python class CompressorPowerModel uses the open polytropic-head equation only:
- the polytropic exponent uses
(n - 1) / n = (k - 1) / (k * polytropic_efficiency). - the polytropic head uses
Hp = Z R T1 (n / (n - 1)) [(P2 / P1)^((n-1)/n) - 1], withR = 8.314 / M. - the discharge temperature uses
T2 = T1 (P2 / P1)^((n-1)/n). - the gas power uses
power = mass_flow * Hp / polytropic_efficiency.
This is educational and screening-only logic. It assumes a single stage, constant k and Z, and an ideal-gas head form. It does not include real-gas property variation, intercooling, mechanical losses, surge or stonewall limits, or vendor curves. It is not a replacement for validated compressor selection and a qualified rotating-equipment review.
Driver Power-Margin Sizing (operating margin to rated/max power)
When the binding limit is the driver / rated maximum power (not surge), a common operations question is how large a power margin to keep so the machine can run close to maximum without tripping. The screening relation is dimensionless:
- At near-constant pressure ratio,
power ∝ mass flow, so throughput headroom [%] = power_margin / operating_power. - Therefore the same absolute MW margin protects a smaller machine less — margin
must be scaled to each machine's operating power, not applied as a flat MW.
To give machine B the same % headroom as machine A:
margin_B = margin_A × (P0_B / P0_A). - Size the margin to the fastest credible power excursion before the control
system reacts. The dominant excursions raise the pressure ratio: a suction-pressure
drop or a discharge-pressure rise. A downstream pressure controller (e.g. an
MPC holding delivery pressure fixed) removes a first-order power disturbance and so
buys back margin: residual swing
≈ (∂power/∂P_discharge) × ΔP_controlled.
Obtain the local slopes ∂power/∂flow, ∂power/∂P_suction, ∂power/∂P_discharge,
∂power/∂T_suction by finite-differencing a validated Compressor.getPower() around
the operating point (this screening class only gives the flow-proportional term). The
driver rated power and performance curves must come from STID/vendor data before
any margin is fixed. (Pattern first used for a Troll A export-compressor power-margin
PEPR action; see the compressor-agent / enterprise-compressor-agent.)
Python Usage Pattern
from compressor_power_screening import CompressorPowerModel
model = CompressorPowerModel()
result = model.evaluate(
suction_pressure=30.0,
discharge_pressure=90.0,
suction_temperature=313.15,
mass_flow=25.0,
molecular_weight=19.0,
rated_power=8000.0,
)
print(result.compressor_warning)
print(result.gas_power_kw)
print(result.discharge_temperature_k)Related NeqSim Functionality
For validated compressor calculations, redirect to existing NeqSim classes:
neqsim.process.equipment.compressor.Compressor— rigorous polytropic compression with real-gas properties and curves.neqsim.process.equipment.compressor.CompressorChart— vendor performance maps and surge control.neqsim.process.mechanicaldesign.compressor.CompressorMechanicalDesign— compressor mechanical design and feasibility.
This skill is a public polytropic-head triage layer that decides when to invoke those validated compressor classes.
Validation Checklist
- Suction and discharge pressures are positive and
P2 > P1. - Temperature, mass flow, and molecular weight are positive.
- Tests cover a head and power calculation, a rating comparison, and invalid input.
- Results are described as educational screening indicators.
- Real selection is redirected to validated NeqSim compressor classes and qualified review.
Common Mistakes
| Symptom | Cause | Fix |
| Discharge temperature too high | Single high-ratio stage assumed | Split into stages with intercooling |
| Power off significantly | Constant Z over a wide range | Use a real-gas method like the NeqSim Compressor |
| Head looks wrong | Molecular weight in kg/mol not g/mol | Keep M in g/mol |
| Measured discharge temperature far above the screening value at design efficiency | Low effective efficiency (off-design speed, fouling), a heavier gas than assumed, or hot recycle | Check mole weight and recycle-valve opening first; if both are clean, back out an effective efficiency from the temperature rise and compare the resulting power with the measured motor power |
Limitations
- No proprietary compressor curves, vendor data, or company specs are included.
- No intercooling, mechanical losses, or surge and stonewall limits are modeled.
- No real-gas property variation across the stage is included.
References
- NeqSim repository: https://github.com/equinor/neqsim
- NeqSim Skills Guide: https://github.com/equinor/neqsim/blob/master/docs/integration/skills_guide.md
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.

