Visualizing grid blocks
Dears,
I have the attached MESH file generated using MESHMAKER. I would like to know if there is a simple Python code that enables me to read and visualize the grid blocks in Pyvista.
Thanks in advance
6 replies
-
Hi Refaat,
toughio's has some mesh generating capabilities that provide more flexibility than TOUGH's built-in meshmaker (although MINC is not currently supported).
In your case, your mesh can be easily generated (and visualized) with toughio with the following script:
import toughio dx = [1.0, 1.0, 2.0, 4.0, 4.0, 8.0, 15.0, 20.0, 30.0, 40.0, 50.0, 50.0, 100.0, 150.0, 50.0, 150.0, 300.0, 50.0, 475.0, 500.0, 500.0, 500.0, 500.0, 500.0, 500.0, 500.0, 500.0, 500.0, 1.e-3] dy = [7.0, 6.0, 6.0, 2.5, 1.0, 2.5, 6.0, 12.0, 6.0, 3.0, 3.0, 3.0, 6.0, 12.0, 6.0, 3.0, 3.0, 3.0, 6.0, 12.0, 6.0, 3.0, 3.0, 3.0, 6.0, 12.0, 6.0, 3.0, 3.0, 3.0, 6.0, 12.0, 6.0, 3.0] dz = 10 * [5.0] mesh = toughio.meshmaker.structured_grid(dx, dy, dz) mesh.plot(show_edges=True, notebook=False)
I might add a function to generate a mesh by reading a MESHMAKER block.
-
I have used your Toughio code to convert a FLAC3d grid to tough mesh. now i need to check if the converted mesh is correct . can there a simple way to visualize the tough mesh in 3D ??
Thank you in advance