I would like to solve a problem with mixed boundary conditions in 3D. I want to label different subsets of the boundary to have different boundary conditions on each component. In the following code I tried to label the boundaries of the upper and lower hemispheres of a sphere:
The output is
Boundaries: (‘screen’, ‘default’, ‘screen’)
Materials: (‘s1’, ‘s2’)
As expected there are two volume subdomains, but the entire boundary is labeled “screen” rather than part being “screen” and part “artificial”. How can I label the upper and lower parts of the boundary?
Also I would like to do the same thing for an ellipsoid. Is there a way to create an ellipsoid with CSG or must I use OpenCascade (a new venture for me!).
Thank you for this suggestion. But your code also labels the surface of the entire sphere as “screen”, and in addition labels the internal surface as “artificial”. In my application I want the upper surface labeled “screen” and lower “artificial” and the internal surface left as “default”.
But I would rather change to the new opencascade interface for the future, makes defining such geometries easier and more stable, your code with occ geometries:
Hi Peter,
with the latest nightly release we have also ellipsoids in netgen-occ: Either with Axis (i.e. point + direction) and two radii, or with Axes (=coordinate system) + 3 radii: