Field Function Mesh Refinement
To achieve successively more accurate solutions, you can refine the mesh with respect to a solution quantity (such as turbulent kinetic energy). In Simcenter STAR-CCM+, you achieve successive refinement using mesh refinement tables or field functions.
Currently, the following meshers support field function mesh refinement:
If you apply other mesh controls—such as custom mesh values and volumetric controls—to a particular portion of the mesh, the smallest size takes priority.
The following steps outline the procedure for field function mesh refinement:
- Obtain a solution in the usual manner on the initial mesh.
- Create a field function that returns a mesh size value with respect to a solution quantity.
- Optionally, use this field function to fill an XYZ internal table with mesh sizes. The table properties define the regions and boundaries for which you require mesh refinement.
- Assign either the field function or the table as a property of the mesherl. Using the field function directly without filling a table is significantly faster and uses less memory.
- Run the surface mesher or volume mesher to produce the refined mesh.
- If you require further stages of mesh refinement from new solutions then you can repeat this process.
As this feature provides absolute mesh sizes, you can also coarsen the mesh when the field function returns a mesh size that is larger than the original.
注 | The Advancing Layer mesher also refines near-wall prism layers in addition to the core mesh. |
Mesh Size
Meters are the only length unit that field function mesh refinement recognizes—preferred units do not apply. Therefore, ensure that your field function returns the mesh size in meters.
The effect of the mesh size on the refinement is different for the trimmed, polyhedral, and tetrahedral mesher, due to the nature in which these meshes are generated:
- For the trimmed cell mesher, the mesh size is equivalent to the base size in the refinement zone. If the field function returns a value of zero, the mesh is not refined in that zone.
- For the polyhedral mesher, you can approximate the mesh size as follows:
Therefore, if the field function returns a value of 1.2*pow($Volume, 1/3), the polyhedral mesher maintains a similar mesh size in that zone.
- For the tetrahedral mesher, you can approximate the mesh size as follows:
Therefore, if the field function returns a value of 2*pow($Volume, 1/3), the tetrahedral mesher maintains a similar mesh size in that zone.
Examples of Field Function Mesh Refinement
The following examples show mesh refinement using the trimmed, polyhedral, and tetrahedral mesher. The field function refines the mesh in an area where the turbulence kinetic energy is greater than 4.0 J/kg:
- Trimmed Cell Mesher:
($TurbulentKineticEnergy>4)? 0.1 : 0
- Polyhedral Mesher:
($TurbulentKineticEnergy>4)? 0.1 : (1.2*pow($Volume, 1/3))
- Tetrahedral Mesher:
($TurbulentKineticEnergy>4)? 0.1 : (2*pow($Volume, 1/3))