Exact face mesh refinement / Number of subdevisions a the face / Reproducible mesh
4 views (last 30 days)
Show older comments
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 Comments
Answers (1)
Sachin Lodhi
on 21 Mar 2024
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 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!