you are here:   / News & Insights / Engineering Advantage Blog / 10 Things to Consider When Creating a Mesh for CFD Analysis

Engineering Advantage

10 Things to Consider When Creating a Mesh for CFD Analysis

Server room geometry | CFD Consulting
March 7, 2017 By: Jonathan Dudley

We've had many enquiries from people wanting to know more about meshing, so I thought I’d offer some advice on the approach I typically use when beginning a meshing project. Meshing always starts with the geometry and the age old adage “Garbage In = Garbage Out”. Anyone that has been running CFD solvers for a while knows all too well how important a role meshing, and for that matter clean geometry, plays in any CFD simulation. Generally, I find myself asking the same questions or ensuring I have followed the advice suggested below for each project. For the purpose of this post I will consider preparing and meshing a server room shown in Figure 1, above.

1. The first step in the analysis requires preparing the geometry for meshing. This often requires cleaning the CAD model by eliminating small edges, joining faces, splitting the geometry up for meshing, and defeaturing. For this example, I decided I did not wish to model the recess in the server cabinets and removed those prior to meshing as shown in Figure 1.

2. Decide on your mesh connectivity constraints early on by paying attention to key regions. This really boils down to the use of mesh interfaces in your model. Some examples where interfaces are typically required are for rotating components, between solid-fluid bodies for conjugate heat transfer, and for modeling a porous media.

3. Decompose your model - deciding whether the domain will be multiple body, single body, or formed into a part based on the mesh connectivity constraints. Figure 2 illustrates one method for decomposing the server room geometry for a brick mesh. It also illustrates that, for this geometry, a single body may be used for tetrahedral meshing. If using brick elements, it is often advantageous to decompose your geometry into regions that can be conveniently meshed with local size controls. Try to use 1-1 connections as much as possible by forming your bodies into a part. Plan to make use of hexahedral elements by sweep or multizone meshing where feasible. Most efficient CFD meshes for complex geometries are hybrid in nature and consist of a combination of tetrahedral and brick elements.

4. Use selective meshing for multiple body meshing, paying particular attention to the meshing order. You will want to ensure you mesh any swept or multizone bodies first.


Figure 2: Server Room Geometry Prepared for Brick and Tetrahedral Meshing


The resulting meshes for each method are illustrated in Figure 3. The meshes use the same global size and inflation settings. The tetrahedral mesh is nearly three times the element count of the brick mesh. The mesh statistics illustrated in item 8 below reveal that the tetrahedral element mesh also resulted in a lower quality mesh.


Figure 3: Resulting Hexahedral & Tetrahedral Mesh for the Server Room


5. Use named selections to group features of interest, such as bodies and faces, that are used to define inlets, outlets, walls or other areas where data will be collected. Remember to group both surfaces and volumes. The use of named selections can be very useful for quickly turning surfaces on and off for visualization purposes when post-processing.


Figure 4: Example of Named Selections Grouping Surfaces


6. Make sure you are using the appropriate physics meshing preferences inside ANSYS meshing, for example.

7. Do not neglect inflation layers! Use them to resolve near wall flow gradients. In a previous blog post, I discussed estimating the y-plus value that can be used as a starting point.


Figure 5: Example of Boundary Layer Meshing


8) The use of advanced size functions is recommended for most CFD analyses.

9) Pay attention to mesh quality and try to limit highly skewed elements or large aspect ratio elements. Many times, additional mesh quality checking can be performed by the solver of choice or the use of CFD-Post by plotting iso-volumes. Figure 6 gives a side by side comparison of the brick element and tetrahedral mesh overall mesh statistics. It also shows a histogram of the orthogonal quality for the tetrahedral mesh and the elements which fall below 0.3.


Figure 6: Mesh Statistics & Histogram Plot for Assessing Mesh Quality

10) Use growth rate settings with caution. A default growth rate of 1.2 is commonly accepted in CFD analyses in an attempt to grow cell volumes gradually and capture flow physics appropriately. Minor changes in the growth setting can have a large impact on your total volume mesh cell count!

I hope you found this post to be both helpful and informative. If you’d like more information on any specific point, or would like to expand on this list, feel free to post a comment!