Skip to content
Preview.data@modelscript/eclipse 10 diagnostic rules
Parser WASM GLR
Diagnostics 10 rules
DAE Arena Lowering
Simulation Native Solvers
Projections Modelica
Live ExampleFiveSpotWaterflood.data

ECLIPSE 100 Black-Oil Reservoir Stratigraphy & Waterflood

Three-dimensional 5-layer sandstone reservoir model with Gas-Oil and Oil-Water contacts, water injector INJ-1, and producer PROD-1.

Playground
Source (39 lines)
1-- ECLIPSE 100 Black-Oil Reservoir Simulation Deck
2RUNSPEC
3TITLE
4  North Sea Fault-Block Waterflood Model
5DIMENS
6  12 12 5 /
7OIL
8WATER
9GAS
10METRIC
11 
12GRID
13DX
14  720*100.0 /
15DY
16  720*100.0 /
17DZ
18  144*12.0 144*15.0 144*18.0 144*15.0 144*14.0 /
19TOPS
20  144*2150.0 /
21PORO
22  720*0.21 /
23PERMX
24  720*285.0 /
25 
26SOLUTION
27EQUIL
28  2180.0 265.0 2205.0 0.0 2168.0 0.0 1 1 0 /
29 
30SCHEDULE
31WELSPECS
32  'INJ-1'  'G1'  2  2  2210.0  'WATER' /
33  'PROD-1' 'G1' 11 11  2175.0  'OIL'   /
34/
35COMPDAT
36  'INJ-1'   2  2  4  5  'OPEN'  1  0.0  0.216 /
37  'PROD-1' 11 11  2  3  'OPEN'  1  0.0  0.216 /
38/
39END
ECLIPSE Subsurface X-Z Stratigraphy & Well Completions
North Sea Fault-Block Waterflood Model DIMENS 12 12 5 True Vertical Depth (TVD) vs Cross-Section Chainage with Well Completions 2150m 2175m 2200m 2225m Layer K=1 k_h = 285 mD Layer K=2 k_h = 285 mD Layer K=3 k_h = 285 mD GOC: Gas-Oil Contact OWC: Oil-Water Contact INJ-1 undefined PROD-1 undefined Wells: Producer (PROD) Injector (INJE) Perforations (COMPDAT)
Drag to pan · Click % to reset

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 ​

ExtensionFormatDescription
.dataECLIPSE Master DeckStructured keyword deck defining grid geometry, rock/fluid properties, and well schedules
.dat / .incECLIPSE Include FileModular 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 (Nx×Ny×Nz), 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):STOIIP=∑kVb,k⋅ϕk⋅So,kBoi
    • Gas Initially In Place (GIIP):GIIP=∑kVb,k⋅ϕk⋅(Sg,k+So,kRsi)Bgi
  • Evaluates dynamic reservoir depletion using the generalized Havlena-Odeh material balance equation:Np[Bo+(Rp−Rs)Bg]+WpBw=N[(Bo−Boi)+(Rsi−Rs)Bg]+mNBoi(BgBgi−1)+(1+m)NBoicwSwi+cf1−SwiΔP+WinjBw
  • Evaluates well deliverability via the Peaceman well model:qp=PI⋅(Pblock−Pbh),PI=2πkhμB(ln⁡rorw+s)where ro=0.28(ky/kx)1/2Δx2+(kx/ky)1/2Δy2(ky/kx)1/4+(kx/ky)1/4 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's DAEBuilder linear 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.Fluid porous 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

CodeRuleSeverityMessage
M8701missing-reservoir-phaseserrorRUNSPEC section does not specify any active fluid phases ('OIL', 'WATER', or 'GAS').
M8702invalid-grid-dimensionserrorReservoir grid dimensions must be strictly positive integers (got <nx> x <ny> x <nz>).
M8703porosity-out-of-rangeerrorReservoir porosity (<val>) must be strictly positive and less than 1.0.
M8704negative-permeabilityerrorReservoir permeability '<prop>' (<val> mD) must be strictly positive.
M8705non-monotonic-pvt-tableerrorPVT table '<table>' has non-monotonic pressure progression (<prevP> -> <curP>).
M8706dangling-well-completionerrorWell completion for '<wellName>' at (<i>,<j>,<k>) exceeds grid boundary (<nx>,<ny>,<nz>).
M8707non-monotonic-saturation-tableerrorRelative permeability table '<table>' has non-monotonic saturation progression (<prevSat> -> <curSat>).
M8708undefined-well-referenceerrorKeyword '<contextKeyword>' references well '<wellName>' not defined in WELSPECS.
M8709invalid-well-control-targeterrorWell '<wellName>' specifies invalid control target for '<mode>' (<val>).
M8710negative-formation-volume-factorerrorPVT 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

Open-Core under the GNU AGPL v3 License; Enterprise Edition (ee/) under the ModelScript Enterprise License. • Trademark Policy