Skip to content

Commit

Permalink
Condense and clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
prisae committed Dec 8, 2024
1 parent a7f9869 commit aa3f902
Show file tree
Hide file tree
Showing 2 changed files with 136 additions and 49 deletions.
83 changes: 64 additions & 19 deletions docs/paper.bib
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,77 @@ @ARTICLE{esmda
DOI = {10.1016/j.cageo.2012.03.011}
}

@Misc{SciPy,
AUTHOR = {Eric Jones and Travis Oliphant and Pearu Peterson and others},
TITLE = {{SciPy}: Open source scientific tools for {Python}},
YEAR = {2001},
URL = {http://www.scipy.org},
NOTE = {[Online; accessed 2019-07-17]}
@ARTICLE{SciPy,
AUTHOR = {Virtanen, Pauli and Gommers, Ralf and Oliphant, Travis E. and
Haberland, Matt and Reddy, Tyler and Cournapeau, David and
Burovski, Evgeni and Peterson, Pearu and Weckesser, Warren and
Bright, Jonathan and {van der Walt}, St{\'e}fan J. and
Brett, Matthew and Wilson, Joshua and Millman, K. Jarrod and
Mayorov, Nikolay and Nelson, Andrew R. J. and Jones, Eric and
Kern, Robert and Larson, Eric and Carey, C J and
Polat, {\.I}lhan and Feng, Yu and Moore, Eric W. and
{VanderPlas}, Jake and Laxalde, Denis and Perktold, Josef and
Cimrman, Robert and Henriksen, Ian and Quintero, E. A. and
Harris, Charles R. and Archibald, Anne M. and
Ribeiro, Ant{\^o}nio H. and Pedregosa, Fabian and
{van Mulbregt}, Paul and {SciPy 1.0 Contributors}},
TITLE = {{{SciPy} 1.0: Fundamental Algorithms for Scientific
Computing in Python}},
JOURNAL = {Nature Methods},
YEAR = {2020},
VOLUME = {17},
PAGES = {261--272},
ADSURL = {https://rdcu.be/b08Wh},
DOI = {10.1038/s41592-019-0686-2},
}

@ARTICLE{NumPy,
AUTHOR = {Stéfan van der Walt and S[] Chris Colbert and Gaël Varoquaux},
TITLE = {The {NumPy} Array: A Structure for Efficient Numerical Computation},
JOURNAL = {Computing in Science \& Engineering},
VOLUME = {13},
NUMBER = {2},
PAGES = {22-30},
YEAR = {2011},
DOI = {10.1109/MCSE.2011.37},
URL = {https://aip.scitation.org/doi/abs/10.1109/MCSE.2011.37},
TITLE = {Array programming with {NumPy}},
AUTHOR = {Charles R. Harris and K. Jarrod Millman and St{\'{e}}fan J.
van der Walt and Ralf Gommers and Pauli Virtanen and David
Cournapeau and Eric Wieser and Julian Taylor and Sebastian
Berg and Nathaniel J. Smith and Robert Kern and Matti Picus
and Stephan Hoyer and Marten H. van Kerkwijk and Matthew
Brett and Allan Haldane and Jaime Fern{\'{a}}ndez del
R{\'{i}}o and Mark Wiebe and Pearu Peterson and Pierre
G{\'{e}}rard-Marchant and Kevin Sheppard and Tyler Reddy and
Warren Weckesser and Hameer Abbasi and Christoph Gohlke and
Travis E. Oliphant},
YEAR = {2020},
MONTH = sep,
JOURNAL = {Nature},
VOLUME = {585},
NUMBER = {7825},
PAGES = {357--362},
DOI = {10.1038/s41586-020-2649-2},
PUBLISHER = {Springer Science and Business Media {LLC}},
URL = {https://doi.org/10.1038/s41586-020-2649-2}
}

@ARTICLE{opendarts,
AUTHOR = {Denis Voskov and Ilshat Saifullin and Aleksei Novikov and Michiel Wapperom and Luisa Orozco and Gabriel Serrão Seabra and Yuan Chen and Mark Khait and Xiaocong Lyu and Xiaoming Tian and others},
TITLE = {open {D}elft {A}dvanced {R}esearch {T}erra {S}imulator (open-{DARTS})},
AUTHOR = {Denis Voskov and Ilshat Saifullin and Aleksei Novikov and
Michiel Wapperom and Luisa Orozco and Gabriel Serrão Seabra and
Yuan Chen and Mark Khait and Xiaocong Lyu and Xiaoming Tian and
Stephan de Hoop and Artur Palha},
TITLE = {open {D}elft {A}dvanced {R}esearch {T}erra {S}imulator
(open-{DARTS})},
JOURNAL = {Journal of Open Source Software},
YEAR = {2024},
VOLUME = {9},
VOLUME = {9},
NUMBER = {99},
PAGES = {6737}
PAGES = {6737},
DOI = {10.21105/joss.06737},
URL = {https://doi.org/10.21105/joss.06737},
}

@SOFTWARE{pyesmda,
AUTHOR = {Antoine Collet},
TITLE = {{pyESMDA - Python Ensemble Smoother with Multiple
Data Assimilation}},
MONTH = dec,
YEAR = 2022,
PUBLISHER = {Zenodo},
VERSION = {v0.3.2},
DOI = {10.5281/zenodo.7425670},
URL = {https://doi.org/10.5281/zenodo.7425670}
}
102 changes: 72 additions & 30 deletions docs/paper.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
title: "resmda: ES-MDA with a simple 2D reservoir modeller"
title: "dageo: Data Assimilation in Geosciences"
tags:
- python
- reservoir engineering
- geophysics
- data assimilation
- forecasting
- reservoir engineering
authors:
- name: Dieter Werthmüller
orcid: 0000-0002-8575-2484
Expand All @@ -21,49 +21,91 @@ affiliations:
index: 1
- name: ETH Zurich, CH
index: 2
- name: Petrobras, GABRIEL TODO, BR
- name: Petroleo Brasileiro S.A. (Petrobras), BR
index: 3
date: 31 December 2024
bibliography: paper.bib
---

# Summary

Data Assimilation (DA) combines computer models with real-world measurements to improve predictions. The `resmda` package implements the Ensemble Smoother with Multiple Data Assimilation (ES-MDA) method in Python, providing tools for reservoir engineering applications. The package includes localization for refined updates, gaussian random field generation for realistic permeability modeling, and integration capabilities with external simulators. At its core, `resmda` features an educational 2D single-phase reservoir simulator that models pressure changes and well behavior, making it valuable for both research and teaching.

The package also includes a educational 2D single phase reservoir simulator, which models pressure changes over time, and well behavior for both injection and production scenarios. This simulator is particularly useful for educational purposes, providing a practical platform for students and researchers to learn and experiment with data assimilation concepts. The software is well-documented, with extensive examples that guide users through learning ES-MDA concepts, testing new ideas, and applying methods to real-world problems. This makes `resmda` a resource for researchers, students, and practitioners in geoscience and reservoir engineering who need to understand and apply data assimilation techniques.

# Statement of Need

While ES-MDA is theoretically straightforward, practical implementation requires careful handling of matrix operations, ensemble management, and numerical stability. Existing implementations often lack documentation and educational examples, creating barriers for newcomers. `resmda` addresses these challenges through several key innovations: it provides a robust, tested ES-MDA implementation alongside a built-in educational reservoir simulator, while offering integration capabilities with external simulators like open-DARTS. The package includes advanced features such as localization and permeability field generation, all supported by comprehensive documentation and examples.
# Summary

Most available tools either focus solely on the algorithm or are tightly coupled to specific simulators. In contrast, `resmda` offers a complete ES-MDA implementation, a built-in reservoir simulator, integration capabilities with external simulators, and advanced features like localization and efficient permeability field generation. The ES-MDA algorithm works by iteratively updating an ensemble of model parameters to match observed data, using the following equation:
Data Assimilation (DA) combines computer models with real-world measurements to
improve predictions. The Python package `dageo` is a tool to apply DA in
geoscience applications. Currently, it implements the Ensemble Smoother with
Multiple Data Assimilation (ESMDA) method [@esmda] and provides tools for
reservoir engineering applications. The package includes localization for
refined updates, gaussian random field generation for realistic permeability
modeling, and integration capabilities with external simulators.

An additional feature of `dageo` is an educational, two-dimensional
single-phase reservoir simulator that models pressure changes over time and
well behavior for both injection and production scenarios. This simulator is
particularly useful for educational purposes, providing a practical platform
for students and researchers to learn and experiment with data assimilation
concepts. The software is well-documented, with examples that guide users
through learning ESMDA concepts, testing new ideas, and applying methods to
real-world problems. This makes `dageo` a resource for researchers, students,
and practitioners in geoscience and reservoir engineering who need to
understand and apply data assimilation techniques.


# ESMDA

While ESMDA is theoretically straightforward, practical implementation requires
careful handling of matrix operations, ensemble management, and numerical
stability. The ESMDA algorithm works by iteratively updating an ensemble of
model parameters to match observed data,

$$
m_j^a = m_j^f + C_\text{MD}^f \left(C_\text{DD}^f + \alpha C_\text{D}
\right)^{-1}\left(d_{\text{uc},j} - d_j^f \right)
z_j^a = z_j^f + C_\text{MD}^f \left(C_\text{DD}^f + \alpha C_\text{D}
\right)^{-1}\left(d_{\text{uc},j} - d_j^f \right) \ ,
$$

where $m_j^a$ represents the updated (analysis) parameters, $m_j^f$ the prior (forecast) parameters, and the $C$ terms represent various covariance matrices. The algorithm's implementation in `resmda` includes optimizations for computational efficiency and numerical stability.

# Key Features
where $z^a$ represents the updated (analysis) parameters, $z^f$ the prior
(forecast) parameters, and the $C$ terms represent various covariance matrices
for the data and the model parameters (subscripts D and M, respectively). The
ESMDA coefficient is denoted by $\alpha$, and the predicted and perturbed data
vectors by $d^f$ and $d_{\text{uc}}$, respectively. The algorithm's
implementation in `dageo` includes optimizations for computational efficiency
and numerical stability.


# Key Features and Applications

Existing implementations often lack documentation and educational examples,
creating barriers for newcomers. These challenges are addressed in `dageo`
through several key innovations: it provides a robust, tested ESMDA
implementation alongside a built-in educational reservoir simulator, while
offering, as a key feature, integration capabilities with external simulators.
The gallery contains an example of this integration with the \emph{open Delft
Advanced Research Terra Simulator} `open-DARTS` [@opendarts], a
state-of-the-art, open-source reservoir simulation framework developed at TU
Delft. It demonstrates how `dageo` can be used with industry-standard
simulators while maintaining its user-friendly interface. The code itself is
light, building upon the NumPy arrays [@NumPy] and sparse matrices provided by
SciPy [@SciPy] as dependencies.

While other ESMDA implementations exist, e.g., `pyesmda` [@pyesmda], `dageo`
distinguishes itself through comprehensive documentation and examples, the
integration of a simple but practical reservoir simulator, the implementation
of advanced features like localization techniques for parameter updates,
gaussian random field generation for realistic permeability modeling, and a
focus on educational applications. This makes `dageo` a unique and valuable
tool for both research and teaching. The software has been used in several
research projects, including reservoir characterization studies at TU Delft,
integration with the DARTS simulator for geothermal applications, and
educational workshops on data assimilation techniques. These applications
highlight the software's versatility and its ability to address a wide range of
challenges in reservoir engineering and geoscience.

A key feature of `resmda` is its ability to integrate with external simulators. A prime example is its integration with open-DARTS (open Delft Advanced Research Terra Simulator) [@voskov2024open], a state-of-the-art open-source reservoir simulation framework developed at TU Delft. This integration is documented in the package examples, showing how `resmda` can be used with industry-standard simulators while maintaining its user-friendly interface.

The software implements several features to enhance its functionality. These include localization techniques for parameter updates, gaussian random field generation for realistic permeability modeling, .... INCLUDE HERE MORE FEATURES.

# Research Applications

The software has been used in several research projects, including reservoir characterization studies at TU Delft, integration with the DARTS simulator for geothermal applications, and educational workshops on data assimilation techniques. These applications highlight the software's versatility and its ability to address a wide range of challenges in reservoir engineering and geoscience.

# Comparison with Existing Software - NEEDS TO BE ENHANCED

While other ES-MDA implementations exist, such as pyesmda and esmda, `resmda` distinguishes itself through comprehensive documentation and examples, the integration of a simple but practical reservoir simulator, the implementation of advanced features like localization, and a focus on educational applications. This makes `resmda` a unique and valuable tool for both research and teaching.

# Acknowledgements

This work was supported by the [Delphi Consortium](https://www.delphi-consortium.com). The authors thank Dr. D.V. Voskov for his insights on reservoir simulation implementation.
This work was supported by the [Delphi
Consortium](https://www.delphi-consortium.com). The authors thank Dr. D.V.
Voskov for his insights on reservoir simulation implementation.

# References

# References

0 comments on commit aa3f902

Please sign in to comment.