Schlumberger ECLIPSE Reservoir Engineering (.data, .dat, .inc)
@modelscript/eclipse (languages/eclipse) provides zero-regex parsing, multiphase Darcy material balance solving, Peaceman well inflow modeling, linear DAE lowering, and Modelica 3.x projection for Schlumberger ECLIPSE 100 (Black Oil) & 300 (Compositional) reservoir simulation decks.
Supported Extensions & Standards
| Extension | Format | Description |
|---|---|---|
.data | ECLIPSE Master Deck | Structured keyword deck defining grid geometry, rock/fluid properties, and well schedules |
.dat / .inc | ECLIPSE Include File | Modular sub-decks for PVT tables (PROPS), well completions (SCHEDULE), or permeability maps |
Key Capabilities
1. Sectioned Deck Architecture & Table Records
- Parses all standard ECLIPSE keyword sections:
RUNSPEC: Phases (OIL, WATER, GAS, DISGAS), grid dimensions (), unit systems (FIELD, METRIC, LAB). GRID: Block dimensions (DX,DY,DZ), top depths (TOPS), porosity (PORO), and directional permeabilities (PERMX,PERMY,PERMZ).PROPS: Multi-phase relative permeability curves (SWOF,SGOF) and PVT tables (PVDO,PVTW,PVDG).REGIONS: Fluid and equilibrium region partitions.SOLUTION: Initial equilibrium pressure and saturation distributions (PRESSURE,SWAT,SOIL).SCHEDULE: Well specifications (WELSPECS), completion intervals (COMPDAT), production controls (WCONPROD), and water/gas injection controls (WCONINJE).
2. Multiphase Darcy Flow & Material Balance Solver
- Computes original hydrocarbons in place:
- Stock Tank Oil Initially In Place (STOIIP):
- Gas Initially In Place (GIIP):
- Stock Tank Oil Initially In Place (STOIIP):
- Evaluates dynamic reservoir depletion using the generalized Havlena-Odeh material balance equation:
- Evaluates well deliverability via the Peaceman well model:
where is Peaceman's equivalent block radius.
3. Direct DAE Lowering
- Lowers reservoir grid pore volumes, multi-phase flow equations, and well drawdown constraints into
@modelscript/runtime'sDAEBuilderlinear memory arena. - Enables co-simulation between subterranean porous media flow and surface transient multiphase gathering pipelines (
@modelscript/olga) and process facilities (@modelscript/aspen).
4. Bidirectional Modelica 3.x Projection
- Projects reservoir blocks and production wells into
Modelica.Fluidporous media volumes and source boundaries.
Pre-Flight Diagnostics
The ECLIPSE validator inspects grid bounds, PVT table monotonicity, and well completions:
10 rules10 error Run with msx eclipse lint
| Code | Rule | Severity | Message |
|---|---|---|---|
M8701 | missing-reservoir-phases | error | RUNSPEC section does not specify any active fluid phases ('OIL', 'WATER', or 'GAS'). |
M8702 | invalid-grid-dimensions | error | Reservoir grid dimensions must be strictly positive integers (got <nx> x <ny> x <nz>). |
M8703 | porosity-out-of-range | error | Reservoir porosity (<val>) must be strictly positive and less than 1.0. |
M8704 | negative-permeability | error | Reservoir permeability '<prop>' (<val> mD) must be strictly positive. |
M8705 | non-monotonic-pvt-table | error | PVT table '<table>' has non-monotonic pressure progression (<prevP> -> <curP>). |
M8706 | dangling-well-completion | error | Well completion for '<wellName>' at (<i>,<j>,<k>) exceeds grid boundary (<nx>,<ny>,<nz>). |
M8707 | non-monotonic-saturation-table | error | Relative permeability table '<table>' has non-monotonic saturation progression (<prevSat> -> <curSat>). |
M8708 | undefined-well-reference | error | Keyword '<contextKeyword>' references well '<wellName>' not defined in WELSPECS. |
M8709 | invalid-well-control-target | error | Well '<wellName>' specifies invalid control target for '<mode>' (<val>). |
M8710 | negative-formation-volume-factor | error | PVT property specifies non-positive formation volume factor B_<phase> (<fvf>). |
Generated from languages/eclipse/src/errors.ts. All languages →
CLI Usage
bash
# Inspect grid dimensions, fluid phases, and well completions
msx eclipse inspect NorthSeaReservoir.data
# Run pre-flight linting and PVT table monotonicity checks
msx eclipse lint NorthSeaReservoir.data
# Solve reservoir depletion trajectory and compute STOIIP / GIIP
msx eclipse solve NorthSeaReservoir.data --days 365
# Lower reservoir material balance to ModelScript linear DAE arena
msx eclipse to-dae NorthSeaReservoir.data
# Project into Modelica 3.x porous medium flow model
msx eclipse to-modelica NorthSeaReservoir.data -o ReservoirModel.mo
