Clear Filters
Clear Filters

meshquality: What does it represent and what is a good number?

9 views (last 30 days)
According to the documentation:
  • meshQuality evaluates the shape quality of mesh elements and returns numbers from 0 to 1 for each mesh element. The value 1 corresponds to the optimal shape of the element. By default, the meshQuality function combines several criteria when evaluating the shape quality.
What are these "criteria"? I believe it should a combination of aspect ratio, max/min size, angle, Jacobian, etc. But it would be good to see how it is calculated...
And what is considered to be a "good" mesh? above 0.3, or 0.5, or 0.7?
Q = meshQuality(model.Mesh);
elemIDs = find(Q < 0.5);
My idea is to find all elements with a quality lower than a certain threshold and locally refine the mesh. Which brings me to another question....
I know that you can locally refine mesh using 'Hvertex' and 'Hedge'. But can you do the same thing based on elemIDs?
m3 = generateMesh(model,'Hedge',{1,0.001},'Hvertex',{[6 7],0.002})
This would require the generateMesh function to refer to model.Mesh rather than model itself ... which doesn't seem to work:
Check for incorrect argument data type or missing argument in call to function 'generateMesh'.

Answers (1)

arushi
arushi on 27 Aug 2024 at 4:45
Hi Pelajar,
The meshQuality function in MATLAB evaluates the quality of mesh elements based on several criteria, although the exact combination of these criteria is not explicitly detailed in the documentation. Generally, mesh quality metrics might include:
  1. Aspect Ratio: Measures how stretched or skewed an element is. Ideally, elements should be as close to equilateral as possible.
  2. Angles: Evaluates the range of angles within the element. Elements with angles too close to 0° or 180° are considered poor quality.
  3. Jacobian Determinant: Ensures that the transformation from the reference element to the actual element is valid (i.e., no inverted elements).
  4. Volume/Area Ratio: Compares the volume or area of the element to an ideal volume or area.
  5. Edge Length Ratio: Compares the lengths of edges within the element.
What is Considered a "Good" Mesh?
The definition of a "good" mesh can depend on the specific application and solver requirements. However, some general guidelines are:
  • Quality Above 0.7: Generally considered good and should perform well in most simulations.
  • Quality Between 0.3 and 0.7: May be acceptable depending on the application, but could require refinement.
  • Quality Below 0.3: Typically considered poor and should be refined.
Hope this helps.

Tags

Community Treasure Hunt

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

Start Hunting!