[Opm] Use external mesh with Flow OPM and unstructured meshes

Atgeirr Rasmussen Atgeirr.Rasmussen at sintef.no
Thu Oct 22 10:51:19 UTC 2020


Hi Antoine,

For the exporting from MRST you can look in the deckformat module, the experimental section: https://bitbucket.org/mrst/mrst-model-io/src/master/deckformat/experimental/
I do not know the details of this, though.

For reading an external mesh, opm-grid would be the right place, however there are many ways to do this, and it would be good to have a discussion. In brief, you could either add an alternative way of constructing to the CpGrid class, use a different grid class from Dune that supports the kind of grid you need, or writing an entirely new grid class.

Atgeirr
________________________________
From: Opm <opm-bounces at opm-project.org> on behalf of Antoine B Jacquey <ajacquey at mit.edu>
Sent: 19 October 2020 14:01
To: opm at opm-project.org <opm at opm-project.org>
Subject: Re: [Opm] Use external mesh with Flow OPM and unstructured meshes

Hi Atgeirr,

Thanks for the information.
People in my group use MRST indeed and we are trying to use OPM for some of the work we do with MRST now.

Both of the options you mentioned are quite interesting. I think in the long-term we (people In my group and I) will implement something directly in C++ to read external meshes but the trick with the NNC keyword might work in the meantime for us.

- Could you explain in more details how to export the grid to OPM (using NNC)  from MRST please?
- Where should I look in the OPM code to implement the reading of an external mesh? In opm-grid?

Thank you in advance.
Best,

Antoine

> On Sep 30, 2020, at 02:45, Atgeirr Rasmussen <Atgeirr.Rasmussen at sintef.no> wrote:
>
> Hi Antoine,
>
> For OPM Flow, the computational mesh is always generated based on the DATA file. We support both simple cartesian grids as you have observed, and more complex corner-point grids. There is a very brief explanation on page 277 of the OPM Flow reference manual (2020.04 version). (See the paper by Ponting https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.earthdoc.org%2Fcontent%2Fpapers%2F10.3997%2F2214-4609.201411305&data=04%7C01%7CAtgeirr.Rasmussen%40sintef.no%7Ca61a2ae1658e4f1c2e4908d87426e4cc%7Ce1f00f39604145b0b309e0210d8b32af%7C1%7C0%7C637387057698449153%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=OEp%2B67qnEzouvy11cvs46N7BpmcS7LLvOSq4LkQ2opw%3D&reserved=0 for more information on that grid type.)
>
> While it is currently not possible to use arbitrary meshes, the core of the simulator allows arbitrary unstructured topology. Therefore, it is possible to extend the simulator to support reading any type of mesh, but that would require some C++ work. There is a workaround however, that can be used: The NNC keyword (in the DATA file) allows us to set up arbitrary connections between cells. By combining a "fake" grid where no cells are connected in the usual manner, and explicitly making all connections using the NNC facility, this allows almost arbitrary setups. However, "converting" a mesh to such a thing would require a bit of work, and you also need to explicitly give the transmissibilities (for the Finite Volume two-point flux approximation scheme) connecting each pair of cells.
>
> You may find MRST (the MATLAB Reservoir Simulation Toolbox) of interest. It supports reading a wider range of input formats, you can simulate a wide variety of scenarios (including black oil and compositional), and there also exists tools to export grids to OPM by using the NNC "trick" described above.
>
> Good luck,
> Atgeirr
> ________________________________
> From: Opm <opm-bounces at opm-project.org> on behalf of Antoine B Jacquey <ajacquey at mit.edu>
> Sent: 30 September 2020 00:13
> To: opm at opm-project.org <opm at opm-project.org>
> Subject: [Opm] Use external mesh with Flow OPM and unstructured meshes
>
> Hi all,
>
> I am relatively new in using OPM and I am still exploring the capabilities of the Flow simulator.
> In the tutorial (SPE!CASE1), I saw that the mesh is generated “on the fly” based on input parameters given in the .DATA file.
>
> Is it possible to read a mesh file generated beforehand?
> If yes, could you point out an example of this?
>
> And second question: is it possible to use unstructured meshes with Flow?
> I would like to consider reservoir models with fractures/faults represented as lower dimensional elements. Is this supported by Flow yet?
>
> Thank you very much in advance.
>
> Best,
>
> Antoine
> _______________________________________________
> Opm mailing list
> Opm at opm-project.org
> https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fopm-project.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fopm&data=04%7C01%7CAtgeirr.Rasmussen%40sintef.no%7Ca61a2ae1658e4f1c2e4908d87426e4cc%7Ce1f00f39604145b0b309e0210d8b32af%7C1%7C0%7C637387057698449153%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=oqQrhoKtx4cdJuI85sy6FMjLW960Gr%2FF%2FcKbCKuspnA%3D&reserved=0



More information about the Opm mailing list