How to import geometry with holes to use with PDE toolbox?
조회 수: 10 (최근 30일)
이전 댓글 표시
So there are two main options for creating geometry for a PDE model: geometryFromMesh and importGeometry.
The geometry I have is essentially a hollow sphere (i.e. a solid sphere with a smaller spherical cutout inside). I have created an STL file and attempted to use importGeometry. However, I get the error "Assemblies of more than one geometric model are not currently supported"
Now I am looking into using geometryFromMesh. I have two questions: 1. Is this even possible? 2. If so, then how might I create a mesh that has holes in it?
This is the geometry I'm trying to use.

댓글 수: 0
답변 (1개)
Alan Weiss
2017년 1월 18일
편집: Alan Weiss
2017년 1월 18일
You could try something like the following series of commands:
[az,el,r] = meshgrid(linspace(0,2*pi-0.01),linspace(-pi,pi-0.01),linspace(0.25,1));
[x,y,z] = sph2cart(az,el,r);
shp = alphaShape(x(:),y(:),z(:),0.05);
[elements,nodes] = boundaryFacets(shp);
nodes = nodes';
elements = elements';
model = createpde();
geometryFromMesh(model,nodes,elements);
pdegplot(model,'FaceLabels','on','FaceAlpha',0.5)
Don't forget to mesh your resulting geometry by using generateMesh.
Alan Weiss
MATLAB mathematical toolbox documentation
댓글 수: 5
Alan Weiss
2017년 2월 2일
I am very sorry that you are having such trouble with geometry creation. But really, you are trying to push the current 3-D geometry beyond what it can do. It is not designed for subdomains, nor for holes or multiple regions. My code is sort of fortuitously workable, but I don't really know why.
If you can afford to wait until the next release in March, then things might be somewhat better, but I cannot promise or even describe anything that is coming up. Sorry.
Alan Weiss
MATLAB mathematical toolbox documentation
참고 항목
카테고리
Help Center 및 File Exchange에서 Geometry and Mesh에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!