Loading .stl 3D geometry PDE Toolbox with two cellzones
10 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Andreas Schwabauer
el 4 de Feb. de 2020
Comentada: Bastiaan
el 10 de Sept. de 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?
0 comentarios
Respuesta aceptada
ADSW121365
el 4 de Mzo. de 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 comentarios
Bastiaan
el 10 de Sept. de 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,
Más respuestas (0)
Ver también
Categorías
Más información sobre Geometry and Mesh en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!