Boundary condition in Trixi with imported mesh with P4estmesh()

Hello, i have a special case in Trixi where I want to use boundary conditions with a mesh imported via GMSH, i was wondering if it was possible with a Trixi function ?


So in principle this is possible, yes. See our documentation:
Tutorial and detailed instructions.

There are a couple things required to make this work, however.

  1. We support only linear quad/hex meshes. Support for higher-order elements is desired, see the corresponding issue. Other element types are yet somewhat further away, as p4est supports only quads/hexes.
  2. The boundary information is constructed based on the NSET information. So when exporting a mesh to .inp you need to select the Export all node options.
  3. To ensure correct export of the .msh via Gmsh to .inp you should set the geometric/elementary element ID to the physical ID (see number-of-tags of this documentation)

To briefly expand on @DanDoe’s answer: If you need support for higher-order quad/hex meshes, you could also look at GitHub - trixi-framework/HOHQMesh.jl: HOHQMesh.jl is a Julia wrapper for the HOHQMesh mesh generator, which allows to produce curved quadrilateral and hexahedral meshes for high-order numerical simulations.. If your mesh needs to be generated in Gmsh, then this is not an option, though.

Thank you ! My case is working but It seems that periodic boundary conditions are not supported ? Is this the case for imported mesh with GMSH ?

Yes, that is correct, as periodic conditions for unstructured meshes are not trivially done as the cells at the right end of the domain have no connectivity whatsoever with the cells on the left (for instance).

Outflow/Inflow should work, however. So if you know what your solution looks like, you could try to do this via these boundary conditions.

1 Like

Alright ! Thanks a lot !

Sure, happy to help!