[Gmsh] 2d to 3d mesh with same node numbering on the surfaces

Christophe Geuzaine cgeuzaine at ulg.ac.be
Wed Oct 11 08:25:48 CEST 2017



> On 10 Oct 2017, at 16:06, Robin Martens <r.f.m.martens at student.tue.nl> wrote:
> 
> Hello,
> 
> I have a 2d mesh of a volume made with GMSH. I load it with merge and mesh it to make it a 3d mesh.
> But the numbering of the nodes on the surface will change. I know the numbering is done inside GMSH but maybe one of you knows a trick. 
> 

This is indeed an annoyance with the default ".msh" format ("version 2.2"), which always renumbers the vertices and the elements to get a continuous numbering sequence.

As a temporary workaround you can use version 3 of the format (set e.g. "Mesh.MshFileVersion=3;" in your script). The format is quite similar to version 2, but not documented because we will make changes to it to improve the I/O efficiency in the next few months. So while it should solve your immediate problem, if you write a reader for this format you will have to modify it in a few months...

Christophe


> Hope someone could help me with this. 
> 
> Kind regards,
> 
> Robin Martens
> 
> 
> 
> Merge "theVolume.msh"; // loads the 2d mesh of the volume
> 
> Surface Loop(1) = {1,2,3,4,5,6};
> Volume(1) = {1}; //
> 
> 
> 
> Background about this problem:
> My goal is to run a fluid solid interaction simulation.
> 
> The inner bar substracted from the outerbar will be the fluid mesh.
> The inner bar is the solid mesh.
> 
> So the innerbar(solid) will move through the outer bar(fluid). 
> 
> The solid will be described with total lagrange formulation, and the fluid with euler formulation.
> The arbitrary lagrange euler formulation can not be used in my case so I need to remesh the fluid mesh everytime.
> 
> But the nodes on the surface of the solid and fluid mesh need to match, same number, same location, same amount.
> A script will adapt the surface mesh according to the deformation of the solid. GMSH will then make a new 3d mesh from it for the fluid mesh.  
> 
> _______________________________________________
> gmsh mailing list
> gmsh at onelab.info
> http://onelab.info/mailman/listinfo/gmsh


-- 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science 
http://www.montefiore.ulg.ac.be/~geuzaine

Free software: http://gmsh.info | http://getdp.info | http://onelab.info




More information about the gmsh mailing list