Models - Mph.piston Mesh
Models - Mph.piston Mesh
Model Definition
Create a tetrahedral mesh for the geometry of an engine piston as shown in the
following figure.
As you can see the geometry contains small details such as fillets and chamfers. To
better resolve these details with the mesh you will work with the following mesh
parameters:
1 | F R E E TE T R A H E D R A L M E S H I N G O F A P I S T O N G E O M E T R Y
Solved with COMSOL Multiphysics 5.1
You will also learn how to use the tools for assessing the mesh quality.
Modeling Instructions
NEW
1 From the File menu, choose New.
2 In the New window, click the Blank Model button.
3 On the Home toolbar, click Add Component and choose 3D.
GEOMETRY 1
Import 1
1 On the Home toolbar, click Import.
2 In the Settings window for Import, locate the Import section.
3 Click the Browse button.
4 In your COMSOL installation directory navigate to the folder applications/
COMSOL_Multiphysics/Meshing_Tutorials/ and double-click the file
piston_quarter.mphbin.
5 Click Import.
2 | F R E E TE T R A H E D R A L M E S H I N G O F A P I S T O N G E O M E T R Y
Solved with COMSOL Multiphysics 5.1
The Messages window indicates that there are roughly 27,000 tetrahedral elements
in this mesh.
Assume that the current mesh does not resolve details such as fillets and chamfers
sufficiently for your simulation needs and a finer parameter setting is required. This
would be the case for a stress analysis of the part.
2 In the Settings window for Mesh, locate the Mesh Settings section.
3 From the Element size list, choose Finer.
3 | F R E E TE T R A H E D R A L M E S H I N G O F A P I S T O N G E O M E T R Y
Solved with COMSOL Multiphysics 5.1
This mesh consists of approximately 358,000 elements. Many of the finer details of
the geometry are adequately resolved, but there is a significant increase in the total
number of elements compared to the Normal mesh setting.
In the following you will test how to tune mesh parameters to refine the mesh only
on selected boundaries.
MESH STATISTICS
Continue with examining the quality of the mesh.
4 | F R E E TE T R A H E D R A L M E S H I N G O F A P I S T O N G E O M E T R Y
Solved with COMSOL Multiphysics 5.1
The Statistics window contains details about the mesh, including the number and
type of elements, and a histogram of element quality.
The element quality has a value between 0 and 1, where 1 describes a perfectly
symmetric element and 0 describes a degenerated, or completely flat, element. For
3D meshes in general a minimum quality of about 0.1 means a satisfactory mesh.
5 | F R E E TE T R A H E D R A L M E S H I N G O F A P I S T O N G E O M E T R Y
Solved with COMSOL Multiphysics 5.1
However, this depends on the type of geometry and physics application. Note also
that the quality number is calculated based on the linear elements.
Meshing with predefined parameter sets usually results in a mesh with quite good
quality. According to the information under the section Domain element statistics,
the present mesh has an average quality of 0.72 with a minimum quality of 0.12.
The histogram reveals the element quality distribution. In this case, the elements
with low quality, represented by the tail of the distribution plot, represent a very
small fraction of the mesh.
Before adjusting individual mesh parameters start by restoring the mesh with the
Normal size settings.
2 Right-click Component 1 (comp1)>Mesh 1 and choose Settings.
3 In the Mesh settings window, locate the Mesh Settings section.
4 From the Element size list, choose Normal.
5 Click the Build All button.
MESHING SEQUENCE
1 Right-click Component 1 (comp1)>Mesh 1 and choose Edit Physics-Induced Sequence.
You can now access and modify the default meshing sequence that appears under
the Mesh 1 node.
The first Size feature node in the meshing sequence is a global attribute node, since
it influences all subsequent operation nodes in the meshing sequence. This first Size
node cannot be deleted from the sequence.
Instead of editing parameters of the global Size node add a Size node to the Free
Tetrahedral 1 mesh operation.
2 In the Model Builder window, under Component 1 (comp1)>Mesh 1 right-click Free
Tetrahedral 1 and choose Size.
The Size 1 node is a local attribute node because it only applies to its parent mesh
node.
RESOLUTION OF CURVATURE
1 In the Settings window for Size, locate the Geometric Entity Selection section.
2 From the Geometric entity level list, choose Boundary.
6 | F R E E TE T R A H E D R A L M E S H I N G O F A P I S T O N G E O M E T R Y
Solved with COMSOL Multiphysics 5.1
By selecting only one of the fillets you can save time generating the mesh while
testing parameter values. You will be able to change the selection of the Size 1 node
to all boundaries after you have found the right set of parameters.
4 In the Settings window for Size, locate the Element Size section.
5 Click the Custom button.
6 Locate the Element Size Parameters section. Select the Curvature factor check box.
7 In the associated text field, type 0.2.
The Curvature factor parameter determines the size of boundary elements compared
to the curvature of the geometric boundary. The curvature radius multiplied by the
curvature factor gives the maximum allowed element size along the boundary. A
lower value gives a finer mesh along curved boundaries.
8 Click the Build All button.
Zoom in on the selected boundary for a closer look at the mesh.
Boundary 39
7 | F R E E TE T R A H E D R A L M E S H I N G O F A P I S T O N G E O M E T R Y
Solved with COMSOL Multiphysics 5.1
It seems that reducing the resolution of curvature had almost no effect on the number
of mesh elements on the fillet. The reason is that another mesh parameter limits the
minimum element size allowed in the mesh.
This time the selected boundary has a much finer mesh. Adjust the mesh again by
increasing the resolution of curvature.
6 In the Settings window for Size, locate the Element Size Parameters section.
7 In the Curvature factor text field, type 0.45.
8 | F R E E TE T R A H E D R A L M E S H I N G O F A P I S T O N G E O M E T R Y
Solved with COMSOL Multiphysics 5.1
Now assume that you also want a better resolution of narrow regions with no
curvature such as chamfers.
Boundary 8
Narrow
region
2 In the Settings window for Size, locate the Element Size Parameters section.
3 Select the Resolution of narrow regions check box.
4 In the associated text field, type 2.
The Resolution of narrow regions mesh parameter controls the number of element
layers that are created in narrow regions (approximately). If the value of this
parameter is less than one, the mesh generator might create elements that are
anisotropic in size in narrow regions.
9 | F R E E TE T R A H E D R A L M E S H I N G O F A P I S T O N G E O M E T R Y
Solved with COMSOL Multiphysics 5.1
Assume that you are happy with the parameter settings for curved and narrow regions.
Now apply these for all boundaries of the geometry.
10 | F R E E TE T R A H E D R A L M E S H I N G O F A P I S T O N G E O M E T R Y
Solved with COMSOL Multiphysics 5.1
5 Click the Go to Default 3D View button on the Graphics toolbar to get the view in
the figure below.
The fine details of the geometry are resolved satisfactorily with this mesh of
approximately 315,000 tetrahedral elements.
Continue with checking the mesh quality.
11 | F R E E TE T R A H E D R A L M E S H I N G O F A P I S T O N G E O M E T R Y
Solved with COMSOL Multiphysics 5.1
Compared to the mesh with the Finer predefined mesh parameter set, the average
quality is slightly less and the minimum quality is also lower. This is expected because
the boundaries are finely meshed and the elements are growing toward the inner parts
of the geometry according to the Normal parameter set specified in the global Size
node. Allowing even higher element growth will reduce the number of elements
further and will result in even lower element quality.
12 | F R E E TE T R A H E D R A L M E S H I N G O F A P I S T O N G E O M E T R Y
Solved with COMSOL Multiphysics 5.1
The mesh now consists of approximately 185,000 elements while keeping the fine
mesh on curved and narrow boundaries.
13 | F R E E TE T R A H E D R A L M E S H I N G O F A P I S T O N G E O M E T R Y
Solved with COMSOL Multiphysics 5.1
As expected the increase of the growth rate parameter results in even lower quality.
The histogram reveals that the distribution has a “thicker tail,” with the low quality
elements making up a larger than before fraction of the total element number.
A mesh plot can help with localizing the worst quality elements.
MESH PLOT
1 On the Mesh toolbar, click Plot.
The Mesh 1 plot is added to the 3D Plot Group 1 under the Results section of the
model Builder window. The default mesh plot that appears in the Graphics window
contains the surface elements colored according to quality.
2 In the Model Builder window, under Results>3D Plot Group 1 click Mesh 1.
3 In the Settings window for Mesh, click to expand the Element Filter section.
14 | F R E E TE T R A H E D R A L M E S H I N G O F A P I S T O N G E O M E T R Y
Solved with COMSOL Multiphysics 5.1
You can now see 0.5% of the tetrahedral elements with the worst quality. These are
mostly located in the regions where the elements are growing from the surfaces toward
the inside of the geometry.
15 | F R E E TE T R A H E D R A L M E S H I N G O F A P I S T O N G E O M E T R Y
Solved with COMSOL Multiphysics 5.1
16 | F R E E TE T R A H E D R A L M E S H I N G O F A P I S T O N G E O M E T R Y