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 

34replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • 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.

    Like 1
  • 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

    Like
    • 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()
      
      Like
  • 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

    Like
    • 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
      
      Like
    • Keurfon Luu the file needed from FLAC is the .SAV file right??

      Like
    • 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).

      Like
    • Keurfon Luu this is the error I get

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

      Like
    • Keurfon Luu here it is

      Like
    • Keurfon Luu 

      Like
    • 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.

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

      Like
    • Keurfon Luu my mesh size is 38,27,6

      Like
    • 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).

      Like
    • 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

      Like
    • 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.

      Like
    • 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

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

      Like
    • 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.

      Like
    • 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?

      Like
    • 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)

      Like
    •  Keurfon Luu please

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

      Like
    • 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

      Like
    • Floriane Youzan Your command is wrong:

      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)

      This will create a flat brick mesh as the one you provided earlier.

      Like
    • Keurfon Luu OH I see why. Thank you

      Like
    • Floriane Youzan From my understanding, the four points must form a right-handed coordinate basis, which means that a unit brick with origin (0, 0, 0) can be defined by this set of points:

      - point 0 (0, 0, 0)

      - point 1 (1, 0, 0)

      - point 2 (0, 1, 0)

      - point 3 (0, 0, 1)

      Like 1
    • Keurfon Luu hello,  I need your help again please.I think the size of my mesh is wrong. The whole area is x=7403 m , y =  5471 and z =600 with dx =200 dy = 200 and dz = 100 so I divided x/dx, y/dy and z/dz to create my mesh but it turns out the zone create brick size(37,28,6) is not the representation of the original area I am trying to create. Do you think you can help please?

      Like
    • Floriane Youzan Try this command:

      zone create brick point 0 0 0 0 point 1 7403 0 0 point 2 0 5471 0 point 3 0 0 600 size 37 28 6
      
      Like 1
    • Keurfon Luu Thank you so much

      Like
    •  Keurfon Luu hello , I hope you are doing good, May I have your email please ?

      Like
    • Floriane Youzan I think it would be more beneficial for the TOUGH community to discuss on this forum rather than by private emails.

      Like
    • Keurfon Luu okay makes sense. Do you know how to simulate the deformation of the soil cause by fluid flow ( withdrawal of fluid flow) both in tough and FLAC?

      Like
Like Follow
  • 2 mths agoLast active
  • 34Replies
  • 98Views
  • 3 Following