Fill out the form to download

Required field
Required field
Not a valid email address
Required field

Documentation

Creating a Standard Mesh on the Example of a Heat Sink

This short tutorial shows how to create a mesh using the Standard mesh tool. As an example case, a free cooling of a heat sink model is chosen for performing a Conjugate Heat Transfer Analysis.

You can copy the project template from here.

You can also check the following respective public project.

1. Create a New Simulation

  • As a first step, we need to create a new simulation. To create a simulation, left-click on the CAD model and then on the ‘Create Simulation’.
create a new simulation in simscale
Creating a new simulation on selected geometry

This dialog box allows the user to select the simulation model. Click on the ‘Conjugate Heat Transfersimulation, and then click ‘Create Simulation’.

simulation library choosing cht
Creating a new CHT simulation

The default settings for the simulation are kept the same. Save the simulation model by clicking on the tick mark.

cht global settings
Assigning CHT simulation settings

2. Meshing

2.1 Default Settings

The following figure shows the standard meshing setup:

global mesh settings for standard mesher in simscale
Global mesh settings
  1. Click on the Mesh icon to create a new mesh.
  2. Choose the ‘Standard’ Algorithm.

For the first mesh we keep the default settings:

  • Keep Automatic boundary layers activated. If the Boundary Conditions (BC) are set and a simulation run is performed, this option will help mesher to generate boundary layers (BL) automatically.
  • Physics based meshing refines the mesh automatically according to the assigned boundary conditions
  • Hex element core generates hexahedral elements inside the interior domain.
  • Specify the Number of processors for the meshing operation (16 in this tutorial). In general the automatic option is a good choice. The more cores does not necessarily mean faster calculation.
  • Give a name to your mesh by double-clicking on the mesh title.

Once the mesh generation is finished, check the mesh info. You can see how many cells and nodes are generated, how much time did it take and how many core hours consumed. You can also expand the Event log to see additional information regarding the mesh.

details of the finished mesh
Mesh information
meshing log
Mesh event log

From the current view, we only see the mesh on the surfaces of the flow domain. You can hide the flow domain to see the mesh on the Heat sink and Chip parts. Under the Mesh tree, left-click on the eye icon next to the Air domain to hide it.

visualizing single parts of a geometry
Hiding mesh regions

If you had multiple volumes to hide, the following workflow would be more useful:

  • Use the Select Volume feature.
  • Using right-click, select multiple mesh regions.
  • Left-click on the workbench and select Hide selection option.
how to use the volume option
Using Select Volume feature to hide mesh regions

The current mesh looks too coarse. For simulating heat sinks, it is recommended to generate a minimum of 2 or 3 elements across the fin thickness. Let’s generate a new mesh with a fineness level of 7.

2.2 Global Refinement

You can simply increase the fineness level, but once you start a new mesh operation, the old one will be deleted. To keep the old one, right-click on the mesh and select create a new mesh option. In new mesh settings, select fineness level ‘7’ by using the slider or double-clicking on fineness value and assigning 7. Name the new mesh and generate it.

mesh settings standard mesh with finess of seven
Create a new mesh

The new mesh contains 1.5M elements, which is double the previous one. Generated number of elements is correlated with many geometrical properties, therefore it is hard to predict how large/coarse an updated mesh will become.

comparison of a coarse and fine mesh
Comparison of coarse and fine meshes, generated by using global mesh settings

The fineness level changes the mesh size globally. Comparing the new and previous meshes, there is almost no obvious change in the element size on the heat sink. This shows that a large portion of refinement is performed in the air domain. Local refinement on heat sink and chip would be a more cost-effective way to generate a mesh.

2.3 Local Refinement

Create a new mesh refinement, using fineness level 5. Measure the fin thickness, using the ruler in the workbench. The thickness of the fins is approximately 2mm. Click on the ‘+’ icon next to ‘Refinements‘ under the ‘Mesh. Select Local element size. This is a refinement option to limit the cell sizes on surface elements.

adding a mesh refinement
Adding local mesh refinement

Assign maximum edge length and select small surfaces. The maximum element size will ensure that there isn’t any element with a larger size than what we assign. To keep the mesh density low as possible, avoid selecting large surfaces of the heat sink. The maximum edge length of 0.001m will ensure to create a minimum of 2 elements across the thickness.

defining a mesh refinement
Assigning local refinement settings
comparing mesh with and without refinements
Comparison: Default mesh & Surface refinement mesh

Surface refinement increased the mesh density on fins significantly. So far, we learned how to visualize the mesh on surfaces. This does not give any information regarding the interior elements. A Mesh clip is recommended to see the interior elements.

how to create a mesh clip
Creating a mesh clip

Depending on the mesh size, generating a mesh clip will take some time.

inspecting deltails of a finished mesh
View from mesh clip

