Forward Separator Train for One Fluid
A forward train has no recycle: liquid cascades from stage to stage and every gas
stream leaves the system. For a fixed composition and fixed stage pressures and
temperatures the result is therefore unique and needs no iteration. This is the
same separator test PVTsim and ECL300 run, so results can be compared directly.
The skill runs one fluid. To study variation, call it once per fluid
(see "Many fluids" below).
When to Use
- A fluid is given as an E300 file (or a mole-fraction table) and surface results are needed.
- GOR, Bo, stock-tank oil density/API, or gas rate and gas MW per stage are requested.
- A PVTsim or ECL300 separator-test number must be reproduced or sanity-checked.
Do not use it for trains with recycles or with feedback from compressors or
coolers into earlier stages; build a ProcessSystem with recycles instead.
Inputs
| Input |
Default |
Notes |
E300 file or --composition JSON |
required |
Exactly one. JSON: {"eos":"srk","components":{"methane":0.7,...}} (srk or pr, library component names). |
--feed-p |
250 bara |
Set to reservoir (or wellstream) pressure. |
--feed-t |
100 degC |
Set to reservoir (or wellstream) temperature. |
--stages |
70:60,20:50,2:40 |
bara:degC per stage, strictly falling pressure. Stock tank at 15 degC and 1.01325 bara is always appended. |
--flow |
100000 kg/hr |
Only scales absolute rates; GOR and Bo do not depend on it. |
--out |
none |
Writes the result JSON. |
Ask the user for the stage P/T and feed conditions if they are not given. The
defaults are placeholders, not a design.
Run
<python> scripts/run_forward_separator.py fluid.e300 --feed-p 300 --feed-t 110 \
--stages "70:60,20:50,2:40" --out result.json
<python> is the interpreter with the neqsim package. The script builds, per
stage: ThrottlingValve to the stage pressure, Heater to the stage
temperature, Separator; the liquid outlet feeds the next stage.
Outputs (JSON)
GOR_Sm3_Sm3: total gas of all stages including stock tank, per Sm3 of stock-tank oil (gas at 15 degC, 1.01325 bara, ideal-gas conversion).
Bo_m3_Sm3: feed volume at feed P/T divided by stock-tank oil volume.
STO_density_kgm3, STO_API, STO_Sm3_h: stock-tank oil.
stages[]: P_bara, T_C, gas_Sm3_h, gas_MW_gmol, liquid_kg_h per stage.
feed_n_phases, mass_balance_rel_err, warnings[].
Validation checks (do before reporting)
mass_balance_rel_err below 1e-6.
feed_n_phases: if 2 at feed P/T, the feed is not a single-phase reservoir
fluid (feed below saturation, or feed P/T wrong). Bo then describes the mixed
stream; say so, or correct the feed conditions.
- GOR and API are physically plausible for the fluid type (black oil about
50-300 Sm3/Sm3, 25-40 API; volatile oil/condensate much higher GOR, higher API).
- For a PVTsim/ECL300 comparison, confirm the same stage P/T, the same standard
conditions (15 degC, 1.01325 bara) and the same EOS parameters (volume shift,
kij) before attributing differences to the model.
Many fluids
The user normally runs variations themselves: loop the script over several E300
files or composition JSONs and collect the GOR_Sm3_Sm3, Bo_m3_Sm3 and
STO_API fields into a table. scripts/make_variations.py base.e300 --n 30 --outdir d writes Latin-hypercube variations (+-20 % on each C1-C6 component, on
the C7+ amount and on a C7+ tilt, keeping the pseudo-component EOS parameters)
plus a manifest.csv. Keep stage P/T and feed P/T fixed across cases so the
cases are comparable.
Fit ONE P/T set to reservoir-simulation rates
A reservoir simulator applies one pseudo process (the same stage P/T) to every
fluid it produces, from all formations. To reproduce its produced oil and gas
rate, regress a single set of stage pressures and temperatures over all fluids.
Only oil and gas rate matter (hence GOR); Bo and densities are not used.
Manifest CSV, one row per fluid: fluid (E300 path), oil_Sm3_h, gas_Sm3_h
(targets from the simulator), optional feed_kmol_h, feed_P_bara, feed_T_C,
weight, formation (label for the error report only; all formations share the
one P/T set).
<python> scripts/fit_separator_pt.py manifest.csv --x0 "80:70,25:55,3:45" \
--feed-p 300 --feed-t 110 --p-max 120 --out fit.json
- Unknowns: P and T of every stage (stage count = number of
--x0 stages; stock
tank fixed at 15 degC, 1.01325 bara). Pressure falls along the train by construction.
- Residuals: ln(model/target) for oil and for gas per fluid, so errors are relative.
- Output
fit.json and *_per_fluid.csv: fitted stages, per-fluid target vs model
(oil, gas, GOR, % error), formation_report, parameter standard errors,
Jacobian condition number, warnings.
Uniqueness is not guaranteed. Oil and gas rate alone constrain only a
combination of the stage conditions. Tested on synthetic targets (known train
60:55, 15:45, 1.8:35, 1 % noise): fluids varied +-20 % around one base gave a
pure data fit (--prior-weight 0) with huge standard errors that drifted to a
physically odd set at the same noise-level match. A weak prior toward --x0
(--prior-weight, default 0.02) selects one reproducible solution along the flat
valley; with three different base fluids the match was at the noise level
(about 1 % GOR) for every formation, and the standard errors shrank (about 7-21 degC,
a factor 1.8 in pressure). So:
- Always report the fitted set together with its
std_errors and the match quality;
do not present poorly determined stages as measured values.
- Use fluids from as many formations with different volatility as possible; that
is what makes P/T better determined.
- Set
--x0 to the simulator's own pseudo-process (or a typical train); the prior
keeps the answer near it. Fix a stage you know by narrowing --t-min/--t-max
and --p-max.
- If
formation_report shows a formation biased by more than a few percent GOR,
one P/T set does not fit all formations; say so instead of tuning further.
- A run on 30 fluids and 3 stages takes about 1 minute.
Limits
- Equilibrium stages only; no entrainment, carry-over or separation efficiency.
- Water is not treated specially; an aqueous phase in the liquid outlet is counted as liquid.
- Stage gas rates are ideal-gas standard volumes, which can differ by a fraction of a percent from PVTsim's real-gas standard volumes.
1---2name: neqsim-forward-separator-train3calculation_basis: "neqsim-java"4version: "0.1.0"5description: "Run one fluid (E300 or composition) through a forward-only, no-recycle separator train (HP, MP, LP, stock tank) like PVTsim/ECL300 and return GOR, Bo, STO API and gas per stage; also fit ONE shared stage P/T set to reservoir-simulation oil and gas rates over many fluids. USE WHEN: 'kjør dette for et gitt fluid', surface GOR/Bo/STO for an E300 fluid, or fitting the pseudo-process P/T per tank/scrubber of a reservoir simulation."6last_verified: "2026-11-08"7requires:8 python_packages: [neqsim]9 java_packages: []10 env: []11 network: []12metadata:13 source: https://skillmd.com/skills/equinor/neqsim-forward-separator-train14---1516# Forward Separator Train for One Fluid1718A forward train has no recycle: liquid cascades from stage to stage and every gas19stream leaves the system. For a fixed composition and fixed stage pressures and20temperatures the result is therefore unique and needs no iteration. This is the21same separator test PVTsim and ECL300 run, so results can be compared directly.2223The skill runs **one** fluid. To study variation, call it once per fluid24(see "Many fluids" below).2526## When to Use2728- A fluid is given as an E300 file (or a mole-fraction table) and surface results are needed.29- GOR, Bo, stock-tank oil density/API, or gas rate and gas MW per stage are requested.30- A PVTsim or ECL300 separator-test number must be reproduced or sanity-checked.3132Do not use it for trains with recycles or with feedback from compressors or33coolers into earlier stages; build a `ProcessSystem` with recycles instead.3435## Inputs3637| Input | Default | Notes |38| --- | --- | --- |39| E300 file or `--composition` JSON | required | Exactly one. JSON: `{"eos":"srk","components":{"methane":0.7,...}}` (`srk` or `pr`, library component names). |40| `--feed-p` | 250 bara | Set to reservoir (or wellstream) pressure. |41| `--feed-t` | 100 degC | Set to reservoir (or wellstream) temperature. |42| `--stages` | `70:60,20:50,2:40` | `bara:degC` per stage, strictly falling pressure. Stock tank at 15 degC and 1.01325 bara is always appended. |43| `--flow` | 100000 kg/hr | Only scales absolute rates; GOR and Bo do not depend on it. |44| `--out` | none | Writes the result JSON. |4546Ask the user for the stage P/T and feed conditions if they are not given. The47defaults are placeholders, not a design.4849## Run5051```52<python> scripts/run_forward_separator.py fluid.e300 --feed-p 300 --feed-t 110 \53 --stages "70:60,20:50,2:40" --out result.json54```5556`<python>` is the interpreter with the `neqsim` package. The script builds, per57stage: `ThrottlingValve` to the stage pressure, `Heater` to the stage58temperature, `Separator`; the liquid outlet feeds the next stage.5960## Outputs (JSON)6162- `GOR_Sm3_Sm3`: total gas of all stages including stock tank, per Sm3 of stock-tank oil (gas at 15 degC, 1.01325 bara, ideal-gas conversion).63- `Bo_m3_Sm3`: feed volume at feed P/T divided by stock-tank oil volume.64- `STO_density_kgm3`, `STO_API`, `STO_Sm3_h`: stock-tank oil.65- `stages[]`: `P_bara`, `T_C`, `gas_Sm3_h`, `gas_MW_gmol`, `liquid_kg_h` per stage.66- `feed_n_phases`, `mass_balance_rel_err`, `warnings[]`.6768## Validation checks (do before reporting)69701. `mass_balance_rel_err` below 1e-6.712. `feed_n_phases`: if 2 at feed P/T, the feed is not a single-phase reservoir72 fluid (feed below saturation, or feed P/T wrong). Bo then describes the mixed73 stream; say so, or correct the feed conditions.743. GOR and API are physically plausible for the fluid type (black oil about75 50-300 Sm3/Sm3, 25-40 API; volatile oil/condensate much higher GOR, higher API).764. For a PVTsim/ECL300 comparison, confirm the same stage P/T, the same standard77 conditions (15 degC, 1.01325 bara) and the same EOS parameters (volume shift,78 kij) before attributing differences to the model.7980## Many fluids8182The user normally runs variations themselves: loop the script over several E30083files or composition JSONs and collect the `GOR_Sm3_Sm3`, `Bo_m3_Sm3` and84`STO_API` fields into a table. `scripts/make_variations.py base.e300 --n 3085--outdir d` writes Latin-hypercube variations (+-20 % on each C1-C6 component, on86the C7+ amount and on a C7+ tilt, keeping the pseudo-component EOS parameters)87plus a `manifest.csv`. Keep stage P/T and feed P/T fixed across cases so the88cases are comparable.8990## Fit ONE P/T set to reservoir-simulation rates9192A reservoir simulator applies one pseudo process (the same stage P/T) to every93fluid it produces, from all formations. To reproduce its produced oil and gas94rate, regress a single set of stage pressures and temperatures over all fluids.95Only oil and gas rate matter (hence GOR); Bo and densities are not used.9697Manifest CSV, one row per fluid: `fluid` (E300 path), `oil_Sm3_h`, `gas_Sm3_h`98(targets from the simulator), optional `feed_kmol_h`, `feed_P_bara`, `feed_T_C`,99`weight`, `formation` (label for the error report only; all formations share the100one P/T set).101102```103<python> scripts/fit_separator_pt.py manifest.csv --x0 "80:70,25:55,3:45" \104 --feed-p 300 --feed-t 110 --p-max 120 --out fit.json105```106107- Unknowns: P and T of every stage (stage count = number of `--x0` stages; stock108 tank fixed at 15 degC, 1.01325 bara). Pressure falls along the train by construction.109- Residuals: ln(model/target) for oil and for gas per fluid, so errors are relative.110- Output `fit.json` and `*_per_fluid.csv`: fitted stages, per-fluid target vs model111 (oil, gas, GOR, % error), `formation_report`, parameter standard errors,112 Jacobian condition number, warnings.113114**Uniqueness is not guaranteed.** Oil and gas rate alone constrain only a115combination of the stage conditions. Tested on synthetic targets (known train11660:55, 15:45, 1.8:35, 1 % noise): fluids varied +-20 % around one base gave a117pure data fit (`--prior-weight 0`) with huge standard errors that drifted to a118physically odd set at the same noise-level match. A weak prior toward `--x0`119(`--prior-weight`, default 0.02) selects one reproducible solution along the flat120valley; with three different base fluids the match was at the noise level121(about 1 % GOR) for every formation, and the standard errors shrank (about 7-21 degC,122a factor 1.8 in pressure). So:1231241. Always report the fitted set together with its `std_error`s and the match quality;125 do not present poorly determined stages as measured values.1262. Use fluids from as many formations with different volatility as possible; that127 is what makes P/T better determined.1283. Set `--x0` to the simulator's own pseudo-process (or a typical train); the prior129 keeps the answer near it. Fix a stage you know by narrowing `--t-min/--t-max`130 and `--p-max`.1314. If `formation_report` shows a formation biased by more than a few percent GOR,132 one P/T set does not fit all formations; say so instead of tuning further.1335. A run on 30 fluids and 3 stages takes about 1 minute.134135## Limits136137- Equilibrium stages only; no entrainment, carry-over or separation efficiency.138- Water is not treated specially; an aqueous phase in the liquid outlet is counted as liquid.139- Stage gas rates are ideal-gas standard volumes, which can differ by a fraction of a percent from PVTsim's real-gas standard volumes.