Loading .stl 3D geometry PDE Toolbox with two cellzones

25 ビュー (過去 30 日間)
Andreas Schwabauer
Andreas Schwabauer 2020 年 2 月 4 日
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.
  2 件のコメント
ADSW121365
ADSW121365 2020 年 3 月 4 日
Usually software which creates .STL files can also output .STEP files (sometimes with a little work). The .STEP is usually better as it provides volumetric data as opposed to face data.
Andreas Schwabauer
Andreas Schwabauer 2020 年 3 月 6 日
@ADSW121365 thank you for your detailed answer

サインインしてコメントする。

その他の回答 (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