StrataTrapper

Advanced modelling of CO2 migration and trapping.
https://github.com/imperialcollegelondon/stratatrapper

Category: Emissions
Sub Category: Carbon Capture

Keywords

capillary-pressure carbon-dioxide co2 co2-storage heterogeneity matlab opm-flow pflotran porous-media-flow reservoir-simulation upscaling

Last synced: about 9 hours ago
JSON representation

Repository metadata

Field scale model generation and upscaling toolkit

README.md

Field scale model generation and upscaling toolkit

Repository: github.com/ImperialCollegeLondon/StrataTrapper

build
GitHub Tag
GitHub Release Date
License
DOI

StrataTrapper logo

The StrataTrapper codes

This is the StrataTrapper upscaling toolkit.
It can also generate heterogeneous fine-scale models with specific correlation lengths
to re-upscale given coarse-scale two-phase flow models.

Another tool is the reduced-physics model CO2GraVISim.

In StrataTrapper-models
repository, we publish field-scale models upscaled with StrataTrapper.

Structure

Top-level scripts and functions are in the repository root,
and the rest is 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.

Running

  1. Run startup.m to setup MATLAB Path.
    1. Optional: start a parallel pool to run computations there.
  2. Read or generate target coarse grid dimensions
    and input fine-scale porosity and permeability for each coarse block.
  3. Setup input rock-fluid properties and algorithm options represented by
    Params and Options classes.
    Pass an array of Params for multiple-region models.
  4. Create integer mask to:
    • filter out impermeable cells
      and/or compute an arbitrary subset of cells by putting 0s
    • Put index n of the input array of Params
      to map coarse cells to the corresponding regions
  5. Run strata_trapper function
    with arbitrary number of parallel workers
    optionally enabling a UI progress bar.
  6. Visualise outputs with plot_result function
  7. Export the outputs to PFLOTRAN-OGS
    or OPM Flow format
    using ogs_export
    or opm_export function, respectively.

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.

MEX acceleration

We provide the CodeGenMex class to automatically build
a MEX-accelerated version of the upscale function.

% 1. compile MEX functions
codegen_mex = CodeGenMex().config().build();

% 2. use strata_trapper normally
...

% 3. recompile MEX functions when the source code changes
codegen_mex.build();

% 4. delete MEX functions to use the original
codegen_mex.clear();

Requires MATLAB Coder.

Versions

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.

Contributing

Everyone is welcome to open
issues and
pull requests.

References

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

Citation (CITATION.cff)

# https://github.com/citation-file-format/citation-file-format
cff-version: 1.2.0
title: "StrataTrapper upscaling toolkit"
message: >-
  If you use this software,
  please put the copyright NOTICE.txt in your developments
  and cite using CITATION.cff provided in the repository
  or generated by Zenodo
authors:
  - &djmaxus
    family-names: Elizarev
    given-names: Maksim
    alias: djmaxus
    orcid: "https://orcid.org/0000-0002-5279-2877"
    website: "https://djmaxus.dev"
  - family-names: Jackson
    given-names: Samuel J
  - family-names: An
    given-names: Senyou
  - family-names: Wenck
    given-names: Nele
  - family-names: Muggeridge
    given-names: Ann
  - &skrevor
    family-names: Krevor
    given-names: Samuel
doi: "10.5281/zenodo.15438164"
contact:
  - *djmaxus
  - *skrevor
keywords:
  - MATLAB
  - CO2
  - upscaling
  - carbon dioxide
  - heterogeneity
  - reservoir simulation
  - porous media flow
  - pflotran
  - capillary pressure
  - CO2 storage
license: BSD-3-Clause
repository-code: "https://github.com/ImperialCollegeLondon/StrataTrapper"
type: software
url: "https://imperialcollegelondon.github.io/StrataTrapper/"

Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 2 days ago

Total Commits: 295
Total Committers: 5
Avg Commits per committer: 59.0
Development Distribution Score (DDS): 0.288

Commits in past year: 148
Committers in past year: 3
Avg Commits per committer in past year: 49.333
Development Distribution Score (DDS) in past year: 0.216

Name Email Commits
Max Elizarev 4****s 210
Senyou An 3****n 40
github-actions[bot] 4****] 27
dependabot[bot] 4****] 17
skrevor 4****r 1

Issue and Pull Request metadata

Last synced: 2 days ago

Total issues: 15
Total pull requests: 265
Average time to close issues: 25 days
Average time to close pull requests: 1 day
Total issue authors: 1
Total pull request authors: 4
Average comments per issue: 0.13
Average comments per pull request: 0.12
Merged pull request: 204
Bot issues: 0
Bot pull requests: 94

Past year issues: 11
Past year pull requests: 118
Past year average time to close issues: about 1 month
Past year average time to close pull requests: 1 day
Past year issue authors: 1
Past year pull request authors: 3
Past year average comments per issue: 0.18
Past year average comments per pull request: 0.14
Past year merged pull request: 91
Past year bot issues: 0
Past year bot pull requests: 50

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/imperialcollegelondon/stratatrapper

Top Issue Authors

  • djmaxus (15)

Top Pull Request Authors

  • djmaxus (167)
  • github-actions[bot] (70)
  • dependabot[bot] (24)
  • skrevor (4)

Top Issue Labels

  • feature (4)
  • infrastructure (4)
  • optimisation (2)
  • github_actions (2)
  • documentation (1)
  • bug (1)
  • good first issue (1)
  • enhancement (1)

Top Pull Request Labels

  • autorelease: pending (45)
  • dependencies (24)
  • autorelease: tagged (22)
  • github_actions (20)
  • feature (9)
  • bug (4)
  • documentation (2)

Score: 4.700480365792417