{"id":28233,"date":"2020-06-04T11:26:39","date_gmt":"2020-06-04T11:26:39","guid":{"rendered":"https:\/\/www.simscale.com\/?page_id=28233"},"modified":"2024-07-30T21:22:49","modified_gmt":"2024-07-30T21:22:49","slug":"mesh-quality","status":"publish","type":"page","link":"https:\/\/www.simscale.com\/docs\/simulation-setup\/meshing\/mesh-quality\/","title":{"rendered":"Mesh Quality"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">This standard documentation covers what is mesh quality and why it&#8217;s important. Before starting to read this document, we strongly recommend checking out the following articles:<\/p>\n\n\n\n\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.simscale.com\/docs\/simwiki\/preprocessing\/what-is-a-mesh\/\">What is a Mesh?<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.simscale.com\/docs\/simulation-setup\/meshing\/\">Meshing in SimScale<\/a><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">As mentioned in the mesh article, a mesh is the discretization of geometry into individual elements. Since the mesh is an approximation of the actual geometry, the mesh density and quality have a significant influence on the accuracy and stability of a simulation. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The purpose of mesh quality metrics is to assess the suitability of a discrete computational domain (Mesh) for simulations. A mesh is usually considered to be of higher quality compared to another mesh if it improves at least one of the most important simulation properties; Time to convergence, stability or accuracy without affecting the others negatively. <\/p>\n\n\n\n<h2 id=\"mesh-quality-metrics-\" class=\"wp-block-heading\" >1. Mesh Quality Metrics <\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">We measure the mesh quality, using a set of quality metrics. The quality metrics determine how far we are from an ideal cell shape. Below, you will see some mesh quality metrics used in SimScale.<\/p>\n\n\n\n<h3 id=\"aspect-ratio\" class=\"wp-block-heading\" >1.1 Aspect Ratio<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Briefly, the aspect ratio is the ratio of a cell&#8217;s longest length to the shortest length. The ideal aspect ratio is 1. The smaller it is, the higher the quality of an element is. The calculation method varies by the cell type as follows:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Hexahedral cell aspect ratio:<\/strong> Ratio of maximum edge length to the minimum edge length. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">$$ AspectRatio = \\frac{max(x_1, x_2, &#8230;, x_{12})}{min(x_1, x_2, &#8230;, x_{12})} $$ <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Tetrahedral cell aspect ratio:<\/strong> It&#8217;s correlated between the maximum edge length and radius of the cell&#8217;s internal sphere.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">$$ AspectRatio = \\frac{max(x_1, x_2, &#8230;, x_6)}{2 \\cdot \\sqrt 6 \\cdot r} $$  <\/p>\n\n\n<div class=\"wp-block-image is-resized\">\n<figure class=\"aligncenter size-large\"><a href=\"https:\/\/frontend-assets.simscale.com\/media\/2021\/09\/Aspect-ratio-1.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"603\" src=\"https:\/\/frontend-assets.simscale.com\/media\/2021\/09\/Aspect-ratio-1-1024x603.jpg\" alt=\"high and low aspect ratio of hexahedral and tetrahedral elements\" class=\"wp-image-47531\" srcset=\"https:\/\/frontend-assets.simscale.com\/media\/2021\/09\/Aspect-ratio-1-1024x603.jpg 1024w, https:\/\/frontend-assets.simscale.com\/media\/2021\/09\/Aspect-ratio-1-300x177.jpg 300w, https:\/\/frontend-assets.simscale.com\/media\/2021\/09\/Aspect-ratio-1-768x452.jpg 768w, https:\/\/frontend-assets.simscale.com\/media\/2021\/09\/Aspect-ratio-1-1536x904.jpg 1536w, https:\/\/frontend-assets.simscale.com\/media\/2021\/09\/Aspect-ratio-1.jpg 1809w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">Figure 1: Comparison of high and low aspect ratio per element type<\/figcaption><\/figure>\n<\/div>\n\n\n<h3 id=\"non-orthogonality\" class=\"wp-block-heading\" >1.2 Non-orthogonality<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Non-orthogonality is the angle between the vector connecting two adjacent cell centers and the normal of the face shared by these cells. The range of non-orthogonality is between 0 (ideal) and 90 (worst). 0 indicates the mesh being orthogonal. Two perfect hexes aligned with each other have non-orthogonality equal to 0. <\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"https:\/\/frontend-assets.simscale.com\/media\/2021\/09\/non-orthogonality.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"290\" src=\"https:\/\/frontend-assets.simscale.com\/media\/2021\/09\/non-orthogonality-1024x290.jpg\" alt=\"comparison of a low and high non-orthogonality on hexahedral cells\" class=\"wp-image-47553\" srcset=\"https:\/\/frontend-assets.simscale.com\/media\/2021\/09\/non-orthogonality-1024x290.jpg 1024w, https:\/\/frontend-assets.simscale.com\/media\/2021\/09\/non-orthogonality-300x85.jpg 300w, https:\/\/frontend-assets.simscale.com\/media\/2021\/09\/non-orthogonality-768x218.jpg 768w, https:\/\/frontend-assets.simscale.com\/media\/2021\/09\/non-orthogonality-1536x435.jpg 1536w, https:\/\/frontend-assets.simscale.com\/media\/2021\/09\/non-orthogonality-2048x580.jpg 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">Figure 2: Representation of non-orthogonality mesh quality metric based on cell centroid and shared cell face<\/figcaption><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">A high level of non-orthogonality should be avoided since it causes numerical instability. As a result, the simulations with higher non-orthogonality either take longer to converge, or even diverge. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It is recommended to keep the non-orthogonality below 70. Please consider improving the mesh if the non-orthogonality is above 80. Simulations with the meshes with maximum non-orthogonality above 85 likely diverge.<\/p>\n\n\n\n<h3 id=\"volume-ratio\" class=\"wp-block-heading\" >1.3 Volume Ratio<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Volume ratio is the ratio of the volumes of the adjacent cells. Consider two adjacent cells with volumes of \\(V_1\\) and  \\(V_2\\). The volume ratio is computed as follows:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">$$ Volume\\ ratio = \\frac{max(V_1, V_2)}{min(V_1, V_2)} $$<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In reality, a single cell is surrounded by multiple neighbor cells. Since there are multiple volume ratios, we consider the maximum volume ratio as the cell&#8217;s volume ratio.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"https:\/\/frontend-assets.simscale.com\/media\/2021\/09\/Volume_ratio-2.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"406\" src=\"https:\/\/frontend-assets.simscale.com\/media\/2021\/09\/Volume_ratio-2-1024x406.jpg\" alt=\"small and large hexahedral cells around a cell shows how the volumeratio mesh quality metric is calculated\" class=\"wp-image-47554\" srcset=\"https:\/\/frontend-assets.simscale.com\/media\/2021\/09\/Volume_ratio-2-1024x406.jpg 1024w, https:\/\/frontend-assets.simscale.com\/media\/2021\/09\/Volume_ratio-2-300x119.jpg 300w, https:\/\/frontend-assets.simscale.com\/media\/2021\/09\/Volume_ratio-2-768x304.jpg 768w, https:\/\/frontend-assets.simscale.com\/media\/2021\/09\/Volume_ratio-2-1536x608.jpg 1536w, https:\/\/frontend-assets.simscale.com\/media\/2021\/09\/Volume_ratio-2.jpg 1606w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">Figure 3: Volume ratio is a mesh quality metric that is a function of the sizes of neighbor cells.<\/figcaption><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">$$ Volume\\ ratio_i = max( Volume\\ ratio_{j=1},  Volume\\ ratio_{j=2},&#8230;, Volume\\ ratio_{j=n}) $$   <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The ideal volume ratio is 1.  The smaller it is, the higher the quality of an element is. <\/p>\n\n\n\n<h3 id=\"tet-edge-ratio\" class=\"wp-block-heading\" >1.4 Tet Edge Ratio<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Tet edge ratio is the ratio between the longest and the shortest edges. This quality metric is only available for the tetrahedral cells. Considering the edge lengths of a cell represented by x, the tet edge ratio is then computed as follows:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">$$ Tet edge ratio = \\frac{max(x_1, x_2, &#8230; x_6)}{min(x_1, x_2, &#8230; x_6) } $$<\/p>\n\n\n\n<h3 id=\"skewness\" class=\"wp-block-heading\" >1.5 Skewness<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Skewness is the normalized distance between a line that connects two adjacent cell centroids and the distance from that line to the shared face&#8217;s center. The range of skewness is between 0 (ideal) to \\(\\infty\\). Highly skewed cells are not preferred due to the poor accuracy they cause within the interpolated regions. The calculation method is as follows, for any cell type:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">$$ Skewness = \\frac{\\mid \\vec{s} \\mid}{\\mid \\vec{d} \\mid}$$<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Where \\(\\mid \\vec{s} \\mid\\) is the norm of the skewness vector and \\(\\mid \\vec{d} \\mid\\) is the norm of the vector that connects the adjacent cell centroids, as shown in the Figure below.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><a href=\"https:\/\/frontend-assets.simscale.com\/media\/2024\/06\/skewness-definition.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"660\" height=\"505\" src=\"https:\/\/frontend-assets.simscale.com\/media\/2024\/06\/skewness-definition.jpg\" alt=\"Visual representation of skewness\" class=\"wp-image-92966\" style=\"width:500px\" srcset=\"https:\/\/frontend-assets.simscale.com\/media\/2024\/06\/skewness-definition.jpg 660w, https:\/\/frontend-assets.simscale.com\/media\/2024\/06\/skewness-definition-300x230.jpg 300w\" sizes=\"auto, (max-width: 660px) 100vw, 660px\" \/><\/a><figcaption class=\"wp-element-caption\">Figure 4: Visual representation of the vectors that will be used to calculate Skewness.<\/figcaption><\/figure>\n<\/div>\n\n\n<h3 id=\"quadmaxangle\" class=\"wp-block-heading\" >1.6 QuadMaxAngle<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Hexahedral cell quadMaxAngle is the maximum of the angles between neighboring cell edges. The normal range varies between 90 (ideal) to 180 (worst). The acceptable range is 90 to 135.<\/p>\n\n\n\n<h3 id=\"trimaxangle\" class=\"wp-block-heading\" >1.7 TriMaxAngle<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Tetrahedral cell triMaxAngle is the maximum of the angles between neighboring cell edges. The normal range varies between 60 (ideal) to 180 (worst). <\/p>\n\n\n\n<h3 id=\"triminangle\" class=\"wp-block-heading\" >1.8 TriMinAngle<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Tetrahedral cell triMinAngle is the minimum of the angles between neighboring cell edges. The normal range varies between 0 (ideal) to 60 (worst).<\/p>\n\n\n\n<h2 id=\"quality-assessment\" class=\"wp-block-heading\" >2. Quality Assessment<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>There are mainly two applications for this type of quality assessment:<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Prior to running the simulation:<\/strong> <br>This is to ensure the mesh is a good fit for the upcoming simulation run. Evaluating at this level is more for CFD-experts, less experienced users can usually rely on the default settings.<\/li>\n\n\n\n<li><strong>After facing an issue in simulation:<\/strong> <br>If your solution diverges and the simulation fails, quality assessment gives you powerful tools at hand to identify problematic areas that can be, for example, fixed by adjusting the CAD model or refining certain areas in the mesh.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">The following picture gives a preview of what the result of checking the mesh quality could look like:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/frontend-assets.simscale.com\/media\/2024\/07\/aspect-ratio-mesh-quality.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1920\" height=\"933\" src=\"https:\/\/frontend-assets.simscale.com\/media\/2024\/07\/aspect-ratio-mesh-quality.png\" alt=\"visualisation of aspect ratio in a mesh for cfd analysis\" class=\"wp-image-93926\" srcset=\"https:\/\/frontend-assets.simscale.com\/media\/2024\/07\/aspect-ratio-mesh-quality.png 1920w, https:\/\/frontend-assets.simscale.com\/media\/2024\/07\/aspect-ratio-mesh-quality-300x146.png 300w, https:\/\/frontend-assets.simscale.com\/media\/2024\/07\/aspect-ratio-mesh-quality-1024x498.png 1024w, https:\/\/frontend-assets.simscale.com\/media\/2024\/07\/aspect-ratio-mesh-quality-768x373.png 768w, https:\/\/frontend-assets.simscale.com\/media\/2024\/07\/aspect-ratio-mesh-quality-1536x746.png 1536w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><\/a><figcaption class=\"wp-element-caption\">Figure 5: Mesh metric aspect ratio for an example CAD model<\/figcaption><\/figure>\n<\/div>\n\n\n<h3 id=\"meshing-log\" class=\"wp-block-heading\" >2.1 Meshing Log<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The quality of a mesh can be assessed by different metrics that are usually based upon the geometrical properties of the mesh cells (e.g. Aspect ratio) or upon the relation between neighboring cells (e.g. non-orthogonality). As the suitability of a mesh for a simulation is also strongly influenced by the simulated physics, the simulation solver, and the geometrical domain, the quality metrics can only give an indication if a mesh is a good fit for a simulation setup. As an example, you can find that simple incompressible CFD simulations are usually much less sensitive towards poor quality cells than compressible flow with high-density changes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Figure 6 shows the meshing logs of a good and bad quality mesh. The marked points indicate:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Mesh quality metric<\/li>\n\n\n\n<li>Minimum, maximum, average, and standard deviation of the corresponding quality metric within the mesh.<\/li>\n\n\n\n<li>Median of the corresponding quality metric. Ensure that 99.9-th percentile of the metric is within the recommended range.<\/li>\n\n\n\n<li>Overall mesh quality metric. Higher values indicate higher mesh quality. <\/li>\n<\/ol>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"https:\/\/frontend-assets.simscale.com\/media\/2021\/12\/meshing_log-2.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"536\" src=\"https:\/\/frontend-assets.simscale.com\/media\/2021\/12\/meshing_log-2-1024x536.png\" alt=\"visualization of meshing log in the simscale platform\" class=\"wp-image-48801\" srcset=\"https:\/\/frontend-assets.simscale.com\/media\/2021\/12\/meshing_log-2-1024x536.png 1024w, https:\/\/frontend-assets.simscale.com\/media\/2021\/12\/meshing_log-2-300x157.png 300w, https:\/\/frontend-assets.simscale.com\/media\/2021\/12\/meshing_log-2-768x402.png 768w, https:\/\/frontend-assets.simscale.com\/media\/2021\/12\/meshing_log-2.png 1130w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">Figure 6: Comparison of meshing logs of good (left) and bad (right) mesh qualities.<\/figcaption><\/figure>\n<\/div>\n\n\n<h4 id=\"best-practices-for-mesh-quality-metrics\" class=\"wp-block-heading\" >Best Practices for Mesh Quality Metrics:<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">The following table shows the maximum value for some of the meshing parameters beyond which the simulation is very likely to diverge. Low-quality meshes will most likely cause numerical errors and either fail the simulations or cause unreliable results. Note that some of the parameters are more\/less relevant depending on the type of analysis to be performed (CFD\/FEA).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<figure class=\"wp-block-table aligncenter\"><table><tbody><tr><td> <strong>Mesh Quality Metric<\/strong> <\/td><td><strong>Maximum, CFD<\/strong><\/td><td><strong>Maximum, FEA<\/strong><\/td><\/tr><tr><td><em>aspectRatio<\/em><\/td><td>&#8212;<\/td><td>30<\/td><\/tr><tr><td><em>TetAspectRatio<\/em><\/td><td>&#8212;<\/td><td>16<\/td><\/tr><tr><td><em>nonOrthogonality<\/em> <\/td><td>88<\/td><td>&#8212;<\/td><\/tr><tr><td><em>skewness<\/em><\/td><td>&#8212;<\/td><td>10<\/td><\/tr><\/tbody><\/table><figcaption class=\"wp-element-caption\">Table 1: Maximum mesh quality metrics for CFD and FEA analysis types<\/figcaption><\/figure>\n\n\n\n<div class=\"hw-block hw-note hw-note--info hw-note\">\n    <div class=\"hw-note__title\">\n        <p class=\"hw-note__titleText\"><i class=\"fa fa-exclamation-circle\" aria-hidden=\"true\"><\/i>Note<\/p>\n    <\/div>\n    <div class=\"hw-note__body\">\n        <p>Volume ratio and non-orthogonality are defined on each face of the mesh. SimScale displays the maximum value for all faces which belong to a cell.<\/p>\n    <\/div>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">In the following examples, you will see the influence of low-quality mesh and high-quality mesh on simulation stability. <\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"https:\/\/frontend-assets.simscale.com\/media\/2021\/12\/low_quality.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"440\" src=\"https:\/\/frontend-assets.simscale.com\/media\/2021\/12\/low_quality-1024x440.png\" alt=\"meshing log shows low mesh quality and convergence plot shows a diverged simulation\" class=\"wp-image-48803\" srcset=\"https:\/\/frontend-assets.simscale.com\/media\/2021\/12\/low_quality-1024x440.png 1024w, https:\/\/frontend-assets.simscale.com\/media\/2021\/12\/low_quality-300x129.png 300w, https:\/\/frontend-assets.simscale.com\/media\/2021\/12\/low_quality-768x330.png 768w, https:\/\/frontend-assets.simscale.com\/media\/2021\/12\/low_quality-1536x660.png 1536w, https:\/\/frontend-assets.simscale.com\/media\/2021\/12\/low_quality.png 1600w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">Figure 7: Example for a diverged simulation with a low mesh quality<\/figcaption><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">The picture above presents the meshing log and convergence plot of a simulation with low-quality mesh. Low-quality mesh metrics are marked with red color. The convergence plot indicates that simulation diverged approximately after 400 iterations. The results from this simulation will be unreliable. For more information about convergence, please check the <a href=\"https:\/\/www.simscale.com\/knowledge-base\/how-to-check-convergence-of-a-cfd-simulation\/\">How to Check Convergence of a CFD Simulation?<\/a> article.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"https:\/\/frontend-assets.simscale.com\/media\/2021\/12\/high_quality.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"442\" src=\"https:\/\/frontend-assets.simscale.com\/media\/2021\/12\/high_quality-1024x442.png\" alt=\"meshing log shows high mesh quality and convergence plot shows a successful simulation\" class=\"wp-image-48804\" srcset=\"https:\/\/frontend-assets.simscale.com\/media\/2021\/12\/high_quality-1024x442.png 1024w, https:\/\/frontend-assets.simscale.com\/media\/2021\/12\/high_quality-300x129.png 300w, https:\/\/frontend-assets.simscale.com\/media\/2021\/12\/high_quality-768x331.png 768w, https:\/\/frontend-assets.simscale.com\/media\/2021\/12\/high_quality-1536x663.png 1536w, https:\/\/frontend-assets.simscale.com\/media\/2021\/12\/high_quality.png 1604w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">Figure 8: Example for a successful simulation with  a high mesh quality<\/figcaption><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Above, you see the meshing log and convergence plot from a successful simulation. High-quality mesh metrics are marked with blue color. The residual plot shows that the simulation is stable. This example shows that improving the mesh quality metrics created a significant impact on the simulation stability.<\/p>\n\n\n\n<h3 id=\"mesh-visualization\" class=\"wp-block-heading\" >2.2 Mesh Visualization<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Mesh quality metrics can be accessed in the navigation tree under \u2018<em>Mesh<\/em>\u2019 after the meshing is finished.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"232\" height=\"148\" src=\"https:\/\/frontend-assets.simscale.com\/media\/2020\/06\/tree.png\" alt=\"simscale simulation tree part for mesh visualization\" class=\"wp-image-29501\"\/><figcaption class=\"wp-element-caption\">Figure 9: Finding mesh quality in the simulation tree<\/figcaption><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">The post-processing viewer loads the mesh and computes the mesh quality on the fly. It might, therefore, take up to a few minutes for big meshes (&gt; 10 Million cells). You can display the different mesh quality metrics the same way result fields are displayed for simulation results.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/frontend-assets.simscale.com\/media\/2024\/07\/mesh-value-whole-domain.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1920\" height=\"934\" src=\"https:\/\/frontend-assets.simscale.com\/media\/2024\/07\/mesh-value-whole-domain.png\" alt=\"global distribution of non orthogonality degrees \" class=\"wp-image-93927\" srcset=\"https:\/\/frontend-assets.simscale.com\/media\/2024\/07\/mesh-value-whole-domain.png 1920w, https:\/\/frontend-assets.simscale.com\/media\/2024\/07\/mesh-value-whole-domain-300x146.png 300w, https:\/\/frontend-assets.simscale.com\/media\/2024\/07\/mesh-value-whole-domain-1024x498.png 1024w, https:\/\/frontend-assets.simscale.com\/media\/2024\/07\/mesh-value-whole-domain-768x374.png 768w, https:\/\/frontend-assets.simscale.com\/media\/2024\/07\/mesh-value-whole-domain-1536x747.png 1536w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><\/a><figcaption class=\"wp-element-caption\">Figure 10: Displaying a value over the surface of the whole domain.<\/figcaption><\/figure>\n<\/div>\n\n\n<h3 id=\"isolate-cells-based-on-a-metric\" class=\"wp-block-heading\" >2.3 Isolate Cells Based on a Metric<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">While all display filters are available for mesh fields, the <em>Isovolume<\/em> filter is especially handy. This filter allows you to isolate bad quality cells by adjusting the minimum or maximum threshold value to the recommended limits. The following picture shows how to create an <em>Isovolume<\/em>:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/frontend-assets.simscale.com\/media\/2024\/07\/mesh-quality-aspect-ratio-scaled.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"2560\" height=\"1348\" src=\"https:\/\/frontend-assets.simscale.com\/media\/2024\/07\/mesh-quality-aspect-ratio-scaled.jpg\" alt=\"demonstration about how to create a insovolume to isolate the elements based on a limit and a metric to be shown\" class=\"wp-image-93928\" srcset=\"https:\/\/frontend-assets.simscale.com\/media\/2024\/07\/mesh-quality-aspect-ratio-scaled.jpg 2560w, https:\/\/frontend-assets.simscale.com\/media\/2024\/07\/mesh-quality-aspect-ratio-300x158.jpg 300w, https:\/\/frontend-assets.simscale.com\/media\/2024\/07\/mesh-quality-aspect-ratio-1024x539.jpg 1024w, https:\/\/frontend-assets.simscale.com\/media\/2024\/07\/mesh-quality-aspect-ratio-768x404.jpg 768w, https:\/\/frontend-assets.simscale.com\/media\/2024\/07\/mesh-quality-aspect-ratio-1536x809.jpg 1536w, https:\/\/frontend-assets.simscale.com\/media\/2024\/07\/mesh-quality-aspect-ratio-2048x1078.jpg 2048w\" sizes=\"auto, (max-width: 2560px) 100vw, 2560px\" \/><\/a><figcaption class=\"wp-element-caption\">Figure 11: Isolating bad elements using <em>Isovolumes<\/em><\/figcaption><\/figure>\n<\/div>\n\n\n<ol class=\"wp-block-list\">\n<li>Open the <em>Mesh quality<\/em> feature.<\/li>\n\n\n\n<li>Create a new <em>Isovolume<\/em> by clicking the <strong>&#8216;+&#8217;<\/strong> button next to it.<\/li>\n\n\n\n<li>Select the metric you want to analyze.<\/li>\n\n\n\n<li>Use the sliders to adjust the limits of what you want to be displayed.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Sometimes the worst elements in the mesh will be very small, and when you try to isolate them, they will be hard or near enough impossible to spot. In such a case, it is helpful to hide the <em>Parts<\/em> completely and use the home button next to the orientation cube to zoom into the current extents of the visualization. In case there are tiny bad elements in several parts of the model, you may find yourself needing to restrict the <em>Isovolume<\/em> thresholds further. Once you have zoomed into the bad elements, you can then enable the <em>Part <\/em>visualization again to locate the cells within the model.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/frontend-assets.simscale.com\/media\/2024\/07\/isolate-element.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1920\" height=\"937\" src=\"https:\/\/frontend-assets.simscale.com\/media\/2024\/07\/isolate-element.png\" alt=\"demonstration about how to utilize the home button for finding tiny elements in a mesh\" class=\"wp-image-93929\" srcset=\"https:\/\/frontend-assets.simscale.com\/media\/2024\/07\/isolate-element.png 1920w, https:\/\/frontend-assets.simscale.com\/media\/2024\/07\/isolate-element-300x146.png 300w, https:\/\/frontend-assets.simscale.com\/media\/2024\/07\/isolate-element-1024x500.png 1024w, https:\/\/frontend-assets.simscale.com\/media\/2024\/07\/isolate-element-768x375.png 768w, https:\/\/frontend-assets.simscale.com\/media\/2024\/07\/isolate-element-1536x750.png 1536w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><\/a><figcaption class=\"wp-element-caption\">Figure 12: Finding single elements in the whole domain by using the home button.<\/figcaption><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">If you are wondering how to create good meshes, check out the <a href=\"https:\/\/www.simscale.com\/docs\/tutorials\/creating-a-standard-mesh-heat-sink\/\">meshing tutorial for the standard mesher<\/a>.<\/p>\n\n\n\n<h2 id=\"things-to-do-when-the-mesh-quality-is-low\" class=\"wp-block-heading\" >3. Things to Do When the Mesh Quality is Low<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Low mesh quality most likely causes numerical errors and cause divergence (simulation failure). In some cases, simulations do not fail but end up with unreliable results. Therefore, if you observe any of those problems, check the meshing log first. Compare the quality metrics with our best practices. If the metrics show that the mesh quality is insufficient, visualize the mesh, using the mesh quality tool. A complete mesh quality check and how to improve a mesh guide can be found in the <a href=\"https:\/\/www.simscale.com\/knowledge-base\/how-to-check-and-improve-mesh-quality\/\">How to check and improve mesh quality?<\/a> article. In this article, you will find some practical measures to improve the mesh quality. This includes updating the CAD model and adjusting the mesh settings.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Our OpenFOAM solvers allow adjusting of the numerics. If the mesh quality is questionable, as a last resort, you may also adjust the numerics to overcome the mesh quality-related numerical errors. <\/p>\n\n\n\n<h3 id=\"relaxation-factors\" class=\"wp-block-heading\" >3.1 Relaxation Factors<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">You may adjust the relaxation factors to <strong>&#8216;Automatic&#8217;<\/strong>. For more information about the relaxation factors, check out <a href=\"https:\/\/www.simscale.com\/docs\/simulation-setup\/numerics\/relaxation-factors\/\">the CFD Numerics: Relaxation factors<\/a> page.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/frontend-assets.simscale.com\/media\/2021\/12\/image-12.png\"><img loading=\"lazy\" decoding=\"async\" width=\"771\" height=\"448\" src=\"https:\/\/frontend-assets.simscale.com\/media\/2021\/12\/image-12.png\" alt=\"relaxation type and factors under simscale flow simulation numerics\" class=\"wp-image-48802\" srcset=\"https:\/\/frontend-assets.simscale.com\/media\/2021\/12\/image-12.png 771w, https:\/\/frontend-assets.simscale.com\/media\/2021\/12\/image-12-300x174.png 300w, https:\/\/frontend-assets.simscale.com\/media\/2021\/12\/image-12-768x446.png 768w\" sizes=\"auto, (max-width: 771px) 100vw, 771px\" \/><\/a><figcaption class=\"wp-element-caption\">Figure 13: Recommended automatic relaxation type<\/figcaption><\/figure>\n<\/div>\n\n\n<h3 id=\"non-orthogonal-correctors-\" class=\"wp-block-heading\" > 3.2 Non-orthogonal Correctors <\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Non-orthogonal correctors intend to correct the fluxes in the flow direction by repeating the pressure iterations. As a result, they increase the computational requirement. The increase in the <em>Number of non-orthogonal correctors<\/em> should be with respect to the maximum non-orthogonality metric:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>If the <em>max nonOrthogonality<\/em> is below 75, no need for any non-orthogonal corrector.<\/li>\n\n\n\n<li>If the <em>max nonOrthogonality<\/em> is between 75 and 82, use 1 non-orthogonal corrector.<\/li>\n\n\n\n<li>If the <em>max nonOrthogonality<\/em> is between 82 and 85, use 2 non-orthogonal correctors.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">If the <em>max nonOrthogonality<\/em> is above 85, better improve the mesh quality. In this case, it is no longer feasible to increase the number of non-orthogonal correctors.<\/p>\n\n\n\n<h3 id=\"gradient\" class=\"wp-block-heading\" >3.3 Gradient<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The cellLimited scheme limits the gradient such that when cell values are extrapolated to faces using the calculated gradient, the face values do not fall outside the bounds of values in surrounding cells.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A limiting coefficient is specified after the underlying scheme for which 1 guarantees boundedness and 0 applies no limiting. Practically speaking, use 0 for accuracy and 1 for improving stability.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>If the non-orthogonality is between 75 and 80, use cellLimited least squares 1.0.<\/li>\n\n\n\n<li>If the non-orthogonality is above 80, use cellLimited Gauss linear 1.0.<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/frontend-assets.simscale.com\/media\/2021\/12\/gradient-1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"854\" height=\"342\" src=\"https:\/\/frontend-assets.simscale.com\/media\/2021\/12\/gradient-1.png\" alt=\"gradient settings under simscale flow simulation numerics\" class=\"wp-image-48806\" srcset=\"https:\/\/frontend-assets.simscale.com\/media\/2021\/12\/gradient-1.png 854w, https:\/\/frontend-assets.simscale.com\/media\/2021\/12\/gradient-1-300x120.png 300w, https:\/\/frontend-assets.simscale.com\/media\/2021\/12\/gradient-1-768x308.png 768w\" sizes=\"auto, (max-width: 854px) 100vw, 854px\" \/><\/a><figcaption class=\"wp-element-caption\">Figure 14: Recommended gradient settings for a high-quality mesh (left) and low-quality mesh(right)<\/figcaption><\/figure>\n<\/div>\n\n\n<h3 id=\"divergence\" class=\"wp-block-heading\" >3.4 Divergence<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The divergence schemes are convective discretization schemes. Briefly, first-order schemes are easier to converge and second-order schemes are more accurate.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>If the non-orthogonality is between 75 and 80, use second order schemes, such as <em>Gauss linear upwind<\/em> or <em>Gauss limited linear<\/em>.<\/li>\n\n\n\n<li>If the non-orthogonality is above 80, use first order schemes, such as <em>Bounded Gauss upwind<\/em>.<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/frontend-assets.simscale.com\/media\/2021\/12\/divergence.png\"><img loading=\"lazy\" decoding=\"async\" width=\"847\" height=\"246\" src=\"https:\/\/frontend-assets.simscale.com\/media\/2021\/12\/divergence.png\" alt=\"divergence settings under simscale flow simulation numerics\" class=\"wp-image-48807\" srcset=\"https:\/\/frontend-assets.simscale.com\/media\/2021\/12\/divergence.png 847w, https:\/\/frontend-assets.simscale.com\/media\/2021\/12\/divergence-300x87.png 300w, https:\/\/frontend-assets.simscale.com\/media\/2021\/12\/divergence-768x223.png 768w\" sizes=\"auto, (max-width: 847px) 100vw, 847px\" \/><\/a><figcaption class=\"wp-element-caption\"> Figure 15: Recommended divergence settings for a high-quality mesh (left) and low-quality mesh(right) <\/figcaption><\/figure>\n<\/div>\n\n\n<h3 id=\"laplacian\" class=\"wp-block-heading\" >3.5 Laplacian<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Laplacian is a differential operator given by the divergence of the gradient of a scalar function. A typical Laplacian term is the diffusion term in the momentum equations. The limiter coefficient varies between 0 and 1. <\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><em>Limiter coefficient 0<\/em>: Uncorrected, bounded correction, 1st order, non-conservative. Suitable for low-quality meshes.<\/li>\n\n\n\n<li><em>Limiter coefficient 1:<\/em> Corrected, unbounded correction, 2nd order, conservative. Suitable for high-quality meshes.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">You may use the following best practices in selecting the Laplacian schemes:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><span style=\"font-size: revert; color: initial;\">Non-orthogonality&lt;70: Use <\/span><em style=\"font-size: revert; color: initial;\">Gauss linear corrected<\/em><span style=\"font-size: revert; color: initial;\"> or <\/span><em style=\"font-size: revert; color: initial;\">Gauss linear limited corrected <\/em><span style=\"font-size: revert; color: initial;\">with <\/span><em style=\"font-size: revert; color: initial;\">Limiter coefficient 1<\/em><span style=\"font-size: revert; color: initial;\">.<\/span><\/li>\n\n\n\n<li><span style=\"font-size: revert; color: initial;\">75&lt;Non-orthogonality&lt;80: Use <\/span><em style=\"font-size: revert; color: initial;\">Gauss linear limited corrected<\/em><span style=\"font-size: revert; color: initial;\"> with <\/span><em style=\"font-size: revert; color: initial;\">Limiter coefficient 0.5<\/em><span style=\"font-size: revert; color: initial;\">.<\/span><\/li>\n\n\n\n<li><span style=\"font-size: revert; color: initial;\">Non-orthogonality&gt;80: Use <\/span><em style=\"font-size: revert; color: initial;\">Gauss linear uncorrected<\/em><span style=\"font-size: revert; color: initial;\"> or <\/span><em style=\"font-size: revert; color: initial;\">Gauss linear limited corrected <\/em><span style=\"font-size: revert; color: initial;\">with <\/span><em style=\"font-size: revert; color: initial;\">Limiter coefficient 0.333<\/em><span style=\"font-size: revert; color: initial;\">.<\/span><\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/frontend-assets.simscale.com\/media\/2021\/12\/laplacian.png\"><img loading=\"lazy\" decoding=\"async\" width=\"852\" height=\"432\" src=\"https:\/\/frontend-assets.simscale.com\/media\/2021\/12\/laplacian.png\" alt=\"laplacian settings under simscale flow simulation numerics\" class=\"wp-image-48808\" srcset=\"https:\/\/frontend-assets.simscale.com\/media\/2021\/12\/laplacian.png 852w, https:\/\/frontend-assets.simscale.com\/media\/2021\/12\/laplacian-300x152.png 300w, https:\/\/frontend-assets.simscale.com\/media\/2021\/12\/laplacian-768x389.png 768w\" sizes=\"auto, (max-width: 852px) 100vw, 852px\" \/><\/a><figcaption class=\"wp-element-caption\">  Figure 16: Recommended laplacian settings for a high-quality mesh (left) and low-quality mesh(right)  <\/figcaption><\/figure>\n<\/div>\n\n\n<h3 id=\"surface-normal-gradient\" class=\"wp-block-heading\" >3.6 Surface Normal Gradient<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Similarly to the Laplacian terms, use the following best practices for the <em>Surface normal gradients<\/em>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Non-orthogonality&lt;70: Use <em>Gauss linear corrected<\/em> or <em>Gauss linear limited corrected <\/em>with <em>Limiter coefficient 1<\/em>. <\/li>\n\n\n\n<li>75&lt;Non-orthogonality&lt;80: Use <em>Gauss linear limited corrected<\/em> with <em>Limiter coefficient 0.5<\/em>.<\/li>\n\n\n\n<li>Non-orthogonality&gt;80: Use <em>Gauss linear uncorrected<\/em> or <em>Gauss linear limited corrected <\/em>with <em>Limiter coefficient 0.333<\/em>.<\/li>\n<\/ul>\n\n\n\n<div class=\"hw-block hw-note hw-note--info hw-note\">\n    <div class=\"hw-note__title\">\n        <p class=\"hw-note__titleText\"><i class=\"fa fa-exclamation-circle\" aria-hidden=\"true\"><\/i>Note<\/p>\n    <\/div>\n    <div class=\"hw-note__body\">\n        <p>If you have questions or suggestions, please reach out either via the <a href=\"https:\/\/www.simscale.com\/forum\/\">forum<\/a> or <a href=\"mailto:support@simscale.com\">contact us<\/a> directly.<\/p>\n    <\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>This standard documentation covers what is mesh quality and why it&#8217;s important. Before starting to read this document,...","protected":false},"author":108,"featured_media":29503,"parent":14059,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"templates\/template-documentation.php","meta":{"_acf_changed":false,"_crdt_document":"","inline_featured_image":false,"footnotes":""},"class_list":["post-28233","page","type-page","status-publish","has-post-thumbnail","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.simscale.com\/wp-json\/wp\/v2\/pages\/28233","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.simscale.com\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.simscale.com\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.simscale.com\/wp-json\/wp\/v2\/users\/108"}],"replies":[{"embeddable":true,"href":"https:\/\/www.simscale.com\/wp-json\/wp\/v2\/comments?post=28233"}],"version-history":[{"count":0,"href":"https:\/\/www.simscale.com\/wp-json\/wp\/v2\/pages\/28233\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/www.simscale.com\/wp-json\/wp\/v2\/pages\/14059"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.simscale.com\/wp-json\/wp\/v2\/media\/29503"}],"wp:attachment":[{"href":"https:\/\/www.simscale.com\/wp-json\/wp\/v2\/media?parent=28233"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}