Can I program the selection of faces for PDE modelling of a 3D object?
조회 수: 2 (최근 30일)
이전 댓글 표시
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
답변 (1개)
ADSW121365
2020년 4월 9일
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
참고 항목
카테고리
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!