Hi Christopher,
Thanks alot, i didnt know that.
I have another setup that i want to do, in which i want to add a pillar (cylindrical geometry) to the previous geometry. This pillar is located right outside Region 2. And because we also have region 3 outside Region 2, there will be overlapping between Region 3 and pillar.
So here is the code that i tried:
===================================================================================
from netgen.csg import *
geo = CSGeometry()
cube = OrthoBrick(Pnt(-5700,-5700,0), Pnt(7100,7100,1300))
cube_b = OrthoBrick(Pnt(-5700,-100,0), Pnt(7100,195,2000))
cyl1_in=Cylinder(Pnt(700,700,0), Pnt(700,700,200),490)
cyl1=Cylinder(Pnt(700,700,0), Pnt(700,700,200),500)
cyl2 = Cylinder(Pnt(700,700,0), Pnt(700,700,200),505)
cyl3 = Cylinder(Pnt(700,700,0), Pnt(700,700,200),550)
cyl4=Cylinder(Pnt(700,0,650), Pnt(700,-700,650),200)
dom1=cyl1 * cube - cyl1_in
dom2=cyl2 * cube - cyl1
dom3=cyl3 * cube - cyl2
dom4=cyl4* cube_b
geo.Add(dom1.maxh(100))
geo.Add(dom2.maxh(100))
geo.Add(dom3.maxh(100))
geo.Add(dom4.maxh(50))
n =10
slices1x = [i/n for i in range(1,n)]
slices2 = [i/2 for i in range(1,2)]
geo.CloseSurfaces(cyl1,cyl1_in,slices1x)
geo.CloseSurfaces(cyl1,cyl2,slices2)
geo.CloseSurfaces(cyl2,cyl3,slices1x)
geo.SetBoundingBox(Pnt (-12000, -12000, -12000), Pnt(12000, 12000, 12000))
ngmesh = geo.GenerateMesh(maxh=100)
ZRefinement(ngmesh, geo)
from ngsolve import *
mesh = Mesh(ngmesh)
Draw(mesh)
==============================================================================
the geometry roughly looks like :
drive.google.com/open?id=1w3RL2Yir4gy03-Q1r4W1G7otT10bhQ2N
Obviously Region 3 (exterior) and Region 4( the pillar) overlap, as shown below:
drive.google.com/open?id=1h0to7DiSxPxJlDycY5JAkvD6wmoYVj8A
I want to first try the easier way to get around this problem, which is to delete region 3 that intersects with region 4, while maintaining the parallel prism cell in region 3. How to do this?
Thanks,
Alex