Field scale model generation and upscaling toolkit
This is the StrataTrapper upscaling toolkit. It generates heterogeneous fine-scale models with specific correlation lengths to update coarse-scale two-phase flow models.
Another tool is the reduced-physics model CO2GraVISim.
Top-level scripts and functions are in the repository root, and the rest in in src/
folder.
demo.m
script is an implementation of the running guideline below.
Feel free to play with it and use as an example for your own scripts.
- Run
stratup.m
to setup MATLAB Path. - [optional] Start a parallel pool to run computations there.
- Setup reservoir model properties and algorithm options in the same format as produced by
gen_params
andgen_options
functions. - Create logical
mask
to filter out impermeable cells and/or define an arbitrary subset of cells to process. - Run
strata_trapper
function with all those arguments optionally enabling a UI progress bar. - Export the outputs to PFLOTRAN-OGS-compatible text files using
ogs_export
function. - Interact and visualise outputs the same way as in the demo script or any other way of your preference.
Tips:
- Usually, MATLAB runs
startup.m
scripts automatically if they are in a startup folder. - The heaviest part of the algorithm is essentially parallel with no synchronisation.
So, using several parallel workers usually results in a proportional performance boost.
The original version of the toolkit is v0.1.0.
It has its own structure and some unique functionality,
so it may worth attention as much as later versions.
CHANGELOG.md describes the version history and key changes.
Other versions can be accessed via tags and releases sections of the repository.
Everyone is welcome to open issues and pull requests.
The StrataTrapper algorithm as well as motivation and theory behind it are in the paper:
Samuel J. Jackson, Samuel Krevor
Small-Scale Capillary Heterogeneity Linked to Rapid Plume Migration During CO2 Storage
Geophysical Research Letters | 2020
https://doi.org/10.1029/2020GL088616