Metafor

ULiege - Aerospace & Mechanical Engineering

User Tools

Site Tools


doc:user:geometry:import:importgmsh

This is an old revision of the document!


Reading gmsh files

Geometry (.geo) and mesh (.msh) defined in Gmsh can be imported in Metafor.

Several physical areas are defined in Gmsh, and correspond to various Metafor groups. The file must simply be imported in Metafor with the commands:

  from toolbox.gmsh import GmshImport
  importer = GmshImport(filename.msh, domain) #or importer = GmshImport(filename.geo, domain)
  importer.execute()

If the file is a .geo, Gmsh can be executed with the following options (see Commit 2009-08-19 and Commit 2008-06-03) :

  importer.setOrder(ordre_des_elements)
  importer.setOpti(True)#False by default
  importer.setAlgo(algo)
  

Then, the right elementProperties must be associated to the Gmsh type of element.

Exampled can be found in apps.externalMeshers.gmshtestXX

doc/user/geometry/import/importgmsh.1420710353.txt.gz · Last modified: 2016/03/30 15:22 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki