Error using generateMesh function of the pde toolbox

조회 수: 10 (최근 30일)
Geovane Gomes
Geovane Gomes 2024년 6월 4일
편집: Geovane Gomes 2024년 6월 4일
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')
geo = 1x2 cell array
{'straightNaca2412.STEP'} {'tapperedNaca2412.STEP'}
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);
Meshing failed for Hmax of 0.304627 and Hmin of 0.0881443. Try adjusting Hmax and Hmin.
pdeplot3D(wing)
% solution
R = solve(wing);
pdeplot3D(wing,"ColorMapData",R.VonMisesStress,"Deformation",R.Displacement)
max(abs(R.VonMisesStress))

채택된 답변

Ganesh
Ganesh 2024년 6월 4일
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
Geovane Gomes
Geovane Gomes 2024년 6월 4일
편집: Geovane Gomes 2024년 6월 4일
Thanks!
It helps a lot.
Is there any trick to finding an interval in which I can generate the mesh?
I am having the same problem with other geometries.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Geometry and Mesh에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by