Hi,
I was able to generate a 3-region cylindrical shells with parameters:
490<r<500 , Region 1
500<r<505 , Region 2 (membrane)
505<r<515 , Region 3
Here, the Region 1 and 3 are separated by a 5nm width membrane.
The code is as bellow :
from netgen.csg import *
geo = CSGeometry()
cube = OrthoBrick(Pnt(-5700,-5700,0), Pnt(7100,7100,6300))
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),515)
dom1=cyl1 * cube - cyl1_in
dom2=cyl2 * cube - cyl1
dom3=cyl3 * cube - cyl2
geo.Add(dom1)
geo.Add(dom2)
geo.Add(dom3)
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 most important & signifficant physics occur in these 3 regions, but i still need to put correct boundary, especially outside Region 3.
For this purpose, I would like to add another region/domain using delaunay mesh outside Region 3 , maybe up to r=3000nm. How to do this without my mesh being constrained by maxh=100( as in above code) ? I would like to make it coarse in this region, maybe maxh=700.
Best,
Alex