Exact face mesh refinement / Number of subdevisions a the face / Reproducible mesh
4 次查看(过去 30 天)
显示 更早的评论
Hello,
how exactly can I design the mesh with the PDE Toolbox so that I have a even mesh on a given area. By this I mean a mesh that consists of elements of exactly the same size. From normal FEM programs (such as ANSYS Workbench) I know that you can specify that with the number of subdivisions. For me, it would also be ok if I manually enter each mesh node on the mesh. I just need to be able to generate an accurate mesh that does not change on one face when I change the mesh of the rest of the component.
I have attached the two plots and the needed geometry (only as a .txt because this forum does not supports .stl data) I hope this isn't a big problem)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1024160/image.jpeg)
Thanks in Adavance
smodel = createpde('structural','static-solid');
geometrydata=importGeometry(smodel, 'Geomvolume.stl');
scale(geometrydata,25.4)
pdegplot(smodel,'FaceLabels', 'on','Edgelabels','on','VertexLabels','on','FaceAlpha', 0.5);
msh = generateMesh(smodel,'GeometricOrder','linear', 'Hmax', 10, 'Hmin', 5, 'Hface',{6,1})
pdeplot3D(msh);
0 个评论
回答(1 个)
Sachin Lodhi
2024-3-21
Hi Jan,
Creating a mesh with uniformly shaped and evenly sized elements as you require is a difficult task using mesh generator. You can use the following code sinppet to generate mesh, though please be aware it is a linear mesh.
% Initialize the PDE model for a structural analysis
model = createpde('structural','static-solid');
% Import geometry from an STL file
geometrydata = importGeometry(model, 'Geomvolume.stl');
% Visualize the imported geometry
figure;
pdegplot(model, 'FaceLabels', 'on', 'EdgeLabels', 'on', 'VertexLabels', 'on', 'FaceAlpha', 0.5);
title('Imported Geometry from STL');
% Generate mesh for the imported geometry
msh = generateMesh(model, 'GeometricOrder', 'linear', 'Hmax', 10, 'Hmin', 5);
% Visualize the generated mesh (3D plot)
figure;
pdeplot3D(model);
title('Generated Mesh on Imported Geometry');
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!