Hi Everyone,
Probably this is a basic question, but I need to create this domain:
\Omega = (-32,32) \times (-32,32) \times (0,64),
with boundaries
\Gamma_1 = {(x,y,z): z= 64, |x| \leq 16, |y| \leq 16}, \\
\Gamma_2 ={(x,y,z): z= 64, |x| > 16, |y| > 16}, \\
\Gamma_3 = \partial \Omega \backslash (\Gamma_1 \cup \Gamma_2),
I have tried this:
from netgen.csg import *
geo = CSGeometry()
domain1 = OrthoBrick((-32, -32, 0), (32, 32, 64))
domain2 = OrthoBrick((-16, -16, 0), (16, 16, 64))
top = Plane (Pnt(0,0,64), Vec(0,0,-1) )
cube_hole = domain1 - top
cube_hole.bc("Gamma3")
#geo.Add(cube_hole)
small_top = domain2 * top
#small_top.bc("Gamma1")
#geo.Add(small_top, bcmod=[(cube_hole, "Gamma1")])
complem_small_top = (top - small_top) * domain1
#complem_small_top.bc("Gamma2")
#geo.Add(complem_small_top, bcmod=[(cube_hole, "Gamma2")])
cube = small_top.bc("Gamma1") + complem_small_top.bc("Gamma2") + cube_hole
geo.Add(cube)
mesh = geo.GenerateMesh(maxh=5)
mesh.Save("cube.vol")
mesh = Mesh("cube.vol")
But I get this labels for the boundaries:
boundary labels: (‘Gamma1’, ‘Gamma3’, ‘Gamma1’, ‘Gamma3’, ‘Gamma3’, ‘Gamma3’)
I don’t know what I’m doing wrong.
Thanks in advance