[Gmsh] gmesh to Elmer

Jack Mandelman modelman at ieee.org
Fri Jun 15 02:42:55 CEST 2012


Hi Olivier,
Since my original post, I have found that ElmerGrid built into ElmerGUI 
does not properly convert .msh to mesh.*.  However, the stand-alone 
ElmerGrid executed from the command line does properly convert the gmsh 
file.  This is an acceptable work-around for me.   More details have 
been posted to the Elmer forum on "External Tools."

Thank you for your reply.

Jack

> Hello,
>
> Did you used ElmerGrid to convert the gmsh mesh in Elmer format?
>
> This is simply done by
> ElmerGrid 14 2 gmsh.msh
>
> You will get the directory gmsh, containing the 4 Elmer mesh files
> (mesh.header, mesh.elements, mesh.nodes and mesh.boundary).
>
> Hope it helps.
> OG
>
> Le 13/06/12 14:20, Jack Mandelman a écrit :
> >/  I recently constructed a 3D model in gmsh to investigate capacitive
> />/  coupling among a plurality of microstrip conductors oriented at
> />/  various angles to one-and-other. One model of interest contains three
> />/  dielectric regions. Each dielectric region is defined by a physical
> />/  volume entity in gmsh. Here is the problem encountered when using the
> />/  gmsh generated 3D mesh (V2 ascii .msh format) in Elmer:
> />/
> />/  Although the original .msh file from gmsh has 3 dielectric regions,
> />/  Elmer claims that it has 5 bodies. Since the mesh is unstructured and
> />/  is moderately complex (~300K tetrehedral elements), displaying the 5
> />/  bodies identified by Elmer is intractable. I found that the following
> />/  procedure results in a correct translation of the mesh from gmsh to Elmer.
> />/
> />/  1) In gmsh, construct a .geo file, generate mesh and save as ascii V1
> />/  .msh file.
> />/  2) Import ascii V1 .msh file (from 1 above) into EnGrid.
> />/  3) Export from EnGrid as a gmsh ascii V2 .msh file.
> />/  4) Open gmsh ascii V2 .msh file (from 3 above) with Elmer.
> />/  5) Proceed to build Elmer .sif file.
> />/
> />/  So far, only when I generate a V1 .msh file and convert is to a V2
> />/  .msh format with EnGrid can I successfully use the mesh in Elmer. I
> />/  don't know if this is a bug in gmsh or Elmer, or perhaps an
> />/  incompatibility between versions. I am using Elmer version
> />/  6.1.0.svn.5272.dfsg-1ubuntu2 and gmsh version
> />/  2.5.1~beta1~svn9724~dfsg-1 in linux mint 12. Any comments and/or
> />/  suggestions regarding this issue are greatly appreciated.
> />/
> />/  Dr. Jack Mandelman (aka "The Modelman")
> />/
> />/
> />/  _______________________________________________
> />/  gmsh mailing list
> />/  gmsh at geuz.org  <http://www.geuz.org/mailman/listinfo/gmsh>
> />/  http://www.geuz.org/mailman/listinfo/gmsh
> /
> -- 
>
> -----------------------------------------------------------------------------------------------------------------
> *Olivier Gagliardini *
> Maître de Conférences LGGE UJF / CNRS
> Membre junior de l'Institut Universitaire de France
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20120614/dea43f77/attachment.html>