Mesh Errors

Why meshing fails or flags low quality, and what you can actually change.


If you only have 2 minutes

Element quality is set by your geometry and Dr.Q's automatic mesher; you can't dial it to a target directly. When meshing fails or a quality warning fires, the real lever is almost always cleaning up the geometry. One meshing setting, small-feature suppression, is worth knowing about (Error 277). The quality warnings are advisory and name the element they are about. See Mesh Quality for what the two quality checks measure.

Meshing produced an inverted element (Error 22)

The mesh contains an element that is folded over or has no volume, and Dr.Q stops before solving: no result on such an element could be trusted. This almost always comes from the geometry: slivers, tiny features, or very thin walls that force impossibly stretched elements. The fix is upstream, in the CAD: see Geometry Errors for how to clean up and re-export.

Small-feature suppression failed (Error 277)

Dr.Q can defeature small details before meshing so they don't dominate the local element size. When that suppression fails, the message says the detection_size_factor was probably too large: a large factor tries to swallow a feature it can't cleanly remove.

  • Lower detection_size_factor (for example, halve it; it must stay in (0, 1]).
  • If the "small" feature actually matters for the result, don't suppress it: keep it (the default handling) and refine the mesh there instead.

Quality warnings (advisory)

These do not stop the run; they flag where the stress is less reliable, and each names the position of the worst element and the CAD surfaces it touches:

  • Warning 3: Dr.Q fell back to uniform refinement because the requested refinement needed a tet mesh. Nothing to do.
  • Warning 33: nearly flat tetrahedra (largest dihedral angle above 150 degrees). The stress across the flat face of such an element is unreliable. Flat elements come from the CAD, a sliver face or a feature much smaller than the mesh, and refinement rarely removes them: clean up or enlarge the feature, or refine the mesh there.
  • Warning 34: strongly curved quadratic elements (Jacobian ratio below 0.5). The element's edges had to bend around geometry that curves more tightly than the element size. Refinement normally removes these on its own; in a convergence study they tend to disappear after the first iteration.

Whether a warning matters depends on where the elements sit. Compare the reported position with the region the result is read from, the stress maximum or the location of the question. Elements several element sizes away from it, or in a smooth low-stress region, leave the result untouched; elements at the hot spot do not. The former quality warning (Warning 4, minimum element quality below a threshold) is retired: it flagged stretched but harmless elements at small features on almost every mesh.