wellcast.datasets¶
datasets ¶
Synthetic production data for examples, tests and the demo app.
make_synthetic_field simulates daily surface measurements for a small
oil field. The model is deliberately simple but physically consistent, so the
analysis modules can be checked against known ground truth:
- Liquid potential follows an Arps hyperbolic decline in calendar time and is scaled by the choke opening.
- Bottomhole pressure follows a linear IPR,
pwf = pr - q_liquid / J, and reservoir pressure falls linearly with cumulative liquid withdrawal. - Wellhead pressure follows the Gilbert (1954) choke equation.
- The producing GOR equals the solution GOR above the bubble point and rises once reservoir pressure drops below it.
- Water cut grows exponentially towards a plateau after breakthrough.
- Shut-ins show zero rates and an exponential pressure build-up.
- An injector loses injectivity at a known date (visible on a Hall plot).
- Sensor anomalies are injected and labelled.
No third-party data is bundled with wellcast; all examples use this generator.
SyntheticField
dataclass
¶
Output of make_synthetic_field.
Attributes:
| Name | Type | Description |
|---|---|---|
production |
DataFrame
|
Measurements in the canonical schema (see |
labels |
DataFrame
|
Ground truth aligned row by row with |
wells |
DataFrame
|
True parameters per well, indexed by well name. |
make_synthetic_field ¶
make_synthetic_field(n_wells: int = 5, years: int = 5, freq: str = 'D', seed: int = 42, *, n_injectors: int = 1) -> SyntheticField
Simulate a small oil field with known ground truth.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
n_wells
|
int
|
Number of producers, named |
5
|
years
|
int
|
Length of the simulated period in years, starting 2020-01-01. Default 5. |
5
|
freq
|
str
|
Output frequency as a pandas offset alias. Data are simulated daily
and averaged (labels: any) to coarser frequencies. Default |
'D'
|
seed
|
int
|
Seed of the random generator; equal seeds give identical output. Default 42. |
42
|
n_injectors
|
int
|
Number of water injectors, named |
1
|
Returns:
| Type | Description |
|---|---|
SyntheticField
|
Production data, row-aligned labels and true well parameters. |
Raises:
| Type | Description |
|---|---|
DataValidationError
|
If |
Notes
Units follow the canonical schema: bbl/d for liquids, Mscf/d for gas, psi for pressure, degF for temperature and 64ths of an inch for the choke. See the module docstring for the physical model.
Examples: