Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/license #74

Merged
merged 2 commits into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/commit-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
on:
push:
branches: ["main", "dev"]
pull_request:
branches: ["main", "dev"]
jobs:
commitlint:
runs-on: ubuntu-latest
steps:
- uses: opensource-nepal/commitlint@v1
17 changes: 17 additions & 0 deletions .github/workflows/markdownlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
on:
push:
branches: ["main", "dev"]
pull_request:
branches: ["main", "dev"]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DavidAnson/markdownlint-cli2-action@v18
with:
fix: true
globs: |
**/*.md
!CHANGELOG.md
28 changes: 28 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
BSD 3-Clause License

Copyright (c) 2024, Maksim Elizarev

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
201 changes: 0 additions & 201 deletions LICENSE-APACHE.md

This file was deleted.

46 changes: 30 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@

Repository: [github.com/ImperialCollegeLondon/StrataTrapper](https://github.com/ImperialCollegeLondon/StrataTrapper)

![build](https://github.com/ImperialCollegeLondon/StrataTrapper/actions/workflows/matlab-ci.yml/badge.svg)
![GitHub Tag](https://img.shields.io/github/v/tag/ImperialCollegeLondon/StrataTrapper?sort=semver&style=flat&label=version)
![GitHub Release Date](https://img.shields.io/github/release-date/ImperialCollegeLondon/StrataTrapper?display_date=published_at&style=flat&label=dated)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
![build](https://github.com/ImperialCollegeLondon/StrataTrapper/actions/workflows/matlab-ci.yml/badge.svg)
[![License](https://img.shields.io/badge/License-BSD_3--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)

* [The StrataTrapper codes](#the-stratatrapper-codes)
* [Structure](#structure)
Expand All @@ -20,15 +19,18 @@ Repository: [github.com/ImperialCollegeLondon/StrataTrapper](https://github.com/
## 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.
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](https://github.com/ajobutler/CO2GraVISim).

In [`StrataTrapper-models`](https://github.com/ImperialCollegeLondon/StrataTrapper-models) repository, we publish field-scale models upscaled with StrataTrapper.
In [`StrataTrapper-models`](https://github.com/ImperialCollegeLondon/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/`](src) folder.
Top-level scripts and functions are in the repository root,
and the rest is in [`src/`](src) folder.

[`demo.m`](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.
Expand All @@ -41,17 +43,22 @@ Feel free to play with it and use as an example for your own scripts.
and input fine-scale porosity and permeability for each coarse block.
3. Setup input rock-fluid properties and algorithm options represented by
[`Params`](src/Params.m) and [`Options`](src/Options.m) classes.
4. Create logical `mask` to filter out impermeable cells and/or define an arbitrary subset of cells to process.
5. Run [`strata_trapper`](strata_trapper.m) function with arbitrary number of parallel workers
4. Create logical `mask` to filter out impermeable cells
and/or define an arbitrary subset of cells to process.
5. Run [`strata_trapper`](strata_trapper.m) function
with arbitrary number of parallel workers
optionally enabling a UI progress bar.
6. Visualise outputs with [`plot_result`](plot_result.m) function
7. Export the outputs to [PFLOTRAN-OGS](https://docs.opengosim.com/)-compatible text files using [`ogs_export`](ogs_export.m) function.
7. Export the outputs to [PFLOTRAN-OGS](https://docs.opengosim.com/)-compatible
text files using [`ogs_export`](ogs_export.m) function.

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.
* 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.

## Versions

Expand All @@ -61,17 +68,24 @@ so it may worth attention as much as later versions.

[CHANGELOG.md](CHANGELOG.md) describes the version history and key changes.

Other versions can be accessed via [tags](https://github.com/ImperialCollegeLondon/StrataTrapper/tags) and [releases](https://github.com/ImperialCollegeLondon/StrataTrapper/releases) sections of the repository.
Other versions can be accessed via
[tags](https://github.com/ImperialCollegeLondon/StrataTrapper/tags) and
[releases](https://github.com/ImperialCollegeLondon/StrataTrapper/releases)
sections of the repository.

## Contributing

Everyone is welcome to open [issues](https://github.com/ImperialCollegeLondon/StrataTrapper/issues) and [pull requests](https://github.com/ImperialCollegeLondon/StrataTrapper/pulls).
Everyone is welcome to open
[issues](https://github.com/ImperialCollegeLondon/StrataTrapper/issues) and
[pull requests](https://github.com/ImperialCollegeLondon/StrataTrapper/pulls).

## References

The StrataTrapper algorithm as well as motivation and theory behind it are in the paper:
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**\
> **Small-Scale Capillary Heterogeneity**
> **Linked to Rapid Plume Migration During CO2 Storage**\
> *Geophysical Research Letters* | 2020\
> <https://doi.org/10.1029/2020GL088616>
Loading