Simcenter STAR-CCM+ A new user's guide to Simcenter STAR-CCM+ simulation (Part 3/5): Meshing

2021-03-25T21:36:19.000-0400
Simcenter STAR-CCM+ Simcenter STAR-CCM+ Virtual Reality Teamcenter Share Simcenter STAR-CCM+ Viewer Simcenter STAR-CCM+ Application Specific Solutions

Summary

The third part of a series of introductory articles on Simcenter STAR-CCM+ simulation, focusing on meshing as the last step in geometry preparation.


Details

Welcome Back! 

This is the third in a series of introductory articles to Simcenter STAR-CCM+ simulations. This article will discuss meshing, as the last step in pre-processing the geometry. The volume of interest for the simulation must be broken down into small cells that contact each other throughout the domain. This mesh will be what the solver steps through to generate the solution, and if it is poorly structured it will cause the solution to diverge. A good overview can be found in the Spotlight on... Meshing Meshing happens in two ways; here we will talk about Parts-based meshing as it offers several advantages over Region-based meshing. For a more detailed discussion of the differences between them, see Part Based Meshing vs Region Based Meshing

Regions interlude: What we have discussed so far is breaking the geometry down into parts that then can be manipulated. The simulation regions define areas of the geometry that may encompass more than one part, or just a section of a part. They define inlets, outlets and walls of the simulation. To assign parts to regions, right-click on a part and use the selection menu that pops up to assign parts and their surface to regions. For a successful volume mesh, assign inlet and outlet boundary conditions appropriately prior to mesh generation to ensure the volume mesh is propagated accordingly. 

Back to meshing: 

User-added image
Volume mesh of a heat exchanger

The meshers are contained in the simulation tree under Geometry > Parts > Operations > Automated Mesh. It is wise to complete the automated mesh operations after the other preparation operations to ensure the geometry is ready to be meshed. With all the meshers, it is important to check both the size of the cells and the target size to ensure the mesh will be fine enough to capture most of the geometry. Further refinement methods will be discussed later. The following are some of the more common meshers used, and one surface mesher and one volume mesher must be selected for every part: 

  • Surface remesher: The surface is tessellated to generate the shapes you see, however the Surface remesher will refine this and ensure a conformal mesh across all parts. This mesher is the only surface mesher option and is required to be selected for 3D meshes. 

Optionally, after selecting the surface remesher one can enable Automatic Surface Repair. This can help repair small errors in the surface, although it is not recommended for multi-volume models, and cannot repair non-manifold edges or vertices, or correct free edges. See When should I use the "automatic surface repair"? 

User-added image
Surface mesh of a valve.
 

Core volume meshers: One of the following must be selected for each volume:  

  • The Tetrahedral mesh operation fills the volume with tetrahedrons that strictly conform to the outer surface mesh completed earlier. This is the fastest of the three core volume operations and is typically used in solid mechanics or thermal FE simulations. For flow meshes, Polyhedral or Trimmed cell meshers are advised.

  • The Polyhedral volume mesher is a good balance between speed and efficiency and creates a high-quality mesh. The mesher starts by building a tetrahedral mesh, then combines cells to generate the poly mesh with a lower number of cells, though each is slightly larger. This mesher is the most common core volume mesher, used most often in internal flows, and its benefits are discussed in What is the benefit of a polyhedral mesh?

  • The trimmed cell mesher is a very efficient mesher, useful especially in external aerodynamics cases. This creates hexahedral cells in a grid across the entire region being meshed. Unlike the previous two, this cannot guarantee a conformal mesh, so it is not always the ideal selection. This a useful tool to create flow aligned meshes, as discussed in How to generate a flow aligned meshes   For more information, watch 4 Tips to Mastering the Trimmed Cell Mesher

User-added image
Volume mesh of a valve.
 

Optional volume meshers: 

  • Thin mesher: This is useful if your geometry has thin sections (not zero-thickness baffles). This mesher can automatically determine which sections are thin, generate a prismatic mesh on the parts and ensure a conformal mesh with the selected core volume mesher to the rest of the mesh. This most commonly used for thin solid parts. A good discussion of this tool can be found as Understanding the Thin Mesher 
"Optional" boundary layer meshers​​:
  • The Prism Layer mesh is not very optional, in flows it is highly recommended if not required for an accurate solution as it will ensure capture of the boundary layer and accurate turbulence modeling. In solids it serves little to no purpose however, and can be disabled. It creates prismatic cells on the walls in your simulation, ensuring you capture boundary layer effects like friction and flow separation.  
  • The number of prism layers depends on the thickness and setup, see Do I need prism layers? How many should I use?

  • Prism layer thickness depends on the wall y+ treatment you select, and much more detailed direction can be found in How to create an accurate prism layer mesh in 5 Steps

User-added image
Prism layers on a boundary.
 

2-D Meshing: Sometimes it is acceptable and more efficient to simulate a two-dimensional case due to symmetry in the model. In this case, and appropriate 2-D mesh must be generated. Before this can be completed, the entire part surface that will be meshed must lie in the Z=0 plane. For a walkthrough, watch the video How to use the 2D-meshing Operation in a pipeline.

  • Before a 2D mesh can be run the part needs to be “Badged”, which specifies what surfaces and edges are suitable for 2D simulation. Then, a volume mesher can be used. 

While the meshes have controls for size specifications, we don’t want our mesh to be refined to the smallest necessary value everywhere - that would be quite inefficient. Instead we use Custom Controls to specify local areas of refinement ensure a high-quality mesh. For any overlapping controls, the one with the smaller size (the finer mesh control) will take precedence. The controlled parameters are discussed in What is meant by minimum and target surface size?

  • Curves, surfaces and parts can have controls placed directly on them, to refine the item and the surrounding mesh. 

  • Volumetric Controls are applied to a part volume affecting all the surfaces and volume meshes within that part. Create a shape part around the geometry to use as the input to a volumetric control to catch all the features inside to refine. 

These refinements can take quite some time to process, not very efficient if we need to refine just a small area. By selecting “Perform local surface meshing” in the automated mesh properties, you will have the option to define volumes (often shape parts) as local extents. These then will remesh after the initial, coarse mesh each time something inside the extent has changed, a surface or volume control for example. See How to use local remeshing.

Once a volume mesh has been generated, we should check its validity and quality. The mesh may generate and when visualized appear to capture the geometry, but it is important to ensure the cells are of high quality and not invalid (no negative volume cells, for example). Checking mesh validity and cell skewness will catch most problems. The video How to check the volume mesh quality is a good resource to start with. 

User-added image
External Aerodynamics with the trimmed cell mesher.

To visualize your mesh, you can either create a mesh scene or apply the mesh representation to an existing scene. Right-click in the scene, select "Apply representation", and then the appropriate mesh you would like to view. Now with a complete, high-quality volume mesh we can turn our attention to the physics setup of our problem: defining the continua and assigning them to regions, then solving the simulation and analyzing the results. 

KB Article ID# KB000032357_EN_US

Contents

SummaryDetails

Associated Components

Design Manager Electronics Cooling In-Cylinder (STAR-ICE) Job Manager Simcenter STAR-CCM+