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

Atgeirr Rasmussen Atgeirr.Rasmussen at sintef.no
Tue Dec 1 07:27:17 UTC 2020


Hi,

> So, does that mean that OPM reads the proper geometry and it’s just the VTK output which is unreadable?

With the NNC "trick", it is not precise to say that OPM reads the proper geometry, however it should read the correct topology, and sufficient geometry-dependent data (transmissibilities, volumes, depths) to make it possible to run correctly. The VTK output really needs proper geometry to be useful, as you observe.

> Alright, thanks for pointing out to the Dune ALUGrid class. Do you make any use of this class in OPM?

Not in the current master branch, which uses the CpGrid class. But it is possible to make a modified version using a different Dune grid. Recently in https://github.com/OPM/opm-simulators/pull/2912, Tor Harald Sandve added a version of Flow using the PolyhedralGrid class (also found in opm-grid), for example.

Atgeirr
________________________________
From: Opm <opm-bounces at opm-project.org> on behalf of Antoine B Jacquey <ajacquey at mit.edu>
Sent: 01 December 2020 02:29
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 your answer.
So, does that mean that OPM reads the proper geometry and it’s just the VTK output which is unreadable?

It’s difficult to say if the simulation produced the expected results, I cannot really judge from the VTK output. But the simulator converges for hexahedra mesh but did not converge for the tetrahedra mesh.

Alright, thanks for pointing out to the Dune ALUGrid class. Do you make any use of this class in OPM?

Thanks.
Best,

Antoine

