You can consider Mesh generation and conversion with GMSH and PYGMSH | Jørgen S. Dokken
and How to specify Boundary conditions when the mesh is imported from GMSH? - #2 by dokken
with subsequent post
How to specify Boundary conditions when the mesh is imported from GMSH? - #4 by dokken
or
What is wrong with my mesh? - #13 by dokken