Loading .stl 3D geometry PDE Toolbox with two cellzones

10 ビュー (過去 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 Center および File ExchangeGeometry and Mesh についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by