> On Nov 17, 2020, at 07:37, Atgeirr Rasmussen <Atgeirr.Rasmussen at sintef.no <mailto:Atgeirr.Rasmussen at sintef.no>> wrote:
>
> Hi Antoine,
>
> The trick you used does not tell OPM in any way that the grid is tetrahedral or hexahedral, it just provides the necessary data as a soup of volumes and connections, and not as a proper grid. The VTK output assumes that we have a proper grid.
>
> Did the simulation produce expected results?
>
> About tetrahedra: The Dune ALUGrid class provides this. However, the two-point flux approximation (TPFA) method used in Flow is not consistent in general (only on K-orthogonal grids), so it is likely to be a bad discretization method for your tetrahedral grid! (If you were to make Voronoi-cell (or PEBI) grids on the other hand, it should work very well.)
>
> Atgeirr
> ________________________________
> From: Opm <opm-bounces at opm-project.org <mailto:opm-bounces at opm-project.org>> on behalf of Antoine B Jacquey <ajacquey at mit.edu <mailto:ajacquey at mit.edu>>
> Sent: 16 November 2020 15:24
> To: opm at opm-project.org <mailto:opm at opm-project.org> <opm at opm-project.org <mailto:opm at opm-project.org>>
> Subject: Re: [Opm] Use external mesh with Flow OPM and unstructured meshes
>
> Hi Atgeirr and the OPM community,
>
> We tried to use the trick you mentioned using MRST to export the grid to OPM.
> We encountered some issues related to the geometry. In MRST we have an unstructured grid (we tried both hexahedra and tetrahedra) but the VTK output from OPM just looks like a line.
> The DX.txt file generated by MRST looks ok but the DY.txt and DZ.txt are just lists of 1s.
>
> Here is the grid we built in MRST:
> https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdrive.google.com%2Ffile%2Fd%2F1l0584yAr8eYLAdtkVPtiuZzJaxHs5pNB%2Fview%3Fusp%3Dsharing&data=04%7C01%7CAtgeirr.Rasmussen%40sintef.no%7C9738f0b3fbab4c8b394008d89598cb3e%7Ce1f00f39604145b0b309e0210d8b32af%7C1%7C0%7C637423830777722044%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=z2pGx0EwA5xeNqYpYEo1SbG%2BBcT6P4PGx%2BioKp2485s%3D&reserved=0 <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdrive.google.com%2Ffile%2Fd%2F1l0584yAr8eYLAdtkVPtiuZzJaxHs5pNB%2Fview%3Fusp%3Dsharing&data=04%7C01%7CAtgeirr.Rasmussen%40sintef.no%7C9738f0b3fbab4c8b394008d89598cb3e%7Ce1f00f39604145b0b309e0210d8b32af%7C1%7C0%7C637423830777722044%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=z2pGx0EwA5xeNqYpYEo1SbG%2BBcT6P4PGx%2BioKp2485s%3D&reserved=0> <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdrive.google.com%2Ffile%2Fd%2F1l0584yAr8eYLAdtkVPtiuZzJaxHs5pNB%2Fview%3Fusp%3Dsharing&data=04%7C01%7CAtgeirr.Rasmussen%40sintef.no%7C9738f0b3fbab4c8b394008d89598cb3e%7Ce1f00f39604145b0b309e0210d8b32af%7C1%7C0%7C637423830777722044%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=z2pGx0EwA5xeNqYpYEo1SbG%2BBcT6P4PGx%2BioKp2485s%3D&reserved=0 <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdrive.google.com%2Ffile%2Fd%2F1l0584yAr8eYLAdtkVPtiuZzJaxHs5pNB%2Fview%3Fusp%3Dsharing&data=04%7C01%7CAtgeirr.Rasmussen%40sintef.no%7C9738f0b3fbab4c8b394008d89598cb3e%7Ce1f00f39604145b0b309e0210d8b32af%7C1%7C0%7C637423830777732003%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=LTZCL5vSvNHgXabLHpr9htKbCok0eStqdnMFkOzpjh0%3D&reserved=0>>
>
> And that’s the output (VTK) we get from OPM (it’s just a line with broken connectivities):
> https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdrive.google.com%2Ffile%2Fd%2F105WrVKZCswe7fJV_zzAqYZmaT4wWjQr9%2Fview%3Fusp%3Dsharing&data=04%7C01%7CAtgeirr.Rasmussen%40sintef.no%7C9738f0b3fbab4c8b394008d89598cb3e%7Ce1f00f39604145b0b309e0210d8b32af%7C1%7C0%7C637423830777732003%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=zqtAja%2FbjPWE3RDmGZaefLfi%2BTbd%2FxHH2dpa%2FoK6bRU%3D&reserved=0 <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdrive.google.com%2Ffile%2Fd%2F105WrVKZCswe7fJV_zzAqYZmaT4wWjQr9%2Fview%3Fusp%3Dsharing&data=04%7C01%7CAtgeirr.Rasmussen%40sintef.no%7C9738f0b3fbab4c8b394008d89598cb3e%7Ce1f00f39604145b0b309e0210d8b32af%7C1%7C0%7C637423830777732003%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=zqtAja%2FbjPWE3RDmGZaefLfi%2BTbd%2FxHH2dpa%2FoK6bRU%3D&reserved=0> <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdrive.google.com%2Ffile%2Fd%2F105WrVKZCswe7fJV_zzAqYZmaT4wWjQr9%2Fview%3Fusp%3Dsharing&data=04%7C01%7CAtgeirr.Rasmussen%40sintef.no%7C9738f0b3fbab4c8b394008d89598cb3e%7Ce1f00f39604145b0b309e0210d8b32af%7C1%7C0%7C637423830777732003%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=zqtAja%2FbjPWE3RDmGZaefLfi%2BTbd%2FxHH2dpa%2FoK6bRU%3D&reserved=0 <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdrive.google.com%2Ffile%2Fd%2F105WrVKZCswe7fJV_zzAqYZmaT4wWjQr9%2Fview%3Fusp%3Dsharing&data=04%7C01%7CAtgeirr.Rasmussen%40sintef.no%7C9738f0b3fbab4c8b394008d89598cb3e%7Ce1f00f39604145b0b309e0210d8b32af%7C1%7C0%7C637423830777732003%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=zqtAja%2FbjPWE3RDmGZaefLfi%2BTbd%2FxHH2dpa%2FoK6bRU%3D&reserved=0>>
>
> We are not sure if we missed something in the process or if we did a mistake somewhere.
>
> We would like to use a mesh built from tetrahedra (similar to the one built from MRST). Is this type of element supported by the OPM Flow solver? And do you think by using the trick of the MRST export we can rebuilt tetrahedra in OPM?
> If we choose to code our own grid class or link to another grid class from Dune, do you know if tetrahedra are also supported in any of the Dune classes?
>
> Thanks In advance for you comments and advice.
> Antoine
> _______________________________________________
> Opm mailing list
> Opm at opm-project.org <mailto: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%7C9738f0b3fbab4c8b394008d89598cb3e%7Ce1f00f39604145b0b309e0210d8b32af%7C1%7C0%7C637423830777732003%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=5tE5e%2FA4jVFAnCPd8iFaZCJs615UGv7aiQkYMALVr0g%3D&reserved=0




More information about the Opm mailing list