problem to load the .msh mesh (Gmsh) on NGSOLVE

More
3 years 5 months ago #3827 by Fshen28
Hi,

I would like to conver my gmsh mesh (.msh) to netgen format (.vol). The problem is when I load the .vol file on NGSOLVE (graphics interface) I only observe the meshing on the surface and not in the whole volume.

The code for transform the gmsh mesh is the following:


from netgen.read_gmsh import ReadGmsh
from netgen.meshing import *

# import the Gmsh 2.22 file to a Netgen mesh object

mesh = ReadGmsh("disk.msh")
from ngsolve import *
mesh = Mesh(mesh)
mesh.ngmesh.Save("disk.vol")

The disk.msh is attached in zip format.

I have tried to put generate mesh (It is not the idea since I would like to be able to use the imported mesh from gmsh), but I obtain the following error:

SYSTEM ERROR: more elements on face

Thanks
Attachments:
More
3 years 5 months ago #3828 by matthiash
Hello,

The generated disk.vol file contains volume elements (check the "volelements" token in the file). The Netgen GUI does not show volume elements by default, you can activate this in
View -> Viewing Options -> Mesh -> Show tets in domain (activate the checkbox)

Best,
Matthias
More
3 years 5 months ago #3829 by Fshen28
Thank you, I have noticed that. But I have tried to use the vol file created from gmsh in my simulation and it hasn't worked. However, creating the same disk on netgen, works.

I don't really know what the problem will be.
Time to create page: 0.106 seconds