Mesh Plots
Visualizing different aspects of a mesh in a Mesh plot is a useful tool to inspect different aspects of a mesh. It is possible to color the elements on faces and in domains with respect to their type to get a feeling for how different types of elements fit together in the mesh. It can also be useful to shrink the elements to see more than the first layer of elements in the view. After having a look in the Mesh Statistics to see the minimum element quality in the mesh, a mesh plot can give an understanding of where the elements of worst quality are located. See the examples below and the suggested tutorial models for more inspiration.
Displaying Mesh Element Quality and the Mesh Element Size
You can visualize the mesh element quality and the mesh element size by plotting the mesh. The Mesh plot under Results has many more visualization options compared to the mesh view in the component. You can use a Mesh dataset or evaluate on a Solution dataset. If you use a Solution dataset, you get the mesh used for that solution. For a mesh in a component, the following steps display the mesh element quality or mesh element size:
1
Click Plot () on the Mesh toolbar, or right-click the Mesh node and select Plot (). This creates a mesh dataset and a plot group with a Mesh plot node (). By default, this plot shows the mesh element quality based on the skewness quality measure with the maximum and minimum element quality displayed at the color bar.
Figure 8-16: Default mesh plot displaying the skewness quality measure. The maximum and minimum element quality are displayed at the color bar.
2
Clear the check box Color range [0,1] to let the colorbar range from the minimum to maximum element quality.
3
Drag the Color calibration parameter slider to change where the middle of the color range is located. Move the slider to a negative value to highlight elements of lower quality more clearly.
Figure 8-17: Resulting mesh plots when setting the Color calibration parameter to a small and high value, respectively.
4
You can change the mesh quality measure to display from the Quality measure list. See Mesh Element Quality for more information about the quality measures.
5
In the Settings window for Mesh, select Size instead of Quality from the Element color list to plot the mesh element size instead.
6
Select the Element Filter check box and enter a logical expression in the Expression field to filter out which mesh elements to plot. For example, to only plot elements of quality below 0.001, enter qualskewness<0.001 as the expression. It is also possible to filter based on spatial coordinates (for example, x<0) to see the mesh in a cross section.
7
To visualize curved elements (for elements of order two or higher), go to Datasets>Mesh 1 and change the Geometry shape function list to the desired order.
The Geometry shape function setting is a postprocessing setting only and does not influence the discretization used when solving.
8
In the Settings window for Mesh Plot 1>Mesh 1, select Node points: Geometry shape function to also plot higher order node points in the mesh.
Figure 8-18: Mesh plot of the linear mesh (left) and the curved, second order elements with associated higher order node points (right).
Alternatively, you can access the built-in variables for mesh element quality (qual*) and mesh element size (h) in a surface plot, for example:
1
Under Results (), right-click Datasets () and select Mesh ().
Add a 2D or 3D Plot Group using the Mesh dataset as the group’s dataset, and then add a Surface or Volume plot. For example, in a 2D Plot Group>Surface node (), click the Replace Expression (), select Mesh>qualskewness - Element quality from the predefined quantities, Mesh>h - Element size, or one of the other quantities for mesh. Then, click the Plot button ().
See Swept Meshing of a Bracket Geometry:
Application Library path COMSOL_Multiphysics/Meshing_Tutorials/bracket_swept_mesh.
See STL Import 1 — Generating a Geometry from an Imported Mesh:
Application Library path COMSOL_Multiphysics/Meshing_Tutorials/stl_vertebra_import.
See STL Import 2 — Remeshing an Imported Mesh:
Application Library path COMSOL_Multiphysics/Meshing_Tutorials/stl_vertebra_mesh_import.