Can I program the selection of faces for PDE modelling of a 3D object?
2 views (last 30 days)
Show older comments
I am doing PDE analysis on a 3D object. However, I need to alter the geometry to test different configurations of my object. Doing this manually has proven very tedious.
First question:
From reviewing documentation, it doesn't look like MATLAB has a way of using code to create objects for PDE analysis (outside of simple circles, cylinders and boxes, I need a slightly more complex geometry). Does anyone know of a way to do this? Maybe outside of MATLAB? I want to be able to code the change in configuration which will allow me to test a lot more geometries than if I do this manually.
Second question:
If I must import my geometry (using importGeometry), from a .stl file. Is there a way to automatically assign the faces (such as bottom to top etc.). The way I am doing this now, is I must open up the geometry file, visually view the faces, and assign the appropriate boundary conditions. This also, is very time consuming.
Any ideas on this would be greatly appreciated.
Mark
0 Comments
Answers (1)
ADSW121365
on 9 Apr 2020
Not directly what you're searching for but something which could be applied in the same way is an undocumented function I found on another post (assuming you're using the PDEToolbox):
faceID = model.Geometry.findFaces('region','Cell',coilID);
With regards to complex 3D geometries, my suggested workflow is designing inside AUTOCAD mechanical, exporting the CAD design as a .step file. Import that .step into GMSH to create a mesh which can be exported as a .m file, then use
geom = geometryFromMesh(model,nodes,elements,DOMID);
On that mesh. DOMID's will be assigned if you specify multiple physical groups inside GMSH - this can be used to import multiple 3D cells inside matlab.
This mesh can be used if useful, or you can use
generateMesh(model);
to create a new mesh on the geometry using MATLAB tools.
0 Comments
See Also
Categories
Find more on Geometry and Mesh in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!