# Neqsim Production Network Routing

> Educational production-network routing screening that routes wells through manifolds and flowlines/risers to a host and rolls up an arrival pressure, and screens multiwell flow regulated by a facility inlet/separator pressure. USE WHEN: a task needs a public, screening-level inflow rate per well, aggregated manifold rates, a platform arrival-pressure roll-up, or pressure-regulated multiwell flow from an inlet/separator and reservoir pressures before detailed NeqSim inflow and multiphase-hydraulics design.

- Skill: `equinor/neqsim-production-network-routing` (Agent Skill, multi-file: 7 files)
- Install (CLI): `npx skillmds@latest add equinor/neqsim-production-network-routing`
- Raw SKILL.md: https://api.skillmd.com/api/skills/equinor/neqsim-production-network-routing/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Productivity
- Author: equinor (https://skillmd.com/u/equinor)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/equinor/neqsim-production-network-routing

---


# Production Network Routing

Use this skill for a quick, public screening of a "reservoir-to-facility"
production network: wells flowing through manifolds and flowlines/risers to a
host. Given wells with a productivity index and a manifold/flowline layout, it
estimates a screening rate per well, aggregates rates by manifold, and rolls up
an arrival pressure at the host with a simple pressure-drop gradient. It is
intentionally simple and should guide users toward validated NeqSim inflow and
multiphase-hydraulics workflows.

## When to Use

- When wells, a manifold layout, and a required arrival pressure are available and
  a first network roll-up is needed.
- When an agent needs to chain reservoir-vs-time screening to a platform
  arrival-pressure check.
- Before detailed IPR, tubing, and multiphase flowline modelling.

## Inputs

- `wells`: rows of `{name, manifold, reservoir_pressure_bara,
  flowing_bottomhole_pressure_bara, productivity_index_sm3_per_day_bar,
  tubing_head_pressure_bara}`.
- `manifolds`: rows of `{name, flowline_length_km, pressure_gradient_bar_per_km,
  riser_dp_bar}` (`riser_dp_bar` optional, default 0).
- `host_name`: name of the receiving host/platform (default `HOST`).
- `required_arrival_pressure_bara`: minimum required arrival pressure at the host.

## Outputs

- `wells`: per-well `drawdown_bar`, `rate_sm3_per_day`, and `flow_warning`.
- `manifolds`: per-manifold `total_rate_sm3_per_day`, `manifold_pressure_bara`,
  `flowline_dp_bar`, `riser_dp_bar`, `arrival_pressure_bara`,
  `arrival_margin_bar`, and `arrival_warning`.
- `total_rate_sm3_per_day`: aggregated network rate.
- `min_arrival_pressure_bara`: lowest manifold arrival pressure.
- `overall_warning`: worst of the well and manifold warnings.
- `neqsim_available`: whether the optional NeqSim package is importable.
- `assumptions`: public assumptions and required follow-up.

A separate `regulate_flow_from_inlet_pressure` entry point screens
pressure-regulated multiwell flow from a facility inlet/separator pressure and
the reservoir pressures (see "Pressure-Regulated Multiwell / Manifold Flow").

## Engineering Method

Each well rate is a linear productivity-index inflow:
`q = PI * max(0, P_res - P_bhp)`. A well with no drawdown flags `high`. Wells are
grouped by manifold; the manifold collection pressure is the lowest routed well
tubing-head pressure (the most-constrained well). The arrival pressure is the
manifold pressure minus a screening flowline pressure drop
(`gradient * length`) and an optional riser pressure drop. The arrival margin is
the arrival pressure minus the required arrival pressure: negative is `high`,
below 10 % of the requirement is `watch`, otherwise `ok`. The overall warning is
the most severe across wells and manifolds.

This skill performs no real IPR, multiphase hydraulics, phase split, or thermal
calculation. It applies simple algebra to supplied values and must be replaced
by validated NeqSim tools for any quantitative use.

## Python Usage Pattern

```python
from production_network_routing import ProductionNetworkModel

wells = [
    {"name": "WELL-A", "manifold": "MANIFOLD-1", "reservoir_pressure_bara": 300.0,
     "flowing_bottomhole_pressure_bara": 250.0,
     "productivity_index_sm3_per_day_bar": 1.0e5, "tubing_head_pressure_bara": 140.0},
    {"name": "WELL-B", "manifold": "MANIFOLD-1", "reservoir_pressure_bara": 295.0,
     "flowing_bottomhole_pressure_bara": 240.0,
     "productivity_index_sm3_per_day_bar": 0.9e5, "tubing_head_pressure_bara": 135.0},
]
manifolds = [
    {"name": "MANIFOLD-1", "flowline_length_km": 8.0,
     "pressure_gradient_bar_per_km": 1.5, "riser_dp_bar": 20.0},
]

result = ProductionNetworkModel().evaluate(
    wells=wells, manifolds=manifolds, host_name="HOST",
    required_arrival_pressure_bara=90.0,
)
print(result.min_arrival_pressure_bara, result.overall_warning)
```

## Pressure-Regulated Multiwell / Manifold Flow

In addition to the arrival-pressure roll-up above, this skill can screen the
inverse problem: **given a fixed facility inlet/separator pressure and each
well's reservoir pressure, how much does each well flow?** This generalizes the
single-train NeqSim `Adjuster` pattern (which tunes one well rate to hit a target
pipeline outlet pressure) to many wells and manifolds, mirroring NeqSim
`WellFlowlineNetwork.setTargetEndpointPressure`.

`regulate_flow_from_inlet_pressure(wells, target_inlet_pressure_bara,
segment_dp_bar=None)`:

- Each well's flowing bottomhole pressure is the target inlet pressure plus a
  screening sum of segment pressure drops (`well`, `choke`, `flowline`, `riser`;
  default `60 + 10 + 5 + 8 = 83` bar). Override per call or per well via
  `segment_dp_bar`.
- Each well rate is a linear productivity-index inflow:
  `q = PI * max(0, P_res - P_bhp)`. A well whose reservoir pressure cannot
  overcome the flowing bottomhole pressure flags `high` and produces zero rate.
- An optional per-well `max_rate_sm3_per_day` caps the rate and flags `watch`.

```python
from production_network_routing import ProductionNetworkModel

wells = [
    {"name": "WELL-A", "manifold": "MANIFOLD-1", "reservoir_pressure_bara": 300.0,
     "productivity_index_sm3_per_day_bar": 1.0e5},
    {"name": "WELL-B", "manifold": "MANIFOLD-1", "reservoir_pressure_bara": 295.0,
     "productivity_index_sm3_per_day_bar": 0.9e5},
]

regulated = ProductionNetworkModel().regulate_flow_from_inlet_pressure(
    wells=wells, target_inlet_pressure_bara=140.0,
)
print(regulated.total_rate_sm3_per_day, regulated.flowing_well_count)
for w in regulated.wells:
    print(w.name, w.flowing_bottomhole_pressure_bara, w.rate_sm3_per_day, w.flow_warning)
```

Outputs: per-well `flowing_bottomhole_pressure_bara`, `drawdown_bar`,
`rate_sm3_per_day`, and `flow_warning`; network `total_rate_sm3_per_day`,
`flowing_well_count`, `segment_dp_bar`, `overall_warning`, `neqsim_available`,
and `assumptions`.

## Validated NeqSim Path

This screening is a placeholder. For real reservoir-to-facility behaviour use:

- NeqSim `SimpleReservoir` (`runTransient`) for reservoir-vs-time inflow.
- NeqSim `PipeBeggsAndBrills` for multiphase flowline/riser pressure drop and
  temperature with gas/oil/water.
- NeqSim MCP `runPipeline`, `runProcess`, and `runFlowAssurance` for arrival
  conditions and flow-assurance checks.
- The enterprise `well-production-routing-agent` for live-data, IPR + tubing,
  choke, and Beggs & Brills arrival modelling.

## Escalation

Escalate any `watch` or `high` verdict, and any quantitative use, to validated
NeqSim inflow and multiphase-hydraulics models and qualified production-technology
review.

## Validation Checklist

- [ ] Inputs are validated and within stated ranges.
- [ ] Examples use public data only.
- [ ] Screening assumptions are stated explicitly.
- [ ] Limitations are respected.
- [ ] Quantitative use is escalated to validated NeqSim models.

## Common Mistakes

| Symptom | Cause | Fix |
| --- | --- | --- |
| Unrealistic result | Inputs outside the screening range | Keep inputs within the stated bounds |
| Misused for design | Screening output taken as final | Escalate to validated NeqSim models |

## Limitations

- Educational screening only; not a validated design method.
- No confidential data or proprietary methods are included.
- Escalate any quantitative or design use to validated NeqSim workflows.

## References

- NeqSim repository: https://github.com/equinor/neqsim
- NeqSim Skills Guide: https://github.com/equinor/neqsim/blob/master/docs/integration/skills_guide.md

