Tough2-FLAC 3D
-
- Floriane Youzan
- Floriane_Youzan
- 2 yrs ago
- 36 replies
- 231
- 1
- Keurfon Luu2 mths ago
- Questions & Answers
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
- Oldest first
- Newest first
- Active threads
- Popular
-
- Christine Doughtymoderator
- Staff Scientist
- Christine_Doughty
- 2 yrs ago
- 1
- Questions & Answers
- 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.
Like 1 -
- Floriane Youzan
- Floriane_Youzan
- 2 yrs ago
- Questions & Answers
- 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
Like-
- Keurfon Luu
- Keurfon_Luu
- 2 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()
Like
-
- Floriane Youzan
- Floriane_Youzan
- 2 yrs ago
- Questions & Answers
- 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
Like-
- Keurfon Luu
- Keurfon_Luu
- 2 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
Like -
- Floriane Youzan
- Floriane_Youzan
- 2 yrs ago
- Reported - view
Keurfon Luu the file needed from FLAC is the .SAV file right??
Like -
- Keurfon Luu
- Keurfon_Luu
- 2 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).
Like -
- Floriane Youzan
- Floriane_Youzan
- 2 yrs ago
- Reported - view
-
- Keurfon Luu
- Keurfon_Luu
- 2 yrs ago
- Reported - view
Floriane Youzan Can you provide the export .f3grid file for debugging purpose?
Like -
- Floriane Youzan
- Floriane_Youzan
- 2 yrs ago
- Reported - view
Keurfon Luu here it is
Like -
- Floriane Youzan
- Floriane_Youzan
- 2 yrs ago
- Reported - view
-
- Keurfon Luu
- Keurfon_Luu
- 2 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.
Like -
- Floriane Youzan
- Floriane_Youzan
- 2 yrs ago
- Reported - view
Keurfon Luu my mesh is not flat it is 3D but it is really thin in the z direction
Like -
- Floriane Youzan
- Floriane_Youzan
- 2 yrs ago
- Reported - view
Keurfon Luu my mesh size is 38,27,6
Like -
- Keurfon Luu
- Keurfon_Luu
- 2 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).
Like -
- Floriane Youzan
- Floriane_Youzan
- 2 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
Like -
- Keurfon Luu
- Keurfon_Luu
- 2 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.
Like -
- Floriane Youzan
- Floriane_Youzan
- 2 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
Like -
- Keurfon Luu
- Keurfon_Luu
- 2 yrs ago
- Reported - view
Floriane Youzan It does not return any variable. It creates a MESH file in your current working directory.
Like -
- Keurfon Luu
- Keurfon_Luu
- 2 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.
Like -
- Floriane Youzan
- Floriane_Youzan
- 2 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?
Like -
- Floriane Youzan
- Floriane_Youzan
- 2 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)
Like -
- Floriane Youzan
- Floriane_Youzan
- 2 yrs ago
- Reported - view
Keurfon Luu please
Like -
- Keurfon Luu
- Keurfon_Luu
- 2 yrs ago
- Reported - view
Floriane Youzan There are 6156 elements in your grid, the CONNE block starts at line 6159 of the MESH file.
Like -
- Floriane Youzan
- Floriane_Youzan
- 2 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
Like -
- Keurfon Luu
- Keurfon_Luu
- 2 yrs ago
- Reported - view
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 -
- Floriane Youzan
- Floriane_Youzan
- 2 yrs ago
- Reported - view
Keurfon Luu OH I see why. Thank you
Like -
- Keurfon Luu
- Keurfon_Luu
- 2 yrs ago
- 1
- Reported - view
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 -
- Floriane Youzan
- Floriane_Youzan
- 2 yrs ago
- Reported - view
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 -
- Keurfon Luu
- Keurfon_Luu
- 2 yrs ago
- 1
- Reported - view
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 -
- Floriane Youzan
- Floriane_Youzan
- 2 yrs ago
- Reported - view
Keurfon Luu Thank you so much
Like -
- Floriane Youzan
- Floriane_Youzan
- 1 yr ago
- Reported - view
Keurfon Luu hello , I hope you are doing good, May I have your email please ?
Like -
- Keurfon Luu
- Keurfon_Luu
- 1 yr ago
- Reported - view
Floriane Youzan I think it would be more beneficial for the TOUGH community to discuss on this forum rather than by private emails.
Like -
- Floriane Youzan
- Floriane_Youzan
- 1 yr ago
- Reported - view
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 -
- Arshad Shahzad
- Arshad_Shahzad
- 2 mths ago
- Reported - view
Floriane Youzan Floriane Youzan Dear Keurfon Luu, I am also trying to convert my FLAC3D mesh into Tough2 mesh. can you please help me with it by providing the python files and if there is brief steps to conver the mesh. Thanks in advance
Like -
- Keurfon Luu
- Keurfon_Luu
- 2 mths ago
- Reported - view
Arshad Shahzad Please refer to toughio's documentation: https://keurfonluu.github.io/toughio/
Like