Simcenter FLOEFD Mesh Convergence Study for flow in channels

2024-12-03T13:27:30.000-0500
FLOEFD for Creo FLOEFD (Standalone) FLOEFD for Catia V5 FLOEFD for NX FLOEFD for Solid Edge Simcenter FLOEFD SC

Summary

One of the most overlooked issues in Computational Fluid Dynamics (CFD) that affects the accuracy of solution is the mesh convergence. In general, a denser mesh will provide better accuracy, but you should tend to create an optimal mesh and to avoid redundant refinement to avoid excessive computational time. The usual way of estimating the accuracy of the solution consists in obtaining solutions on several different meshes, from coarse to fine, so, if beginning from some mesh in this set, the difference in the physical parameters of interest between the solutions obtained on the finer and coarser meshes becomes negligible from the standpoint of the solved problem (the solution flattens), then the accuracy of the solution of the mathematical problem is considered to be attained, since the solution mesh convergence is reached. In this article, it is described the process to perform a mesh convergence study for a flow in channels using a parametric study in FLOEFD.


Details

When performing a calculation, it is important to try different mesh settings and analyze the obtained results carefully in order to understand whether it is necessary to refine the mesh or a coarser resolution is acceptable for the desired accuracy.

For flows through channels, FLOEFD uses the "thin channel" approach which uses an empirical solution in pipes and straight channels resolved with only 1 or a few cells. The “Thin Channel” model works best in flat channels or straight pipes; if a pipe or channel has “turns” and the fluid is liquid, then the “thin channel” prediction is less accurate for pressure drop but still quite good for temperature prediction.
In order to increase the accuracy for pressure drop, you need to refine the mesh in the channel to switch the solver to numerical mode once the number of cells per gap or channel is equal or greater than 7. 

Below it can be found a comparison for different pipes configuration with different "turns".

As it can be seen, for a project with many "turns", the results change between a coarse and a fine mesh. But how fine the mesh should be and what is the accurate result between these two? This article describes the process to perform a mesh convergence study for flows through channels, but the process can be extended to other types of flow. The process assumes that all the boundary conditions and general settings have been established.

1. Set the appropriate goals

The values of interest are essentially the main outputs from the simulation and will be used to compare different meshes. In this example we create goals for pressure drop (dP), temperature increase (dT) and average outlet velocity to make sure that these values have converged to a steady value with every mesh, otherwise the simulation might stop before the important results reach convergence. 

2. Define an initial mesh

In this case, the global mesh controls the refinement in the channels, since the channel refinement is the main setting that controls the number of cells, that is the only refinement strategy turned on in this project, all the other refinements are inactive.

Starting from a coarse mesh, it is defined to have 2 cells across the channel, with a level of refinement = 0. As a best practice, it is recommended to activate the "Display refinement level" option to visualize how the refinement is performed, in that way it can be estimated the refinement level required for different number of cells across the channel/gap.

3. Run the simulation and create plots

Run the base project, inspect the results and create relevant postprocessing plots, such as a mesh plot in specific regions or a pressure cut plot in zones with high gradients. These plots can be used to have a visual comparison of the mesh refinement and the results. For example:

4. Parametric study - Input variables.

A parametric study is created to perform the mesh independence study. Using a parametric study helps to easily compare and run multiple mesh configurations without the need to create separate FLOEFD projects.

For the study mode select "What if analysis". In the Input variables tab, select "add simulation parameter" and choose Global mesh ->Narrow channels -> "Maximum channel refinement level" and "Characteristic Number of Cells Across channels" from the Add Parameter list.

By doing this, we are able to control the number of cells and the channel refinement level to test different mesh scenarios in the study.

Select the two parameters from the "Input variables" tab, right click on them and choose "Combine".

Double click on the "Values column" to open the "Discrete Values" table. In this table, set the pair of mesh settings for every run. Ideally, there should be a reasonable difference between the grid resolution between subsequent meshes. This is necessary because if the refinement is similar, the results will change very little, causing a false impression of mesh independence. For demonstration purposes, in this project the number of cells across the channels will be set to 2, 5, 10, 15, 20 and 25, with the channel refinement level of 0, 1, 3, 3, 4, 4 respectively. The channel refinement level values were obtained by inspecting the initial mesh, as described in the Step 1.

With these settings, FLOEFD will create 6 different studies with different meshes to inspect how the results change when the mesh is refined. 

5. Parametric Study - Output Variables

In the output variables tab, select "Add Goal" and choose the relevant goals to monitor the results for the different meshes. For this project, the important parameters are the pressure drop (dP), temperature increase (dT) and the outlet velocity.

Additionally, choose "Results Summary" and add the total cells from the "Add summary result" list. 

It is recommended to also add relevant plots for the mesh and important parameters to compare them after the simulation, this can be done using the "Add results" option. In that way, the output parameters tab is as follows:

6. Parametric Study - Scenario 

In the "Scenario" tab all the design points will be displayed according to the information from the "Input variables" tab.

To reduce calculation time, activate the "Take previous results" checkbox for all the design points, additionally you can choose the proper number of cores for the simulation and the maximum number of simultaneous runs. Click "Run" to solve the design points.

7. Parametric Study - Results

After the parametric study finishes, you can inspect the results in the "Scenario" or in the "Goals" tab. For this case, going from 2 to 25 cells across the channels increased the total number of cells from 674 to 834,434.

If plots were added as output parameters, you can explore them in the appropriate tabs. For example, the following image shows the mesh plots for the different studies:

8. Mesh convergence plots.

A good way to check for a mesh independent solution is to plot a graph of the goals values vs the number of cells in the simulation. In this case, it is relevant to use the number of cells across the channel instead of the total number of cells, since the channel refinement was the only refinement used and it directly controls the number of cells in the project. The plots below show six results for the pressure drop and outlet velocity, each from a different mesh.

dP.png

Vel.png

As it can be observed, for this example, the asymptotic convergence region is achieved when using 10 or more cells across the channel. The results using 10 or 25 cells across the channels differs only for around 1.5% despite the cell count increased almost 10 times, from 93,391 to 834,434. With that information, it can be defined the proper refinement level that gives you the smaller number of cells and still maintains precision in the solution.

In practice, it is not necessary to run simulations with excessive refinement (as the case with 25 cells across the channel), the solutions can be inspected during as the parametric study runs, if the asymptotic convergence is reached before running all the design points, the parametric study can be stopped.

KB Article ID# KB000155491_EN_US

Contents

SummaryDetails

Associated Components

Simcenter FLOEFD for Creo