Advancements in technology are enhancing design exploration, with numerical simulation playing a crucial role in optimizing engineering design. Typically, computational fluid dynamics (CFD) simulations begin with a custom, handcrafted mesh with refined and coarsened areas to balance resolution and cell count in order to achieve accurate results in key regions. However, crafting a high-quality mesh can be time-intensive, as predicting where significant phenomena will occur is often difficult. This unpredictability may result in unnecessary refinement in non-critical areas. Manually created meshes can lead to excessive cell counts and longer solve times if over-refined or less accurate results if under-refined.
The quality of simulation results in mesh-based approaches relies heavily on the characteristics of the mesh. Poor mesh quality can negatively impact computational efficiency, increase computation time, and lead to unstable solutions. Furthermore, the quality of a CFD mesh depends on geometric details and requires careful adjustment of mesh parameters. An optimal mesh should improve at least one key simulation property, such as time to convergence, stability, or accuracy, without adversely affecting the others.
Meshing can be either uniform or non-uniform, with adaptive meshing being a common non-uniform technique in engineering simulations. While static meshing keeps fine and coarse areas constant, mesh adaptation modifies the mesh over time to improve resolution. In CFD analysis, choosing between adaptive mesh refinement (AMR) and static refinement affects both accuracy and efficiency. Adaptive meshing adjusts the densities in various regions according to solution characteristics, enabling you to start with a very coarse mesh and dynamically refine regions with high gradients.
In Ansys, solution-based mesh adaptation modifies coarse meshes according to numerical solutions, effectively capturing localized phenomena. Ansys Fluent provides tools for customizing adaptation fields. Dynamic mesh adaptation in Ansys Fluent can be integrated with the polyhedral unstructured mesh adaptation (PUMA) method, which does not rely on any templates for 3D refinement, providing flexibility across various element types. Additionally, a mesh can be coarsened after refinement.
Solution-adaptive refinement precisely places cells in the mesh, improving flow field accuracy. When used correctly, it creates an optimal mesh by directing cell placement based on the solution, reducing computational costs by focusing on critical areas. By this approach,
In manufacturing processes with complicated geometries or transient events, AMR enhances simulation accuracy by finely discretizing regions with steep gradients or high turbulence, all while avoiding a substantial rise in computational expenses.
In Ansys Fluent, solution-adaptive refinement offers substantial benefits. However, it is crucial to exercise caution to prevent potential issues. Here are some guidelines for effectively utilizing adaptive mesh refinement:
The surface mesh should be fine enough to accurately capture the essential features of the geometry. If the geometry contains curved boundaries and sharp corners, the cell count increases after mesh adaption, but the boundary of the curved domain retains its original shape with corners created with the initial mesh. So, if the geometry has curved profiles and sharp corners with a coarse mesh, the adapted mesh may not fully restore the curved profiles and corners at the perimeter of the geometry.
It is not a good practice to place too few nodes on a curved surface and rely on adaptive refinement to add more nodes. During mesh adaptation, the cross-sectional area remains constant, so the default adaptation function will increase the cell count, but the boundary of the curved domain will still show sharp corners. As illustrated in the figure, the curved face will retain the facets from the initial mesh (in this case, eight red segments), regardless of any additional nodes (marked in green) added through refinement to the original nodes (marked in blue).
For example,
When dealing with a coarse mesh for a geometry with curved profiles and sharp corners, the adapted mesh might not accurately capture these features at the geometry's edges. In such situations, geometry-based adaptation can be employed to reconstruct or recover the finer details of the geometry while the adaptation process is underway. This topic will be covered in the next blog [1].
The initial mesh must contain enough cells to effectively capture the essential characteristics of the flow field. For successful mesh adaptation, it is crucial to begin with a good-quality initial mesh, particularly in complex regions with steep gradients. If the initial mesh is too coarse, it may fail to accurately capture the flow's important characteristics, especially in areas where the geometry experiences abrupt changes, resulting in high gradients. In such cases, the adaptation process might degrade the mesh instead of enhancing it. An inadequate coarse mesh can lead to non-optimal conditions around restriction boundaries, producing high aspect ratio cells that may compromise gradient accuracy and affect predictions.
Ensure the solution is well-converged before starting adaptation, as adapting an incorrect solution can lead to errors in flow region assignments. Balance is key: adapting too early can cause issues while continuing iterations unnecessarily can waste time. This concern is less critical for automatic adaptation, which adjusts the solution at fixed intervals based on the solver.
Select suitable variables for gradient adaptation based on flow conditions. For incompressible flows, mean velocity gradients are typically more appropriate. However, incorporating pressure gradients into boundary layer adaptation can efficiently refine regions with significant pressure changes. In turbulent shear flows, prioritize turbulent parameter gradients, and in reacting flows, focus on variables such as temperature or the concentration of reacting species.
Avoid excessive refinement in any specific area of the solution domain, as it can lead to large gradients in cell volume. This poor adaptation practice can negatively impact the solution's accuracy.
Adaptive mesh refinement (AMR) has been successfully applied in various manufacturing scenarios, from aerospace component design to automotive engine simulations. For instance, in the aerospace industry, AMR has been used to enhance the accuracy of airflow simulations around aircraft wings, leading to better aerodynamic performance predictions and fuel efficiency improvements.
Ansys Fluent has introduced error-based adaptation criteria, i.e. the Hessian-Based Indicator, which identifies cells based on local errors in the solution relative to mesh size, commonly used in hypersonic problems. For example, when predicting shock formation around a bluff body in supersonic flow, the initial mesh must have enough cells and adequate resolution to accurately depict the body's shape. Subsequent gradient adaptation can then refine the shock and achieve a mesh-independent solution.
Similarly, in the automotive sector, AMR has facilitated more precise simulations of combustion processes within engines, contributing to the development of more efficient and environmentally friendly vehicles. These case studies highlight the practical benefits of AMR in improving simulation fidelity and supporting innovation in manufacturing processes.
Mesh adaption aids in simulating multiphase scenarios like liquid jets breaking up. The VOF to DPM hybrid model, combined with dynamic mesh adaption, tracks liquid-gas interfaces and converts separated liquid lumps into point masses, reducing the need for fine meshes. Adaptive mesh coarsening could also be used here to speed up the run. Dynamic mesh refinement and coarsening manage cell count by coarsening the mesh once a blob is transferred to the DPM model.
Best practices for combustion and multiphase applications have been embedded in Ansys Fluent’s mesh adaption setup panel, resulting in up to 70% cell count reductions and up to 4X speedups for steady-state cases.
reduction in cell count | speedup | |
Sandia Flame D test case | 30-70% | |
combustion and multiphase applications | up to 70% | up to 4X |
Balancing Accuracy and Computational Cost
Finding the right balance between accuracy and computational cost is crucial for effective mesh adaptation in Ansys Fluent. Begin by conducting a sensitivity analysis to assess how changes in mesh refinement impact your results. This initial step will help you identify the optimal mesh density needed for precise predictions while avoiding unnecessary computational overhead.
It is also recommended to implement hierarchical refinement strategies, where the mesh is progressively refined based on the evolving characteristics of the solution. This method allows for incremental improvements in accuracy while efficiently managing computational resources. Additionally, utilizing parallel computing capabilities in Ansys Fluent can help distribute the computational load, thereby accelerating the simulation process.
Ozen Engineering Inc. leverages its extensive consulting expertise in CFD, FEA, optics, photonics, and electromagnetic simulations to achieve exceptional results across various engineering projects, addressing complex challenges like multiphase flows, erosion modeling, and channel flows using Ansys software.
We offer support, mentoring, and consulting services to enhance the performance and reliability of your hydraulic systems. Trust our proven track record to accelerate projects, optimize performance, and deliver high-quality, cost-effective results for both new and existing water control systems. For more information, please visit https://ozeninc.com
[1] A blog on geometry-based adaption: https://app.hubspot.com/blog/4420950/editor/182745494529/content