Gmsh format reader for restart etc.

Mesh generators, CAD programs, and other tools
Post Reply
raback
Site Admin
Posts: 4345
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Gmsh format reader for restart etc.

Post by raback »

Hi All,

We faced a need to couple several geometrically ordered parts hierarchically. In order to not be limited to conforming meshes in the interpolation among the different parts we must use some format that comes with the FE mesh as well.

Instead of using some existing Elmer format we opted this time for Gmsh format (current only version 2.0) for which we already had a simple output writer. The good thing in using Gmsh format is that it is widely used and there is a visualisation tool that can deal with it. VTU could also be considered but it would be much harder to read in natively.

So now there is also a very simple tentative Gmsh reader. As for now, it was only meant for this simple case but I could imagine there being further development avenues.

The only test case so far is "Outlet2InletBC". From there one can see how to write Gmsh results

Code: Select all

 Solver 2
  Exec Solver = after all  
  Equation = "GmshOutput"
  Procedure = "ResultOutputSolve" "ResultOutputSolver"
  Output Directory = "."
  Output File Name = case_a.msh
  Gmsh Format = Logical True
  Scalar Field 1 = temperature
End
and then read them in the next simulation the provide BCs

Code: Select all

Solver 2
  Exec Solver = before simulation
  Equation = "GmshReader"
  Procedure = "GmshOutputReader" "GmshOutputReader"
  Output Directory = "."
  Filename = File "case_a.msh"
! This makes the interpolation only to dofs where "Inlet" is set True.
  Mask Name = "Inlet BC"
End

Boundary Condition 4
  ...
  Inlet BC = Logical True
  ...

We are open for comments and ideas.

-Peter
bxyzhu
Posts: 1
Joined: 12 May 2022, 23:06
Antispam: Yes

Re: Gmsh format reader for restart etc.

Post by bxyzhu »

Hi Peter,

Is it possible to use this reader as an input to a body force?

Thanks,
Brian
raback
Site Admin
Posts: 4345
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Gmsh format reader for restart etc.

Post by raback »

Hi Brian,

Sorry for the late answer. I think it is coded such that the mask may be in either boundary condition or body force section. So yes.

-Peter
Post Reply