Unable to load gmsh .msh files

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Unable to load gmsh .msh files

ebryant
I am running FEATool Multiphysics 1.15.3 Build 22.04.109 on Windows 10 Home. Windows is installed on my MacBook Pro using Bootcamp.

When I first installed FEATool I was able to select Geometry -> Import Geometry -> gmsh Format... and import my 3D .msh file.

Now, after several days of using FEATool, I am not able to import .msh files. The menu choice has changed to Geometry -> Import Geometry -> GEO/gmsh Format...

When I try to import a .msh file (or even a .geo file) I get this error:

Due to the complexity of the Gmsh file format, file import is not universally supported for all types of geo files. Geometry import failed. Index exceeds the number of array elements. Index must not exceed 0.

While the imports were still working I tried using a different mesh model; the gmsh one. FEATool tried to download the gmsh plugin for that, but only got partway through the installation. It was some time after that that I was no longer able to import .msh files.

I have tried uninstalling the FEATool program and reinstalling it, but that did not resolve the problem.

Any ideas what I am doing wrong?
Reply | Threaded
Open this post in threaded view
|

Re: Unable to load gmsh .msh files

Precise Simulation
Administrator
This post was updated on .
ebryant wrote
When I first installed FEATool I was able to select Geometry -> Import Geometry -> gmsh Format... and import my 3D .msh file.

Now, after several days of using FEATool, I am not able to import .msh files. The menu choice has changed to Geometry -> Import Geometry -> GEO/gmsh Format...
There is currently no functionality for auto-updating so I can't see any reason for menus to change by themselves. Are you sure you didn't try to import your mesh from the grid menu, "Grid -> Import Grid -> Gmsh Format..." instead of as a geometry?

In general, geometries (.geo) can only be imported via the geometry menu, and meshes (.msh/.msh2) via the grid menu options. Also Gmsh meshes can only be imported if they are in msh2 ascii format (in case your mesh is created with another software).

ebryant wrote
When I try to import a .msh file (or even a .geo file) I get this error:

Due to the complexity of the Gmsh file format, file import is not universally supported for all types of geo files. Geometry import failed. Index exceeds the number of array elements. Index must not exceed 0.
Gmsh geometry (not mesh) import is very difficult to parse, and generally only supported if the .geo file has been exported from FEATool via the "geom2geo" function with the use_cad=false flag (as geo geometry import with merged cad files is not supported, import of cad files is better done directly via brep/step/iges formats).

ebryant wrote
While the imports were still working I tried using a different mesh model; the gmsh one. FEATool tried to download the gmsh plugin for that, but only got partway through the installation. It was some time after that that I was no longer able to import .msh files.
If the automatic gmsh download and installation fails, you can manually download the binary from the official sources or (note that the latest version supported by FEATool is v4.6):

https://github.com/precise-simulation/external-grid-generators/tree/master/gmsh-4.6.0

and copy it to the folder:

  %USERPROFILE%/Documents/MATLAB/.featool

ebryant wrote
I have tried uninstalling the FEATool program and reinstalling it, but that did not resolve the problem.
Uninstalling, does not clear the "/Documents/MATLAB/.featool" user preference folder. So in case you have a broken binary there, you might want to backup and clear the folder to start completely fresh.

ebryant wrote
Any ideas what I am doing wrong?
It is actually not quite clear if you are trying to import a geometry or mesh? But it does sound a bit like you have tried to import a mesh as geometry, so I would suggest double check that you use grid import for importing meshes.
Reply | Threaded
Open this post in threaded view
|

Re: Unable to load gmsh .msh files

ebryant
That was exactly it. I had gotten myself into the wrong menu. I have gone back to loading the .msh file via the Grid menu and it is working great. Thanks for the help! And, thanks for the tips on updating the gmsh plugin.