As can be seen, while surface elements are tetrahedral, interior elements are hexahedral. from the heat sink region to the air domain, mesh size suddenly increases. While this is not a big deal in thermal conductivity, it may cause inaccuracy or even create instability in flow simulations. Additionally, due to the natural convection, hot air is expected to rise along the vertical axis of the heat sink. Therefore, a region refinement is recommended.

2.4 Region Refinement

Is it possible to keep the previous mesh setting and updating it with region refinement? To do that, click on the current mesh and Duplicate the mesh.

original and copied mesh settings
Duplicating a mesh

Click on the ‘+’ icon next to Refinements under the Mesh. Select Region refinement. This is a refinement option to limit the cell sizes within a volume.

adding region refinement to the mesh
Adding a region refinement

The maximum edge length defines the maximum element size within the defined region. Assign it as 0.004m. Next, we need to define the region. If there was a region that was created earlier, you could simply activate it. Here, we need to create a new region by clicking the ‘+’ icon next to Refinement regions. Select the cartesian box to define the region as a box:

defining the region refinement size
Creating a cartesian box to define the region of refinement

Next, define the coordinates of the cartesian box. It should fully cover the heat sink and chip. Consider the possible flow motion while deciding where the refinement region.

adding a geometry primitive
Defining cartesian box

Go back to the region refinement and assign the new cartesian box.

assigning a geometry primitive
Choose a refinement region

Generate the mesh, and use cutting planes to visualize the mesh.

mesh after region refinement
Mesh resolution after region refinement

The mesh resolution looks better now.

To correctly model the flow through the fins, the boundary layer has to be resolved accurately. This can be achieved by refining the mesh in the regions close to the walls. A practical and cost-effective approach is to create layers on the walls. As a default, Automatic BL option adds 3 layers:

boundary layers of a mesh
Default BL generation

BL’s can be also generated manually. This will let you have full control over the BL generation.

2.5 Inflate Boundary Layers

Duplicate the previous mesh and rename it.

  • To add a BL refinement, click on the ‘+’ icon next to Refinements under the Mesh.
  • Select the Inflate boundary layer setting.
adding boundary layer refinement
Creating BL mesh refinement
  • Assign 5 to Number of layers. This will ensure that 5 layers will be generated on selected surfaces. First, hide the solid parts, then use box select to select the air surfaces around the solid parts.
  • You can control the BL thickness by specifying the growth rate or the first layer thickness.
  • Never create BL’s on inlet and outlet surfaces, they should only be applied to surfaces representing physical walls.
defining boundary layers
Adding BLs manually

Generate this mesh and see the layers by mesh clip.

solution of boundary layer refinements
5 BL around the heat sink

Up to now, we’ve learned how to use automatic and manual mesh refinements. There are a few other settings you can consider. Let’s turn back to the initial mesh (Default mesh) we created. You can select an old mesh by simply clicking the current mesh and navigate to the one you would like to select.

selecting between the different existing meshes
Switch back to an earlier mesh

Check your CAD model again by hiding the air domain. You will see that there are some small faces printed on the heat sink. These faces are obviously not relevant for this study, on the other hand, they will increase the mesh density or might even cause mesh failure. Now view the mesh to confirm that they cause undesirable mesh density.

visualizing the impact of small features
Small features increase mesh intensity

Next we will learn how to control the global mesh size, adding gap refinements, and solve small feature issue.

2.6 Manual Sizing

Create a new mesh and assign switch the Sizing to Manual. You will see the Manual edge length option. This will let you limit the largest cell size in the whole domain.

standard mesh settings using manual option
Manual mesh sizing

2.7 Advanced Settings

Expand the Advanced settings feature. You will see the following settings:

  • Small feature suppression: This will help to suppress small faces
  • Number of Gap elements: This will help to automatically generate up to 4 elements in gaps

In many cases, the mesher can suppress small features. In this example, the smallest edge of the printed faces is 0.2mm. To be able to suppress them, we should use a bigger size limit.

  • Assign 0.0005m to the small feature suppression.
small features within a heat sink geometry
Small features printed on the heat sink

The number of Gap elements feature sets automatic sizing to the elements inside gaps. In this view, we cannot see the elements inside the air domain, but usually, element size on a domain surface is identical to the neighbor element. Therefore element sizes on the heat sink can give an idea regarding the air element sizes in the gaps.

defining gap size and element size
Gap size and gap elements

You do not have to assign an integer to the number of gap elements option, but you can also use integers. Here is how sizing works:

how to estimate  the cell size
Number of Gap elements and how it defines the gap element size
  • Assign 2 to the number of Gap elements option
standard mesh settings using manual sizing and small feature suppression
Advanced mesh settings

Once the mesh is completed, you will see that:

  • The maximum element size created the elements with defined sizing limitations.
  • Small features on the side of the heat sink are neglected from mesh refinement.
  • There are 2 elements in every gap.
mesh result from manual and advanced mesh sizing
Result of manual and advanced mesh sizing

Congratulations! This concludes the standard meshing tutorial.

Contents
Data Privacy