Can I simulate more than one stl geometry/ an assmebly with the 'createpde' function?

2 次查看(过去 30 天)
Hello, so I want to run a thermal (transient) thermal simulation on a CAD model.
I have imported the CAD model, which consists of distinct bodies that are in both thermal contact and physical contact (like a cuboid, inside another cubiod). I want to use the createpde fucntion to carryout the simulation.
This is an example of my code:
xxChamber = createpde('thermal', 'transient');
importGeometry(xxChamber, 'Outermost component v.stl')
Error using importGeometry (line 34)
Invalid argument at position 1. File Outermost component v.stl does not exist.

Error in pde.EquationModel/importGeometry (line 46)
gm = importGeometry(geofilename,varargin{:});
pdegplot(xxChamber, "FaceLabels","on")
Now this works quite alright, but once I begin to add the second chamber, by typing in
importGeometry (hydrolysisChamber, "middle v2.stl")
The code gives an error saying ' Assemblies of more than one geometric model not supported.
What can I do to solve this problem?

回答(1 个)

R
R 2024-5-17
This is likely due to the limitations of importGeometry:
A possible workaround to achieve the functionality you have described would be to, instead of exporting an .STL file from your third party tool, export a mesh and then try to import it to a geometry using geometryFromMesh:
If there are multiple domains in your geometry (e.g. a cuboid inside a cuboid with different properties), you will need to make sure that the exported mesh data that you are trying to import into MATLAB also contains mappings of the nodes to different regions. See ElementIDtoRegionID input for geometryFromMesh:

Community Treasure Hunt

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

Start Hunting!

Translated by