0

How to create meshes with local grid refinements

Hi,

I wonder if there are meshing tools I can use to create cartesin grids with local grid refinements as the picture shows. In essence is to split specific cells into smaller discrete elements. Can I do that with MESHMAKER?

13replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • Hi Alejandro,

    TOUGH meshes work under the principle of columns and layers. Every column must have constant x-y dimensions and every layer must have constant thickness. The mesh you are trying to build does not satisfy this requirement, since  it has multiple layers and columns embedded within a block. However, you could refine your mesh applying the small step to the entire x and z domains, so that columns and layers are well defined.

    Best 
    Fernando

    Like
  • Alejandro, MESHMAKER won't be able to build the grids you're looking for, but it can be done using other pre-processors. The tricky part is the requirement that the connections remain orthogonal. You would need to set up "ghost nodes" for the larger cells connected to smaller cells. These coordinates for these nodes wouldn't be written directly into the XYZ coordinates in the ELEME list, but would be used to determine D1/D2 in the CONNE record for each connection. I've attached an image that shows what I'm talking about. I'm unaware of which programs would set that up properly, though. Does anyone else know? I'd be interested for my own purposes as well.
     

    Like
  • I think what you wanted can be accomplished by using AMESH (https://tough.lbl.gov/licensing-download/free-software-download/), then rotate your mesh (it seems you do not need refinement in y direction). I have seen beautiful mesh made using AMESH but I have not used it myself.

    Yingqi

    Like
  • Hi Alejandro,

    You can do many types of grid refinement with TOUGH-code meshes (actually layers do not have to be constant thickness, unless perfect orthogonality is desired). The grid you show, however, is not ideal because it strongly breaks orthogonality and it is best to not connect more than 2 elements to one (unless it is some type of boundary atmospheric block). Yes, AMESH s pretty good for creating a raw mesh file. Making you own meshes is not hard since the geometry is quite simple, or you can create the points for a mesh and then modify them to create a smoother mesh (Lloyd's iteration of AMESH-created grids). If you write a utility to create (or edit) the MESH then it is easy to write out the INCON files, and also create multiple MESH files with different volume boundary elements. I've attached are some examples that are mostly pretty old, so you can make much more refined larger grids now.

    cheers,

    Eric

    Like
    • Eric Sonnenthal 

      Hi Eric,

      Thank you for sharing these examples and replying more accurately on this topic. It is actually possible to handle unstructured meshes in TOUGH models. I was believing however that this applies only to 2D meshes, is it possible to handle fully unstructured 3D meshes? Of the Delaunay tessellation type for example.

      Cheers

      Fernando

      Like
  • Hi Fernando,

    Yes, the TOUGH codes can handle fully unstructured 3-D Voronoi meshes. In fact, it can handle virtually any geometry mesh, however, whether it is a "good" mesh for the problem is another question. AMESH creates 2-D Voronoi that can be stacked in 3-D, or you can stack them yourself. I know there are other codes that will create 3-D Voronoi grids, but not TOUGH meshes. However, it would not be difficult to convert another MESH to a TOUGH MESH by finding the centers of the polygons, and calculating the distances, areas, etc.

    cheers,

    Eric

    Like
    • Eric Sonnenthal 

      That's fantastic... Yes, the first thing is to define a suitable grid for the problem. I realize now that, if needed, we could define a 3D unstructured grid model, as long as we are able to write it in the TOUGH mesh format (connections, areas, etc.).

      Cheers

      Fernando

      Like
  • Dear Fernando,

    you can take a look at VORO2MESH. VORO2MESH can create fully 3D unstructured grids.

    Web site: https://site.unibo.it/softwaredicam/en/software/voro2mesh

    It can also handle CVT Mesh (undocumented) but I can give some help.

    Regards

    Stefano

    Like
    • Stefano Bonduà 

      Dear Stefano,

      Thank you for this, it's great to see there are already tools to design unstructured meshes for TOUGH models. I'll definitely have a careful look at these resources.

      Best
      Fernando

      Like
  • Thanks a lot everyone for your input. I have learned a lot.

    Like 1
  • Dear Alejandro,

    As suggested by Stefano, VORO2MESH can build full 3D unstructured grids conforming to the IFDM used by TOUGH2/3.

    The possible refinement of 2D cartesian grids for TOUGH2 was discussed in detail by Garcia and Pruess (2000, LBNL-45646). As already noticed, that refinement requires the use of interpolation nodes and in practice a modified version of the standard MESHMAKER module.

    Better to exploit the IFDM capabilities to handle unstructured grids providing, as already observed, that a suitable mesh generator is available.

    For 2D grids or 3D grids replicating the x-y plane discretization over the vertical, AMESH can be used simply providing the grid nodes coordinates with the proper refining (Figure AMESH_1 and AMESH_2). Grid discretization is obtained by preserving IFDM requirements.

    Grid refinements could be made around wells too with the same approach (Figure AMESH_3).

    For those using Petrasim similar grids can be built by using the unstructured grid option of Petrasim and supplying all the desired grid node coordinates as refinement nodes. With some adjustment, related to the handling of border elements, the grid can be built in Petrasim too (Figure Petrasim_4).

    For a local full 3D refinement as you requested, you could use VORO2MESH. 

    Regards,

    Alfredo

    Like
  • Thanks all for your contributions. There seem to be several alternatives.

     

    Regarding visualization, what tools exist to produce 3D visualizations of AMESH grids? And more importantly to view the output results in the grid.

    Like
  • Dear Alejandro,

    TOUGH2Viewer can visualise 3D MESH generated with AMESH. From TOUGH2Viewer web site, you can download an example and a quick tutorial for this kind of grids. In any case, the input file of AMESH is not so different from the input file of VORO2MESH, so you can try both using the same seed points coordinates.  TOUGH2Viewer can also export the MESH and the TOUGH results to PARAVIEW, so you can have several powerful tool for results visualization and inspection.

    Regards

    Stefano

    Like
Like Follow
  • 4 mths agoLast active
  • 13Replies
  • 89Views
  • 7 Following