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 Center および File ExchangeGeometry and Mesh についてさらに検索

タグ

製品


リリース

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by