Loading .stl 3D geometry PDE Toolbox with two cellzones

11 Ansichten (letzte 30 Tage)
Andreas Schwabauer
Andreas Schwabauer am 4 Feb. 2020
Kommentiert: Bastiaan am 10 Sep. 2024
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?

Akzeptierte Antwort

ADSW121365
ADSW121365 am 4 Mär. 2020
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 Kommentare
Andreas Schwabauer
Andreas Schwabauer am 6 Mär. 2020
@ADSW121365 thank you for your detailed answer
Bastiaan
Bastiaan am 10 Sep. 2024
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,

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by