Reputation: 3
I'm trying to import my mesh file (.msh) from Gmsh 4.7.0 into FiPy==3.4.2.1 (Windows 10)(Python 2.7.9). This mesh was created using open source FEM software (Cast3M) and then it was exported to Gmsh as .MED file. Gmsh was viewing perfectly my mesh without any problem with the same number of elements and nodes. Then I proceed to export the mesh as .msh file from Gmsh. (File----Export----msh file---save). I was doing:
mesh=fp.Gmsh3D('cylinder.msh') #After importing fipy
So I got this error:
Traceback (most recent call last):
File "<itasca-code-2-53a6529af1f3>", line 8, in <module>
File "C:\Users\Youssef Fawaz\AppData\Roaming\Python\Python27\site-packages\fipy\meshes\gmshMesh.py", line 1993, in __init__
self._orderedCellVertexIDs_data) = self.mshFile.read()
File "C:\Users\Youssef Fawaz\AppData\Roaming\Python\Python27\site-packages\fipy\meshes\gmshMesh.py", line 813, in read
raise GmshException(errStr)
fipy.meshes.gmshMesh.GmshException: Gmsh hasn't produced any cells! Check your Gmsh code.
Gmsh output:
Info : Running 'gmsh c:\users\yousse~1\appdata\local\temp\tmpoqqytw.geo -3 -nopopup -format msh2 -o c:\users\yousse~1\appdata\local\temp\tmpygqpw3.msh' [Gmsh 4.7.0, 1 node, max. 1 thread]
Info : Started on Fri Nov 13 10:31:12 2020
Info : Reading 'c:\users\yousse~1\appdata\local\temp\tmpoqqytw.geo'...
Info : Done reading 'c:\users\yousse~1\appdata\local\temp\tmpoqqytw.geo'
Info : Meshing 1D...
Info : Done meshing 1D (Wall 0s, CPU 0s)
Info : Meshing 2D...
Info : Done meshing 2D (Wall 0s, CPU 0s)
Info : Meshing 3D...
Info : Done meshing 3D (Wall 0s, CPU 0s)
Info : 0 nodes 0 elements
Info : Writing 'c:\users\yousse~1\appdata\local\temp\tmpygqpw3.msh'...
Info : Done writing 'c:\users\yousse~1\appdata\local\temp\tmpygqpw3.msh'
Info : Stopped on Fri Nov 13 10:31:12 2020 (From start: Wall 0.00300002s, CPU 0s)
To be noted that I'm implementing this mesh in DEM code (PFC3D developed by Itasca) coupling with fipy. For instance the problem is importing my mesh (not my code problem). Here is the link for my files (.msh, .MED) and the image of my mesh in Gmsh3D files.
Thank you
Upvotes: 0
Views: 612
Reputation: 2484
FiPy only understands the msh2
format from Gmsh. Export from Gmsh with -format msh2
.
Upvotes: 1