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!