Boundary condition grouping GMSH
Posted: 29 Jun 2022, 17:27
Hi:
I'm extremely new to Elmer, FEM, and even CAD so I may get the terminology wrong. I'm working on creating a mesh (using GMSH but I'm also playing around with Salome and Netgen) which will have a large number of boundary condition "parts" but only a few different boundaries. I'm trying to figure out the best way to set up my geometries and meshing so I don't have to manually select hundreds of boundaries. How should I set up my geometry and/or mesh to make assigning boundary conditons easy? I've set up a toy example below (a screenshot of the geometry and a STEP file).
In the toy example (toy.step) I have 9 smaller rectangles on a larger rectangle (In my real application there might be closer to 100 of these smaller rectangles). Each of the smaller rectangles will have all of their edges assigned to one of 2 boundary conditions (in my case it's an electrostatic problem); In this toy example lets say all even number smaller rectangles are given boundary condition A and all odd boundary condition B (in my actual use these smaller rectangles are either going to be ground potential or some other potential). How can I set this up so that I don't have to manually select each side of every rectangle? In this example it's just 36 but in the real application it could be upwards of 400 edges. As I said i'm playing around with several mesh generating programs and am leaning towards GMSH but am open to changing.
I'm extremely new to Elmer, FEM, and even CAD so I may get the terminology wrong. I'm working on creating a mesh (using GMSH but I'm also playing around with Salome and Netgen) which will have a large number of boundary condition "parts" but only a few different boundaries. I'm trying to figure out the best way to set up my geometries and meshing so I don't have to manually select hundreds of boundaries. How should I set up my geometry and/or mesh to make assigning boundary conditons easy? I've set up a toy example below (a screenshot of the geometry and a STEP file).
In the toy example (toy.step) I have 9 smaller rectangles on a larger rectangle (In my real application there might be closer to 100 of these smaller rectangles). Each of the smaller rectangles will have all of their edges assigned to one of 2 boundary conditions (in my case it's an electrostatic problem); In this toy example lets say all even number smaller rectangles are given boundary condition A and all odd boundary condition B (in my actual use these smaller rectangles are either going to be ground potential or some other potential). How can I set this up so that I don't have to manually select each side of every rectangle? In this example it's just 36 but in the real application it could be upwards of 400 edges. As I said i'm playing around with several mesh generating programs and am leaning towards GMSH but am open to changing.