Loading .stl 3D geometry PDE Toolbox with two cellzones

조회 수: 9 (최근 30일)
Andreas Schwabauer
Andreas Schwabauer 2020년 2월 4일
댓글: Bastiaan 2024년 9월 10일
Hi there! I want to import a previously created 3D geometry that has two cell zones (C1, C2) as a stl file in Matlab via "importGeometry (model, 'abc.stl')". However, I always get the error message "Failed to create geometry. The stl file is invalid, more than two facets share an edge.". I can rule out geometry errors. My question is, is it possible in the PDE Toolbox for a 3D geometry to load a geometry that has two cell zones? Is it possible to load the cell zones individually and then combine them?

채택된 답변

ADSW121365
ADSW121365 2020년 3월 4일
You can't load in multiple geometries seperately in 3D to my knowledge. From my current experience, the only way to properly manage multiple domains (or cell-zones) in 3D within the PDE toolbox is via the
geometryFromMesh(model,nodes,elements,groupsID)
tool. Here groupsID is a list of values the same length as the number of elements with values (in your case) of 1 and 2 depending on which cell a specific element is in.
The downside of this is you need to have a prexisting mesh made elsewhere rather than using MATLAB inbuilt meshing software. My personal recommendation to do this would be the opensource GMSH software. This can import your STL file and create a mesh (linear, quadratic etc) as well as optimise the mesh via a whole host of algorithms.
Depending on how your PDE system is setup, the "Coherence;" command in GMSH could be really useful - this forces a coherent mesh with no overlapping elements allowing MATLAB to interpret your geometry as a single coherent system with distinct geometrical functions. However, if you're interested in analytically distinct regions this step is unimportant (I note this here because it took a long time for me to figure this bit out).
This principle extends to more domains - my current has 15 geometrical regions enclosed in a solid box. The resullting mesh is simply a solid box but I can still identify and manipulate the various geometrical features inside the box.
  댓글 수: 3
Andreas Schwabauer
Andreas Schwabauer 2020년 3월 6일
@ADSW121365 thank you for your detailed answer
Bastiaan
Bastiaan 2024년 9월 10일
i have a question, can you show me how to do this in gmesh?
i currently stand for the same problem in combining multiple stl files to create an object in the PDE Modeler.
best regards,

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Geometry and Mesh에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by