{"id":346337,"name":"StrataTrapper","description":"Advanced modelling of CO2 migration and trapping.","url":"https://github.com/imperialcollegelondon/stratatrapper","last_synced_at":"2026-04-13T23:00:46.392Z","repository":{"id":228976029,"uuid":"741567808","full_name":"ImperialCollegeLondon/StrataTrapper","owner":"ImperialCollegeLondon","description":"Field scale model generation and upscaling toolkit","archived":false,"fork":false,"pushed_at":"2026-04-07T15:52:39.000Z","size":21641,"stargazers_count":12,"open_issues_count":5,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-04-11T22:00:15.898Z","etag":null,"topics":["capillary-pressure","carbon-dioxide","co2","co2-storage","heterogeneity","matlab","opm-flow","pflotran","porous-media-flow","reservoir-simulation","upscaling"],"latest_commit_sha":null,"homepage":"https://imperialcollegelondon.github.io/StrataTrapper","language":"MATLAB","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ImperialCollegeLondon.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE.txt","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-01-10T17:00:18.000Z","updated_at":"2026-04-07T15:52:16.000Z","dependencies_parsed_at":"2026-03-01T21:10:24.489Z","dependency_job_id":null,"html_url":"https://github.com/ImperialCollegeLondon/StrataTrapper","commit_stats":null,"previous_names":["imperialcollegelondon/stratatrapper"],"tags_count":30,"template":false,"template_full_name":null,"purl":"pkg:github/ImperialCollegeLondon/StrataTrapper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ImperialCollegeLondon%2FStrataTrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ImperialCollegeLondon%2FStrataTrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ImperialCollegeLondon%2FStrataTrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ImperialCollegeLondon%2FStrataTrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ImperialCollegeLondon","download_url":"https://codeload.github.com/ImperialCollegeLondon/StrataTrapper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ImperialCollegeLondon%2FStrataTrapper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31774547,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T20:17:16.280Z","status":"ssl_error","status_checked_at":"2026-04-13T20:17:08.216Z","response_time":93,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"owner":{"login":"ImperialCollegeLondon","name":"Imperial College London","uuid":"1220306","kind":"organization","description":"Imperial College main code repository","email":"icgithub-support@imperial.ac.uk","website":null,"location":"Imperial College London","twitter":null,"company":null,"icon_url":"https://avatars.githubusercontent.com/u/1220306?v=4","repositories_count":311,"last_synced_at":"2023-03-14T09:25:14.124Z","metadata":{"has_sponsors_listing":false},"html_url":"https://github.com/ImperialCollegeLondon","funding_links":[],"total_stars":null,"followers":null,"following":null,"created_at":"2022-11-03T06:03:26.030Z","updated_at":"2023-03-14T09:25:14.177Z","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ImperialCollegeLondon","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ImperialCollegeLondon/repositories"},"packages":[],"commits":{"id":4089314,"full_name":"imperialcollegelondon/stratatrapper","default_branch":"master","total_commits":315,"total_committers":6,"total_bot_commits":52,"total_bot_committers":2,"mean_commits":52.5,"dds":0.29841269841269846,"past_year_total_commits":101,"past_year_total_committers":4,"past_year_total_bot_commits":29,"past_year_total_bot_committers":2,"past_year_mean_commits":25.25,"past_year_dds":0.29702970297029707,"last_synced_at":"2026-04-11T22:01:28.081Z","last_synced_commit":"401538fb73e5e5cd3582a06b0a264c01ff93bf26","created_at":"2024-11-06T01:35:34.856Z","updated_at":"2026-04-11T22:01:12.994Z","committers":[{"name":"Max Elizarev","email":"44438314+djmaxus","login":"djmaxus","count":221},{"name":"Senyou An","email":"38350790+senyouan","login":"senyouan","count":40},{"name":"github-actions[bot]","email":"41898282+github-actions[bot]","login":"github-actions[bot]","count":30},{"name":"dependabot[bot]","email":"49699333+dependabot[bot]","login":"dependabot[bot]","count":22},{"name":"skrevor","email":"44003521+skrevor","login":"skrevor","count":1},{"name":"GitHub Copilot","email":"github-copilot","login":"github-copilot","count":1}],"past_year_committers":[{"name":"Max Elizarev","email":"44438314+djmaxus","login":"djmaxus","count":71},{"name":"dependabot[bot]","email":"49699333+dependabot[bot]","login":"dependabot[bot]","count":19},{"name":"github-actions[bot]","email":"41898282+github-actions[bot]","login":"github-actions[bot]","count":10},{"name":"GitHub Copilot","email":"github-copilot","login":"github-copilot","count":1}],"commits_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub/repositories/imperialcollegelondon%2Fstratatrapper/commits","host":{"name":"GitHub","url":"https://github.com","kind":"github","last_synced_at":"2026-04-13T00:00:06.408Z","repositories_count":6213109,"commits_count":903863507,"contributors_count":34932979,"owners_count":1144159,"icon_url":"https://github.com/github.png","host_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub/repositories"}},"issues_stats":{"full_name":"imperialcollegelondon/stratatrapper","html_url":"https://github.com/imperialcollegelondon/stratatrapper","last_synced_at":"2026-04-13T20:02:35.533Z","status":null,"issues_count":16,"pull_requests_count":273,"avg_time_to_close_issue":2104178.076923077,"avg_time_to_close_pull_request":168204.272,"issues_closed_count":13,"pull_requests_closed_count":250,"pull_request_authors_count":4,"issue_authors_count":1,"avg_comments_per_issue":0.125,"avg_comments_per_pull_request":0.13186813186813187,"merged_pull_requests_count":212,"bot_issues_count":0,"bot_pull_requests_count":99,"past_year_issues_count":7,"past_year_pull_requests_count":63,"past_year_avg_time_to_close_issue":5248714.0,"past_year_avg_time_to_close_pull_request":402551.2363636364,"past_year_issues_closed_count":5,"past_year_pull_requests_closed_count":55,"past_year_pull_request_authors_count":3,"past_year_issue_authors_count":1,"past_year_avg_comments_per_issue":0.0,"past_year_avg_comments_per_pull_request":0.15873015873015872,"past_year_bot_issues_count":0,"past_year_bot_pull_requests_count":38,"past_year_merged_pull_requests_count":47,"created_at":"2024-11-06T01:35:35.059Z","updated_at":"2026-04-13T20:02:35.533Z","repository_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/imperialcollegelondon%2Fstratatrapper","issues_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/imperialcollegelondon%2Fstratatrapper/issues","issue_labels_count":{"feature":4,"infrastructure":4,"github_actions":2,"bug":2,"optimisation":2,"enhancement":1,"documentation":1,"good first issue":1},"pull_request_labels_count":{"autorelease: pending":45,"dependencies":27,"autorelease: tagged":24,"github_actions":24,"feature":10,"bug":5,"documentation":3,"refactor":1,"enhancement":1},"issue_author_associations_count":{"COLLABORATOR":16},"pull_request_author_associations_count":{"COLLABORATOR":174,"CONTRIBUTOR":92,"NONE":7},"issue_authors":{"djmaxus":16},"pull_request_authors":{"djmaxus":170,"github-actions[bot]":72,"dependabot[bot]":27,"skrevor":4},"host":{"name":"GitHub","url":"https://github.com","kind":"github","last_synced_at":"2026-04-13T00:00:15.727Z","repositories_count":14247510,"issues_count":34609482,"pull_requests_count":113069211,"authors_count":11233783,"icon_url":"https://github.com/github.png","host_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories","owners_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/owners","authors_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors"},"past_year_issue_labels_count":{"infrastructure":3,"feature":2,"bug":2,"github_actions":2,"optimisation":2,"enhancement":1,"good first issue":1},"past_year_pull_request_labels_count":{"github_actions":22,"dependencies":21,"autorelease: pending":8,"autorelease: tagged":7,"feature":6,"bug":5,"refactor":1,"documentation":1,"enhancement":1},"past_year_issue_author_associations_count":{"COLLABORATOR":7},"past_year_pull_request_author_associations_count":{"CONTRIBUTOR":38,"COLLABORATOR":25},"past_year_issue_authors":{"djmaxus":7},"past_year_pull_request_authors":{"djmaxus":25,"dependabot[bot]":21,"github-actions[bot]":17},"maintainers":[{"login":"djmaxus","count":186,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/djmaxus"},{"login":"skrevor","count":4,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/skrevor"}],"active_maintainers":[{"login":"djmaxus","count":32,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/djmaxus"}]},"events":{"total":{"ReleaseEvent":11,"DeleteEvent":71,"PullRequestEvent":157,"IssuesEvent":26,"WatchEvent":9,"IssueCommentEvent":21,"PushEvent":267,"PullRequestReviewCommentEvent":24,"PullRequestReviewEvent":63,"CreateEvent":91},"last_year":{"ReleaseEvent":2,"DeleteEvent":35,"PullRequestEvent":58,"IssuesEvent":9,"WatchEvent":3,"IssueCommentEvent":7,"PushEvent":111,"PullRequestReviewCommentEvent":24,"PullRequestReviewEvent":43,"CreateEvent":36}},"keywords":["capillary-pressure","carbon-dioxide","co2","co2-storage","heterogeneity","matlab","opm-flow","pflotran","porous-media-flow","reservoir-simulation","upscaling"],"dependencies":[],"score":4.624972813284272,"created_at":"2026-02-24T00:10:38.040Z","updated_at":"2026-04-13T23:00:46.394Z","avatar_url":"https://github.com/ImperialCollegeLondon.png","language":"MATLAB","category":"Emissions","sub_category":"Carbon Capture","monthly_downloads":0,"total_dependent_repos":0,"total_dependent_packages":0,"readme":"# Field scale model generation and upscaling toolkit\n\nRepository: [github.com/ImperialCollegeLondon/StrataTrapper](https://github.com/ImperialCollegeLondon/StrataTrapper)\n\n![build](https://github.com/ImperialCollegeLondon/StrataTrapper/actions/workflows/ci.yml/badge.svg?branch=main)\n![GitHub Tag](https://img.shields.io/github/v/tag/ImperialCollegeLondon/StrataTrapper?sort=semver\u0026style=flat\u0026label=version)\n![GitHub Release Date](https://img.shields.io/github/release-date/ImperialCollegeLondon/StrataTrapper?display_date=published_at\u0026style=flat\u0026label=dated)\n[![License](https://img.shields.io/badge/License-BSD_3--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.15438164.svg)](https://doi.org/10.5281/zenodo.15438164)\n\n* [The StrataTrapper codes](#the-stratatrapper-codes)\n* [Structure](#structure)\n* [Running](#running)\n* [Output compression](#output-compression)\n* [MEX acceleration](#mex-acceleration)\n* [Versions](#versions)\n* [Contributing](#contributing)\n* [References](#references)\n\n![StrataTrapper logo](./img/StrataTrapper.jpg)\n\n## The StrataTrapper codes\n\nThis is the StrataTrapper **upscaling toolkit**.\nIt can also generate heterogeneous fine-scale models with specific correlation lengths\nto re-upscale given coarse-scale two-phase flow models.\n\nAnother tool is the **reduced-physics model** [CO2GraVISim](https://github.com/ajobutler/CO2GraVISim).\n\nIn [`StrataTrapper-models`](https://github.com/ImperialCollegeLondon/StrataTrapper-models)\nrepository, we publish field-scale models upscaled with StrataTrapper.\n\n## Structure\n\nTop-level scripts and functions are in the repository root,\nand the rest is in [`src/`](src) folder.\n\n[`demo.m`](demo.m) script is an implementation of the running guideline below.\\\nFeel free to play with it and use as an example for your own scripts.\n\n## Running\n\n1. Run [`startup.m`](startup.m) to setup MATLAB Path.\n   1. Optional: start a parallel pool to run computations there.\n2. Read or generate target coarse grid dimensions\nand input fine-scale porosity and permeability for each coarse block.\n3. Setup input rock-fluid properties and algorithm options represented by\n  [`Params`](src/Params.m) and [`Options`](src/Options.m) classes.\n  Pass an array of `Params` for multiple-region models.\n4. Create integer `mask` to:\n    * filter out impermeable cells\n    and/or compute an arbitrary subset of cells by putting `0`s\n    * Put index `n` of the input array of `Params`\n    to map coarse cells to the corresponding regions\n5. Run [`strata_trapper`](src/strata_trapper.m) function\nwith arbitrary number of parallel workers\noptionally enabling a UI progress bar.\n6. Visualise outputs with [`plot_result`](src/plot_result.m) function\n7. Export the outputs to [PFLOTRAN-OGS](https://docs.opengosim.com/)\nor [OPM Flow](https://opm-project.org/?page_id=19) format\nusing [`ogs_export`](src/export/ogs_export.m)\nor [`opm_export`](src/export/opm_export.m) function, respectively.\n\nTips:\n\n* Usually, MATLAB runs `startup.m` scripts automatically\nif they are in a startup folder.\n* The heaviest part of the algorithm is essentially parallel with no synchronisation.\nSo, using several parallel workers usually results\nin a proportional performance boost.\n\n## Output compression\n\nBy default, `strata_trapper` outputs one set of saturation tables\n**per coarse cell per direction**.\nSuch a number might be found too big in some situations.\n\nWith [`quantize`](src/compress/quantize.m),\ntoolkit can now compress the set of saturation tables\nif they are similar enough or the acceptable approximation error is high.\n\nRead [compression README](src/compress/README.md) for more details.\n\n## MEX acceleration\n\nWe provide the `CodeGenMex` class to automatically build\na MEX-accelerated version of computationally-demanding functions\nsuch as [`upscale`](src/upscale.m).\n\n```matlab\n% 1. compile MEX functions\ncodegen_mex = CodeGenMex().config().build();\n\n% 2. use strata_trapper normally\n...\n\n% 3. recompile MEX functions when the source code changes\ncodegen_mex.build();\n\n% 4. delete MEX functions to use the original\ncodegen_mex.clear();\n```\n\nRequires [MATLAB Coder](https://uk.mathworks.com/products/matlab-coder.html).\n\n## Versions\n\nThe original version of the toolkit is [v0.1.0](https://github.com/ImperialCollegeLondon/StrataTrapper/tree/v0.1.0).\\\nIt has its own structure and some unique functionality,\\\nso it may worth attention as much as later versions.\n\n[CHANGELOG.md](CHANGELOG.md) describes the version history and key changes.\n\nOther versions can be accessed via\n[tags](https://github.com/ImperialCollegeLondon/StrataTrapper/tags) and\n[releases](https://github.com/ImperialCollegeLondon/StrataTrapper/releases)\nsections of the repository.\n\n## Contributing\n\nEveryone is welcome to open\n[issues](https://github.com/ImperialCollegeLondon/StrataTrapper/issues) and\n[pull requests](https://github.com/ImperialCollegeLondon/StrataTrapper/pulls).\n\n## References\n\nThe StrataTrapper algorithm as well as motivation\nand theory behind it are in the paper:\n\n\u003e Samuel J. Jackson, Samuel Krevor\\\n\u003e **Small-Scale Capillary Heterogeneity**\n\u003e **Linked to Rapid Plume Migration During CO2 Storage**\\\n\u003e *Geophysical Research Letters* | 2020\\\n\u003e \u003chttps://doi.org/10.1029/2020GL088616\u003e\n","funding_links":[],"readme_doi_urls":["https://doi.org/10.5281/zenodo.15438164","https://doi.org/10.1029/2020GL088616"],"works":{},"citation_counts":{},"total_citations":0,"keywords_from_contributors":[],"project_url":"https://ost.ecosyste.ms/api/v1/projects/346337","html_url":"https://ost.ecosyste.ms/projects/346337"}