Adaptive Meshing for CFD

Developing solutions using Computational Fluid Dynamics (CFD) often challenges simulation engineers. These simulations may require long computational times and large amounts of computer memory. AltaSim regularly solves complex CFD problems and finds that meshing is a critical component for run-time and computer memory issues. To help you solve your CFD problems with less frustration and more confidence in your results, AltaSim has developed this Tip on adaptive mesh refinement.

When performing CFD analyses, adaptive mesh refinement can be useful for mesh convergence studies and for resolving regions with rapid changes in the flow variables that are not adjacent to walls (such as free shear layers or shock waves). COMSOL Multiphysics has built-in adaptive meshing that can be used for any type of model, and it can be easily activated in the Adaptation and Error Estimates section of the settings for stationary study steps, but the default settings are not always optimal for CFD problems. The presence of boundary layers and boundary layer meshes in CFD models can lead to several difficulties with adaptive meshing:

  • Coarsening of the mesh may occur in regions that have lower error. This can adversely affect solver convergence and model accuracy, especially if layers of the boundary layer mesh are removed.
  • Mesh refinement may be concentrated in regions of the boundary layer rather than in the regions where it is most needed. .
  • For complicated 3D geometries with a boundary layer mesh, the software may be unable to generate the adapted mesh due to difficulties interacting with the existing boundary layer mesh.
If unwanted coarsening occurs, this can be adjusted by unchecking the Allow coarsening box in the Adaptation and Error Estimates settings. We generally recommend turning off coarsening for CFD simulations.
October 2021 p1
If unwanted refinement occurs in the boundary layer or a meshing failure occurs during the adaptation, these problems can be overcome by excluding the problem areas from the adaptive meshing process. The simplest way to do this is to subdivide the fluid geometry so that the regions where mesh refinement is desired are in separate domains from the regions where mesh refinement is not desired. Then, go to the Geometric Entity Selection for Adaptation section of the settings for the stationary study step, set the geometric entity level to Domain, and select the domains where mesh refinement is desired.
October 2021 p2
Alternatively, the user can exert full control over the adaptation process by defining a custom error indicator that can be a function of both spatial location and the solution variables. This option is enabled by changing the error estimate method to Error indicator in the Adaptation and Error Estimates settings and specifying a user-defined error expression. Refinement will preferentially occur where this error expression is larger, and no refinement will occur where this error expression is zero.
October 2021 p3

To learn more about Computational Fluid Dynamics, visit our webpage. If you are interested in training for CFD, then please click here to learn more about our course.