GMSH Basics
15th Dec 2024
The basic meshing commands and workflow
GMSH
Objects
Graphics Core
import gmsh
gmsh.initialize()
gmsh.model.add("MSL")
gmsh.model.occ.add_rectangle(-width/2, 0, 0, width, height, 1)
gmsh.model.occ.add_rectangle(-width/2, 0, 0, width, subst_height, 2)
gmsh.model.occ.add_rectangle(-msl_width/2, subst_height, 0, msl_width, msl_height, 3)
# Cut conductor from domain
gmsh.model.occ.cut([(2, 1)], [(2, 3)], 10)
# Fragment / Create air and substrate
dimtags, _ = gmsh.model.occ.fragment([(2, 10)], [(2, 2)])