mesh_tutorial
TRANSCRIPT
-
8/13/2019 Mesh_tutorial
1/12
Mesh Quality Tutorial
Figure 1: The MeshQuality model. See Figure 2 for close-up ofbottom-right area
This tutorial will illustrate the importance of Mesh Quality in
PHASE2. This tutorial will also show how to identify a poor
quality mesh, and explain how to improve the quality.
Mesh Refinement is a new feature and is only available in
PHASE2version 5.0. Mesh Quality locates and indicates the
poor quality elements with blue rectangular boxes and red
hatching (see Figure 2).
Poor quality elements are undesirable because they negativelyaffect the results. A poor quality mesh can display results that
are more mesh dependant than model dependent. This will be
shown in the third section. In extreme cases, when theelements are of very poor quality, the computation may not
converge and no results will be available.
This tutorial is divided into three parts:
Identifying poor quality elements
Improving the mesh quality
Results: before and after improving the mesh quality
-
8/13/2019 Mesh_tutorial
2/12
Figure 2: Located poor quality elements. Note the extremely slendersliver elements on the right-hand side. See Figure 1 for larger view.
Identifying Poor Quality Elements
Figure 3:Triangular mesh element
showing the longest side, shortestside, maximum interior angle and theminimum interior angle.
By default, poor quality elements are those elements with one
(or more) of the following (see Figure 3):
Ratio of maximum side length to minimum side length islarger than 10
Minimum interior angle is smaller than 20 degrees
Maximum interior angle is larger than 120 degrees
In this tutorial, we will examine a staged circular excavation of
about 14 metres in diameter. This model has a number of
different stage boundaries that intersect each other and the
excavation. The method that was used to construct the model,
which created several vertices that are very close to each other,
generated a few extremely poor quality elements.
If you have not already done so, run the PHASE2MODEL
program and open the MeshQuality.fea data file located in the
examples folder in your PHASE2installation folder.
Mesh Refinement
We will begin by zooming in on the excavation. This helps you
to see the area we will be interested in.
Select: ViewZoomZoom Excavation
Now, locate the poor quality elements b y selecting the Show
Mesh Quality option within the Mesh Menu.
Select: MeshMesh RefinementShow Mesh Quality
-
8/13/2019 Mesh_tutorial
3/12
Figure 4: Poor quality elements are highlighted.
You should get something like Figure 4. The poor quality
elements are hatched in red and are bounded by blue rectangles.
You can have a better view by zooming in to each individual
element that has been highlighted.
For the purpose of this tutorial, we will concentrate on the
elements on the right-hand side of the lower horizontal stage
boundary, where it intersects the excavation (the elements in the
lower right in Figure 4).
Select: ViewZoomZoom Window
Zoom in on the poor quality elements on the right side of the
lowest horizontal stage boundary, where it intersects the
excavation at around coordinate (155, 345).
Figure 5:Close-up of poor quality elements in lower-right
In Figure 5, the 4 selected elements have a side length ratio
greater than 10. Lets zoom in on the two on the right (seeFigure 6).
-
8/13/2019 Mesh_tutorial
4/12
Figure 6:ExamineSliver elements in MeshQuality.fea
These two elements are so narrow that they are not even visible
unless you focus on them particularly, thus producing
significant errors in the computation.
If you zoom in close enough, you can see that the two vertices
on the shortest side of the elements are very close to each other
(approximately 5 mm apart). The upper vertex is from the
evenly distributed vertices of the circular excavation when the
excavation was created. The lower vertex was created by the
intersection of the excavation and the horizontal stage boundary.
Another way of finding poor quality elements is to read the info
viewer.
Select: FileInfo Viewer
Under the section of Mesh Quality, you can see the detailedreport on the statistics of all the mesh elements in this project(see Chart 1).
You cant locate poor quality elements with the Info Viewer, but
you can examine the quantity and distribution of these elements.
This helps to analyze the situation. Not all poor quality
elements can have significant negative affect to the results. In
general, the worse the shape of the element, the more it will
affect the results, so it is most important to remove the worst
shaped elements.
-
8/13/2019 Mesh_tutorial
5/12
Chart 1: Mesh Quality info for MeshQuality.fea
Define Mesh Quality
You can also define your own criteria for poor quality elements
with Define Mesh Quality.
Select: MeshMesh RefinementDefine Mesh Quality
Figure 7:The default input for Mesh Quality
As shown in Figure 7, you can change the criteria for poor
elements, and whether to high light poor quality elements on the
mesh or not. You can also change the number of divisions forstatistics in Info Viewer. By default, the elements are separated
into ten groups (see Chart 1). You can narrow down the result
by entering a larger number of divisions.
Mesh Quality14 of 5006 Elements ( 0.3 % of elements) are poor quality elements
5 of 5006 Elements ( 0.1 % of elements) are poor quality elements because of theside length ratio
14 of 5006 Elements ( 0.3 % of elements) are poor quality elements because of theminimum interior angle
1 of 5006 Elements ( 0.0 % of elements) are poor quality elements because of themaximum interior angle
(elements can be of poor quality for more than one reason)
Mesh Quality StatisticsThe worst element has (ratio = 100.58), (min angle = 0.56) (max angle = 123.91)
10.0% of elements have: (ratios > 2.0), (min angles < 30.2) (max angles > 91.8)20.0% of elements have: (ratios > 1.7), (min angles < 35.6) (max angles > 88.2)
30.0% of elements have: (ratios > 1.5), (min angles < 40.4) (max angles > 82.2)40.0% of elements have: (ratios > 1.4), (min angles < 43.6) (max angles > 77.6)
50.0% of elements have: (ratios > 1.3), (min angles < 46.2) (max angles > 74.7)60.0% of elements have: (ratios > 1.3), (min angles < 48.4) (max angles > 72.3)
70.0% of elements have: (ratios > 1.2), (min angles < 50.3) (max angles > 70.0)80.0% of elements have: (ratios > 1.2), (min angles < 52.3) (max angles > 67.9)
90.0% of elements have: (ratios > 1.1), (min angles < 54.2) (max angles > 66.0)100.0% of elements have: (ratios > 1.1), (min angles < 56.2) (max angles > 63.9)
Poor quality elements are those with:
(maximum side length) / (minimum side length) > 10.00Minimum interior angle < 20.0 degrees
Maximum interior angle > 120.0 degrees
-
8/13/2019 Mesh_tutorial
6/12
Improving Mesh Quality
The best way to reduce the number of poor quality elements isto adjust the boundaries by moving or deleting the vert ices.
First, zoom in to the group of poor quality elements on the right
side of the lowest horizontal stage boundary (see Figure 5).
Moving Vertices
The two poor quality elements on the left were created because
the two vertices on the minimum length side are too close. One
way to fix this problem is to move one of the vertices further
away from the other. In this situation, it is easier to move the
lower vertex because this vertex is only on one boundary.
Select: EditVerticesMove Vertices
Meshing
Now, discretize and mesh the model.
Select: MeshDiscretize
All of the model boundaries will be discretized, and then
generate the mesh by selecting the Mesh option within the Mesh
menu.
Select: MeshMesh
The mesh will be generated, based on the discretizations of the
boundaries.
Show mesh quality again.
Select: MeshMesh RefinementShow Mesh Quality
Select Vertices to move [Enter=done, esc=quit]:
u se t h e mo us e t o cl i c k on t h e l o wer l e f t v er t e x
a t a r o u nd 155 . 8 , 3 46 . 0 2
Select Vertices to move [Enter=done, esc=quit]:p r e s s En t e r
Enter base point [esc=quit]: use ve r t e x snap
( r i ght - c l i c k and s el ec t v er t ex snap) t o c l i c k
on t he same ver t ex
To point [esc=quit]: use t he mouse t o c l i c k on
any poi nt t hat i s c l os e t o t h e mi dpoi nt of t he
or i gi nal l i ne segment ( t r y t o sel ec t a poi nt
t hat wi l l k eep t h e s egment a st r ai ght l i ne)
-
8/13/2019 Mesh_tutorial
7/12
Figure 8: The highlighted region no longer has any poor qualityelements.
As you can see in Figure 8, the two elements (highlighted region
in the figure) are no longer considered poor quality elements.
Deleting Vertices
Now, zoom into the two poor quality elements on the right inFigure 5 (see Figure 6).
The two vertices on the minimum length side are so close that
you cant really see the two elements unless you zoom in a lot.
You can simply fix this problem by deleting one of the vertices.
In this case, it is better to remove the vertex that exists only on
the excavation, rather than the vertex at the intersection of the
stage boundary and the excavation boundary. This is to avoid
modifying the geometry of the stage boundary. Therefore, we
will remove the upper vertex.
Select: EditVerticesDelete Vertices
To see the result, discretize and mesh the model.
Meshing
Select: MeshDiscretize
All of the model boundaries will be discretized. Then generate
the mesh by selecting the Mesh option within the Mesh menu.
Select: MeshMesh
Select vertices to delete [enter=done,esc=quit]: Use mous e t o c l i c k o n t h e v e r t e x at
a r ound 144 . 7 , 346 . 02
Select vertices to delete [enter=done,
esc=quit]: p r es s En t e r
-
8/13/2019 Mesh_tutorial
8/12
Show mesh quality again.
Select: MeshMesh RefinementShow Mesh Quality
The two poor quality elements are not there anymore.
Repeat the steps of moving or deleting vertices to fix all the
poor quality elements. Save the file as MeshQualityFixed.fea
Results: Before and After Improving the Mesh Quality
Open the file MeshQualityFixed.fea. Run COMPUTE to
analyze the model. To view the results of the analysis:
Select: FileInterpret
This will start the PHASE2INTERPRET program.
Open the file MeshQuality.fea once again.
Now there are two files open in the INTERPRET. Tile the two
windows (see Figure 9).
Select: WindowTile Horizontally
You are now viewing the Sigma 1 contours for Stage 1.
Toggle around with different data types at different stages and
compare the results.
Figure 9: The Strength Factor Contour for Stage 4. The top graph isbefore improving the mesh quality, and the bottom graph is after
improving the mesh quality.
-
8/13/2019 Mesh_tutorial
9/12
-
8/13/2019 Mesh_tutorial
10/12
6. Click on the first radio button and select OK on the dialog
box.
7. The values correspond to the stage and the data type you
are viewing. Select the stage tabs, and observe the change
in the values.
8. Click on the window MeshQuality.fea and repeat the
above steps to create another query for the data before
mesh refinement.
9. Select different data types (eg. Sigma 1, Strength Factor)
at different stages for the two files and observe the
differences in the values (see Figure 12).
Figure 12: Queries on Total Displacement for Stage 4. The top graph
is before improving the mesh quality, and the bottom graph is afterimproving the mesh quality.
Graphing Queries from Different Files
Switch the data type back to viewing Total Displacement at
Stage 4 for both windows. Make sure the window of
MeshQuality: Total Displacement is selected.
1. Select: QueryWrite Query File
2. You will be prompted to select queries to write to a file.
Left click on the query (i.e. anywhere along the stage
boundary), then right-click and select Write Selected.
3. In the Save As dialog, save the query in a file called
MeshQuality
-
8/13/2019 Mesh_tutorial
11/12
4. You will see another dialog, allowing you to add a
comment which identifies the file. This is optional, but
you can put in Before Mesh Refinement, and select Add
Comment.
5. Now select the window of MeshQualityFixed.fea: Total
Displacement.
6. Select: GraphGraph Material Queries.
7. You will be prompted to select queries. Select the query
with a left mouse click.
8. Right-click the mouse and select Add From File.
9. In the Open file dialog, open the MeshQuality file that
you saved in step 3.
10. You should see an information dialog, informing you that
the query was successfully read. Select OK.
11. Right-click the mouse again, and select Graph Selected.Make sure stage 4 is checked. Then press create plot.
You should see the graph in Figure 13.
0.2
0.22
0.24
0.26
0.28
0.3
0.32
0.34
0.36
0 2 4 6 8 10 12
Distance (m)
TotalDisplacmenet(m)
Figure 13: Total Displacement in Stage 4, before and after MeshRefinement. The plot line with triangular markers is after improving
mesh quality. The plot line with square markers is before improvingmesh quality.
Info Viewer
Another way to analyze the results is to examine the info
viewer. In the model of the two files:
Select: FileInfo Viewer
Open the INFO VIEWER for both the MeshQuality.fea and
MeshQualityFixed.fea files. Tile the two windows vertically.
-
8/13/2019 Mesh_tutorial
12/12
Figure 14:Using vertex snap tochoose vertices for the stage boundary
Select: WindowTile Vertically
Chart 2: Mesh Quality Info for MeshQualityFixed.fea
Comparing Chart 1 and Chart 2, you can see that all elements
are of good quality after mesh refinement and the number and
quality of the elements before mesh refinement.
Tips
To avoid unnecessary work, you should check mesh
quality directly after meshing and before any support is
added. This will save you the effort of having to re-assign
material properties and to re-add support because any
added support and material assignments will be lost when
you discretize and mesh the model again.
The most frequent locations to find poor quality elements
are near boundary intersections, especially when there are
arcs around. For an arc, the vertices are generated so that
they are evenly distributed along the arc, thus the
positions of the vertices are not easily monitored. It is
very possible to have two vertices very close to each
other.
It is also recommended to use Vertex Snap when
selecting vertices for the stage boundary (see Figure 14).Many of the poor quality elements exist at the
intersections of stage boundaries and excavation
boundaries. Vertex snap ensures the exact selectio n of a
vertex on the circle, thus preventing vertices that are too
close to each other.
Custom Discretize allows you to set the number ofvertices on the selected boundary segments. You can
reduce the number of vertices in a particular boundary
segment, thus reducing the possibility of having two
vertices too close to each other.
Mesh Quality
All elements are of good qualityPoor quality elements are those with:
(maximum side length) / (minimum side length) > 10.00
Minimum interior angle < 20.0 degreesMaximum interior angle > 120.0 degrees