2

Tough2-FLAC 3D

Hello guys . I need help . I am trying to convert the coordinates (x,y,z) in tough2 output files into nodes of FLAC 3D. I came across FLAC2TOUGH but this matlab code convert FLAC 3D data into tough2  data. Can someone please help with this? Thank you guys 

39 replies

null
    • Staff Scientist
    • Christine_Doughty
    • 4 yrs ago
    • Reported - view

    I forwarded your query to Jonny Rutqvist (the person I know who knows the most about TOUGH/FLAC), and here is his reply:

    I do not have a routine that convert TOUGH2 coordinates (mid-element coordinates) to FLAC3D nodes (which are located at the corners of cells). Yes we do have the opposite. You create the mesh in FLAC3D, which is quite advanced and flexible mesh generations, and then produce a TOUGH2 grid so that get the consistent grids in TOUGH2 and FLAC3D.

    • Floriane_Youzan
    • 3 yrs ago
    • Reported - view

    Hello, I finally got all the files necessary tu run the matlab code but I am getting an error. would you please help me ?

    Thanks

      • Keurfon_Luu
      • 3 yrs ago
      • Reported - view

      Floriane Youzan As stated by Christine, there is no way to convert a TOUGH mesh to a FLAC3D grid since we are lacking the cell connectivity data required to reconstruct the original cells (TOUGH MESH file only stores the cell centers although they are not used during the simulation). Using Antonio Rinaldi's Matlab scripts won't help either since it only converts a FLAC3D grid to a TOUGH MESH file. As far as I know, people who work with TOUGH-FLAC at LBL are now using Laura Blanco-Martin's Fortran MESH_FLAC2TOUGH program for the FLAC3D grid to TOUGH mesh conversion.

      That being said, I have developed a Python library for all I/O processing for TOUGH (https://github.com/keurfonluu/toughio). It can read FLAC3D grid files *.f3grid (among other formats) and smoothly write the corresponding TOUGH MESH file.

      import toughio
      
      mesh = toughio.read_mesh("mesh.f3grid")
      mesh.write_tough()
      
    • Floriane_Youzan
    • 3 yrs ago
    • Reported - view

    Hey, thank you for replying to my question. The thing is my focus changed and I am actually trying to convert FLAC 3D mesh into TOUGH mesh that’s why I am using the matlab code but I am getting an error ! I will defintely try your python code but I have a question about your code. Do I need to download an add on in python to make it run? Thank you

      • Keurfon_Luu
      • 3 yrs ago
      • Reported - view

      Floriane Youzan Yes, if you have a Python distribution installed (the most popular being Anaconda), you can simply run in Windows console the following command line to install the package:

      pip install toughio[full] --user
      
      • Floriane_Youzan
      • 3 yrs ago
      • Reported - view

      Keurfon Luu the file needed from FLAC is the .SAV file right??

      • Keurfon_Luu
      • 3 yrs ago
      • Reported - view

      Floriane Youzan No, it's the .f3grid file that you can export from FLAC3D (File > Grid > Export to FLAC3D). It will export all the information from your grid as a text file (by default).

      • Floriane_Youzan
      • 3 yrs ago
      • Reported - view

      Keurfon Luu this is the error I get

      • Keurfon_Luu
      • 3 yrs ago
      • Reported - view

      Floriane Youzan Can you provide the export .f3grid file for debugging purpose?

      • Floriane_Youzan
      • 3 yrs ago
      • Reported - view

      Keurfon Luu here it is

      • Floriane_Youzan
      • 3 yrs ago
      • Reported - view

      Keurfon Luu 

      • Keurfon_Luu
      • 3 yrs ago
      • Reported - view

      Floriane Youzan Your mesh is flat, is it expected? TOUGH is a integral finite-volume simulator, so you need a 3D mesh (FLAC3D too, as far as I know).

       

      Edit: the z-component of your grid points are all equal to 6, that's why your mesh is flat.

      • Floriane_Youzan
      • 3 yrs ago
      • Reported - view

      Keurfon Luu my mesh is not flat it is 3D but it is really thin in the z direction

      • Floriane_Youzan
      • 3 yrs ago
      • Reported - view

      Keurfon Luu my mesh size is 38,27,6

      • Keurfon_Luu
      • 3 yrs ago
      • Reported - view

      Floriane Youzan Can you provide a screenshot of the grid in FLAC3D?

      The .f3grid file you provided has all the z-components of the grid points equal to 6 (you can open it with notepad).

      • Floriane_Youzan
      • 3 yrs ago
      • Reported - view

      Keurfon Luu Yes that is the case I didn't know there was a problem with that. to get the grid I wrote the following data file : zone create brick size 38,27,6

      • Keurfon_Luu
      • 3 yrs ago
      • Reported - view

      Floriane Youzan 

      I got this file with your command:

      zone create brick size 38,27,6

      I am using a more recent version of FLAC3D, though. Can you update to the latest version (https://www.itascacg.com/software/downloads/flac3d-7-00-update)? Itasca may have fixed the bug.

      • Floriane_Youzan
      • 3 yrs ago
      • Reported - view

      Keurfon Luu I thought the version I had was the latest version. When I run the code with the file you just sent it does not give me anything

      • Keurfon_Luu
      • 3 yrs ago
      • Reported - view

      Floriane Youzan It does not return any variable. It creates a MESH file in your current working directory.

      • Keurfon_Luu
      • 3 yrs ago
      • Reported - view

      Floriane Youzan You are not using the latest release of FLAC3D7. According to the .f3grid file you provided, you are using FLAC3D7 R091 while the latest is R118.

      • Floriane_Youzan
      • 3 yrs ago
      • Reported - view

      Keurfon Luu Oh it worked thank you so much for helping me out. Is it how it supposed to look like? also I only have ELEM I don't have CONNE in the file . Also, do you mind giving me your email please?

      • Floriane_Youzan
      • 3 yrs ago
      • Reported - view

      Keurfon Luu Do you mind creating another grid and sending me here with the following data file :

      zone create brick size (37,28,6) point 0 (1890,2300,6) point 1 (7400,2300,6) point 2 (7400,5471,6) point 3 (1890,5471,6)

      • Floriane_Youzan
      • 3 yrs ago
      • Reported - view

       Keurfon Luu please

      • Keurfon_Luu
      • 3 yrs ago
      • Reported - view

      Floriane Youzan There are 6156 elements in your grid, the CONNE block starts at line 6159 of the MESH file.

      • Floriane_Youzan
      • 3 yrs ago
      • Reported - view

      Keurfon Luu Thank you so much. would you please generate a flac grid with your version of flac for me I need to check something. here is the data file

      zone create brick size (37,28,6) point 0 (1890,2300,6) point 1 (7400,2300,6) point 2 (7400,5471,6) point 3 (1890,5471,6)

       

      thanks

Content aside

  • 2 Likes
  • 1 yr agoLast active
  • 39Replies
  • 662Views
  • 7 Following