PDE Toolbox does not recognize subdomains in imported .stl geometry
4 次查看(过去 30 天)
显示 更早的评论
Hi,
I have been trying to run a heat transfer simulation on a 2D geometry made using a CAD program, stored as a .stl file. According to the PDE toolbox documentation, it should be possible to import a geometry from .stl for PDE modelling using the function 'importGeometry'. Indeed, importing the file works fine, it consists of a rectangle with several parts inside, each with different thermal properties. Plotting it with 'pdegplot' shows the geometry as it would be expected to look.
However, Matlab does not seem to recognize all the parts as belonging to the same geometry. For example, specifying a temperature on the boundary of the rectangle will result in a heat flow propagating through the rectangle, but ignoring all the parts inside, passing straight through them without feeling the different thermal properties. Specifing boundary conditions along the edges of these subdomains results in a heat flow propagating into these parts, but not to the surrounding area.
Upon closer inspection, I can see that a different mesh is generated for each subdomain. It seems like all the different shapes in the original .stl file are seen as different, independent geometries. Is there any way to import the .stl file, and make matlab see it as a whole, with subdomains of different properties?
0 个评论
采纳的回答
Ravi Kumar
2019-5-15
STL with multiple bodies are imported as separate cells in PDE Toolbox. Essentially, the two cells are disconnected for analysis purposes, each with its own mesh and no common interface between them. Refer to the limitation mentioned in:
If your geometry is simple enough you can create multidomain 3-D geometry with functions: multicuboid, multicylinder, multisphere.
7 个评论
ADSW121365
2019-12-4
Could you elaborate at all on how this could be achieved? https://uk.mathworks.com/matlabcentral/answers/494536-multi-domain-modelling-in-3d-partial-differential-equations-current-loop-s-contained-in-a-black-bo?s_tid=prof_contriblnk
Ravi Kumar
2019-12-5
编辑:Ravi Kumar
2019-12-5
Sure. The funciton you need to use is geometryFromMesh. Refer to the examples which load mat file containing mesh data, which you can think of as coming from outside of the MATLAB. Let's say you have a mesh generation tools that honors the interface between two solid bodies by creating a common set of nodes on the interface. You will need node matrix, element connectivity matrix, and a vector that tells which element belongs to which solid. In the examples it is ElementIDToRegionID. If you have this data then geometryFromMesh should be able to reconstruct the multidomain geometry from the mesh data. Further, you can either retain the same mesh or you can recreate a new mesh.
Regards,
Ravi
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Geometry and Mesh 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!