Skip to content

solution-seeker-as/manywells

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

license

ManyWells: simulation of multiphase flow in vertical oil and gas wells

This code implements a steady-state drift-flux model for simulating multiphase (liquid and gas) flow in wells. Three-phase flow (gas, oil, water) is supported by treating the oil and water as one mixed liquid phase. Wells are modelled from the bottomhole pressure to the downstream choke pressure. Boundary conditions are introduced via an inflow model (bottomhole) and a choke model (topside).

The simulator has several use cases:

  • Generate semi-realistic well production data
  • Flow prediction by calibrating the model parameters to historical data
  • Investigate sensitivities of variables of interest

The figure below illustrates a well and some model components of the ManyWells simulator. Illustration of a well and some ManyWells simulator components

Project overview

The project is structured as follows

Project folder
|-- docs                    # Documentation
|-- manywells               # Implementation of simulator
|   |-- calibration         # Code for calibration to data
|   |-- closed_loop         # Simulation with closed-loop control
|-- scripts                 # Various scripts and examples
|   |-- data_generation     # Scripts used to generate the ManyWells datasets
|   |-- flow_regimes        # Scripts to develop a flow regime classifier
|   |-- ml_examples         # Machine learning examples in the ManyWells paper

Getting started

To start developing with ManyWells, you first need to clone the repository by running the following command:

git clone git@github.com:solution-seeker-as/manywells.git

Python environment

The manywells Python environment is defined by pyproject.toml, with specific package versions in uv.lock. Using the uv package manager, the environment is installed by running the following command from the project root folder:

uv sync

Installation

If you do not plan on modifying the ManyWells files, you can optionally install ManyWells as a Python package by running the following command: pip install git+ssh://git@github.com/solution-seeker-as/manywells.git

This command requires that you have registered an SSH key in your GitHub account.

After having installed the environment, you can import the files in the manywells folder. For example, you could import the simulator as import manywells.simulator as sim.

Note that you will only get access to the files in the manywells folder if you install the package.

Datasets

If you wish to download and use the ManyWells datasets, you can find them at the ManyWells project on HuggingFace.

You can use the datasets Python package to get started:

import datasets

# Download 'manywells-sol-1'
data = datasets.load_dataset("solution-seeker-as/manywells", name='manywells-sol-1')

# Cast dataset to a Pandas DataFrame
df = data['train'].to_pandas()

# Print the data
print(df)

Reference

If you use ManyWells in an academic work, we kindly ask you to cite our paper. You can cite it as shown in the bibtex entry below.

@article{Grimstad2026,
	title = {{ManyWells: Simulation of multiphase flow in thousands of wells}},
	author = {Bjarne Grimstad and Erlend Lundby and Henrik Andersson},
	journal = {Geoenergy Science and Engineering},
	volume = {257},
	pages = {214226},
	year = {2026},
	issn = {2949-8910},
	doi = {https://doi.org/10.1016/j.geoen.2025.214226},
}

License

Manywells © 2024 by Solution Seeker AS is licensed under Creative Commons Attribution-NonCommercial 4.0 International. The license applies to all the resources contained in this project, including the code and datasets. The license can be found in the LICENSE file.

About

Official repo of the ManyWells project - sharing data and code for simulating multiphase flow in oil and gas wells

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages