Error using generateMesh function of the pde toolbox
13 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Geovane Gomes
el 4 de Jun. de 2024
Editada: Geovane Gomes
el 4 de Jun. de 2024
Hello everyone,
I am trying to generate a mesh to analyze an airplane wing using the PDE toolbox.
The attached geometry was modeled in SolidWorks and saved as a .step file.
When using the generateMesh function with the tapperedNaca2412.STEP, the following error is shown:
"Meshing failed for Hmax of 0.304627 and Hmin of 0.0881443. Try adjusting Hmax and Hmin."
clear
close
clf
% geometry
geo = unzip('wing.zip')
g = importGeometry(geo{2});
g = rotate(g,90,[0 0 0],[1 0 0]);
% model
wing = createpde("structural","static-solid");
wing.Geometry = g;
pdegplot(wing,"FaceAlpha",0.3,"FaceLabels","on")
% properties
E = 2.1e11; % modulo de elasticidade (Pa)
rho = 7800; % densidade do material (kg/m3)
nu = 0.3; % coeficiente de Poisson
structuralProperties(wing,"YoungsModulus",E,"MassDensity",rho,"PoissonsRatio",nu);
% load
P = 3000;
% boundary conditions
structuralBC(wing,"Face",4,"Constraint","fixed");
% structuralBoundaryLoad(wing,"Face",1,"Pressure",P);
structuralBoundaryLoad(wing,"Face",[1 3],"Pressure",P);
% mesh
generateMesh(wing);
pdeplot3D(wing)
% solution
R = solve(wing);
pdeplot3D(wing,"ColorMapData",R.VonMisesStress,"Deformation",R.Displacement)
max(abs(R.VonMisesStress))
0 comentarios
Respuesta aceptada
Ganesh
el 4 de Jun. de 2024
From my understanding, you are passing the default values of Hmax and Hmin, but you are encountering an error when you try to use the function "generateMesh()".
When you use the "generateMesh()" function without specifying the parameters "Hmax" and "Hmin", MATLAB chooses an optimum Meshing Parameter. In this case the meshing parameter chosen is not sufficient to generate the mesh. Hence, the meshing fails due to the limitations of the mesh generator for the parameter chosen. The ability, or inability, to generate mesh varies from geometry to geometry on intrinsic properties. Your work around can be to tweak the "Hmin" and "Hmax" values to generate the mesh.
From trial and error, I have seen that setting "Hmax" to a value greater than 1.5 and "Hmin" to a value lower than 0.01 does the trick in your case.
It is important to understand these parameters in order to be able to overcome this issue in the future and to ensure that the results are accurate. For the same, you may find the document below on "generateMesh()":
Hope it helps!
1 comentario
Más respuestas (0)
Ver también
Categorías
Más información sobre Geometry and Mesh en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!