Clear Filters
Clear Filters

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 views (last 30 days)
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);
figure 1 plane coil geometry in sldprt file
figure 2 spiral layers structure and inner bondares
figure 3 stl file viewed in solidworks
figure 4 inner bondary and mesh in stl file viewed in solidworks
figure 5 pdegplot plot the .stl geometry with only outter bondaries

Answers (1)

Aiswarya
Aiswarya on 30 Jan 2024
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.

Products


Release

R2021a

Community Treasure Hunt

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

Start Hunting!