I coverted a .sldprt file to .stl, and when use importGeometry to import .stl into pdemodel, the inner bondaries lost, what should I do to protect geometry integrity?
4 ビュー (過去 30 日間)
古いコメントを表示
I want to simulate the thermal diffusion in pancake coil using matlab.
And I find pde tool box, it need the stl geometry file.
- Firstly, I use solidworks to build the plane model, and to save it as .stl.
figure 1 shows the sldprt file viewed in solidworks, as the bondary in spiral layers structure to put bondary heat source.
figure 2 shows the structure much clear.
figure 3 shows the stl file viewed in solidworks
figure 4 shows the spiral inner bondaries and mesh in the stl file
As I see, the inner bondary still there in stl file, but when use importGeometry to import the geometry the inner bondary is loss as in figure 5
model = createpde;
importGeometry(model,'coil.stl');
pdegplot(model);
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/906625/image.png)
figure 1 plane coil geometry in sldprt file
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/906630/image.png)
figure 2 spiral layers structure and inner bondares
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/906635/image.png)
figure 3 stl file viewed in solidworks
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/906640/image.png)
figure 4 inner bondary and mesh in stl file viewed in solidworks
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/906645/image.png)
figure 5 pdegplot plot the .stl geometry with only outter bondaries
0 件のコメント
回答 (1 件)
Aiswarya
2024 年 1 月 30 日
I understand that you are trying to import a geometry from a STL file and plot it using the 'pdegplot' function. The inner boundary in your geometry does not appear in the plot. This is because the function 'importGeometry' does not allow you to import a multidomain 2-D or 3-D geometry where subdomains have any common points. The subdomains are treated as disconnected and each has its own mesh. So you cannot directly import nested 3-D geometries as in your case.
As a workaround you can generate a mesh from the geometry and plot it using the 'pdemesh' function. You can refer to the following modified code:
model = createpde;
importGeometry(model,'coil.stl');
msh = generateMesh(model);
pdemesh(model)
Now you will be able to observe the inner boundaries as well.
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!