Mesh Element Quality
The mesh resolution and mesh element quality are important aspects to consider when validating a model. Low mesh resolution — in relation to the variations in the solution and the geometry — can lead to inaccurate results. See Mesh Element Sizing for more information. A low mesh element quality — which measures the regularity of the mesh elements’ shapes — can lead to inverted mesh elements (see Avoiding Inverted Mesh Elements) and to high condition numbers for the Jacobians, which in turn can cause convergence issues. The mesh element quality is a dimensionless quantity between 0 and 1, where 1 represents a perfectly regular element, in the chosen quality measure, and 0 represents a degenerated element. COMSOL Multiphysics includes the following mesh quality measures:
Skewness, which is the default quality measure in Mesh Statistics and Mesh Plots, is a measure of the equiangular skew is defined as the minimum of the following quantity:
where θ is the angle over a vertex (2D) or edge (3D) in the element, θe is the angle of the corresponding edge or vertex in an ideal element, and the minimum is taken over all vertices (2D) or edges (3D) of the element.
Maximum angle, which is based on the largest angle in the element. If no angle is larger than the largest angle of the corresponding optimal element, the quality is one; otherwise, the measure shows how much larger the angle is. This quality measure is insensitive to element anisotropy.
Volume versus circumradius, which is based on a quotient of the element volume and the radius of the circumscribed sphere (or circle) of the element. This quality measure is sensitive to large angles, small angles, and anisotropy.
Volume versus length, which is based on a quotient of element edge lengths and element volume. This quality measure is primarily sensitive to anisotropy.
Condition number, which is based on the element dimension divided by the condition number (in the Frobenius norm) of the matrix transforming the element to a reference element.
Growth rate, which is a measure of local (anisotropic) growth rate. Let sα(E) denote the element size of an element E in a spatial direction α, and let Eα denote the element neighbor of E in the direction α. The growth rate measure is then the minimum of the quotient min(sα(E), sα(Eα))/max(sα(E), sα(Eα)), where α is taken over all directions. For a uniform sized mesh, the growth rate will be 1.
Curved skewness, which is defined as the elementwise product of skewness and reldetjacmin, which is a measure of the deformation when generating the higher-order element (see Geometric Variables and Mesh Variables). When curved skewness is evaluated in Mesh Statistics, the deformation always uses the second-order Lagrange geometry shape function. If you want to evaluate curved skewness for some other geometry shape function, you can do so by evaluating the built-in variable qualcurvedskewness on a mesh dataset with the desired setting or a solution dataset. If you plot the mesh from the solution dataset, you will measure the same deformation as in your solution. If you use a mesh dataset, you need to set the desired geometry shape function explicitly in the settings for the dataset. The default geometry shape function for the mesh dataset is linear, which makes skewness and curved skewness equivalent. You can use a plot of the curved skewness to find badly shaped mesh elements.
The qualcurvedskewness measure is equivalent to qualskewness for face elements not adjacent to domain elements in 3D.
Custom expression (available in the Settings window of Mesh Plots), where your can enter a custom expression for the mesh quality (using the variables listed below, for example). The expression should evaluate to scalar values from 0 to 1.
Below is a list of all built-in variables available for these mesh quantities. For more built-in mesh variables, see Geometric Variables and Mesh Variables.
h, the local mesh size.
qualskewness, the skewness mesh quality measure, which is the default mesh quality measure.
qualmaxangle, the maximum angle mesh quality measure.
qual, the volume versus circumradius quality measure.
qualvollength, the volume versus length mesh quality measure.
qualcondition, the condition number mesh quality measure.
qualgrowth, the growth rate mesh quality measure.
qualcurvedskewness, the quality measure of the deformation when generating higher-order elements.
All these variables are also available in variants for the various frames in a moving mesh or deformed geometry simulation, for example. Append _geometry, _mesh, or _spatial to the base variable name to evaluate the quantity in the geometry frame, mesh frame, or spatial frame, respectively.
In general, if a mesh with a low mesh quality has been generated, an Information node appears. See the sections Displaying Mesh Element Quality and the Mesh Element Size and Information, Warning, and Error Nodes for more information on how to locate the elements of low quality.
Adjusting the Element Size for the Unstructured Mesh Generator:
Application Library path COMSOL_Multiphysics/Meshing_Tutorials/piston_mesh.
Swept Meshing of a Bracket Geometry:
Application Library path COMSOL_Multiphysics/Meshing_Tutorials/bracket_swept_mesh.
STL Import 1 — Generating a Geometry from an Imported Mesh:
Application Library path COMSOL_Multiphysics/Meshing_Tutorials/stl_vertebra_import.
STL Import 2 — Remeshing an Imported Mesh:
Application Library path COMSOL_Multiphysics/Meshing_Tutorials/stl_vertebra_mesh_import.