Mesh Quality

What element quality means in Dr.Q: one number per element, and which shapes actually hurt the stress.


Mesh quality affects result accuracy, but not every odd-looking element does harm: what matters is the element's shape relative to the field it has to represent. Inverted elements stop the solve; two other shapes are flagged before it.

One number per element

Dr.Q reports mesh quality as a single value per element between 0 and 1: 1 is an ideal element, 0 is degenerate or inverted. There are no separate skewness, aspect-ratio, or Jacobian fields to read off; you get one normalized quality number. It is a visualization measure: it shows where the mesh is stretched, and it is not what the quality warnings use.

The formula behind that number adapts to the element type, so the single scalar stays comparable across a mixed mesh:

  • Tetrahedra and triangles use a shape/collapse ratio, how flat or stretched the element is relative to an ideal one.
  • Hexahedra and quadrilaterals use a Jacobian ratio, comparing the most and least stretched integration points; it drops to 0 if the element is inverted.

You don't set or tune these formulas; they are how Dr.Q measures the elements it generates.

An element at quality 0 is degenerate or inverted and cannot be solved (Error 22). That is a geometry and meshing problem to resolve upstream, not a solver setting.

What drives mesh quality

Element quality is a consequence of two things you don't dial directly: the geometry and the automatic mesher. Poor quality almost always traces back to the geometry:

  • Very thin or sliver faces
  • Extremely small features relative to the part size
  • Very thin walls, which force stretched elements

Because quality follows from the geometry, the way to improve it is upstream: clean up the CAD, not the mesh.

The two quality checks

Before every solve Dr.Q checks two element shapes, because these are the ones that distort the stress. An element reads the strain as a difference of displacements divided by a distance; the danger is a short distance that has to be bridged by a value interpolated across a long span, so that the interpolation error gets divided by the short distance.

  • Nearly flat tetrahedra, largest dihedral angle above 150 degrees (Warning 33). The stress across the flat face is unreliable; flat elements come from the CAD and rarely disappear under refinement.
  • Strongly curved quadratic elements, Jacobian ratio below 0.5 (Warning 34). The element's edges bend around geometry that curves more tightly than the element size; refinement normally removes them.

Stretched but not flat elements, the needles and wedges the mesher builds at small features, are not flagged: their strain error does not grow with the stretch, so a low quality number alone is not a reason to distrust a result. The warnings do not reject the mesh or stop the run: they name the worst element's position, and whether it matters depends on how close that is to where the result is read.

If meshing fails outright or a quality warning fires, see Mesh Errors for what to do about it.