Forum Message

 

 

We have moved the forum to https://forum.ngsolve.org . This is an archived version of the topics until 05/05/23. All the topics were moved to the new forum and conversations can be continued there. This forum is just kept as legacy to not invalidate old links. If you want to continue a conversation just look for the topic in the new forum.

Notice

The forum is in read only mode.

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

More
2 years 10 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
2 years 10 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
2 years 10 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.104 seconds