Sei sulla pagina 1di 18

Tutorial 2.

Tetrahedral Mesh Generation

Introduction
The grid generation process is highly automated in TGrid. In most cases, you can use the
Auto Mesh feature of TGrid to create the volume mesh from the surface mesh. However,
in some cases, the boundary mesh contains irregularities or highly skewed boundary faces
that can lead to an unacceptable volume mesh or cause TGrid to fail while generating
the initial mesh. As a rule of thumb, check the boundary mesh before attempting to
generate the volume mesh.
This tutorial demonstrates the mesh generation procedure for a problem that has multiple
regions. It also demonstrates the procedure for generating a volume mesh using the
automatic refinement feature of TGrid.
In this tutorial, you will learn the volume mesh generation process which comprises the
following steps:

1. Read and display the boundary mesh

2. Check the skewness distribution of the boundary mesh

3. Check for free and unused (isolated) nodes

4. Improve the boundary mesh

5. Repair the boundary mesh

6. Enable the meshing of multiple regions

7. Initialize the mesh

8. Refine the initial volume mesh

9. Further refine the mesh

10. Check the cell skewness

11. Check and save the volume mesh


c Fluent Inc. May 25, 2006 2-1
Tetrahedral Mesh Generation

Some steps described in this tutorial may not be required in all cases, but
i are included to highlight the general capabilities of TGrid. Steps 2 through
7 explain the diagnostic tools in TGrid. In most cases where you know the
boundary mesh is acceptable, use the Auto Mesh/Initialize menu item to
perform the minimal boundary mesh checks and initialize the boundary
mesh, and then proceed to Step 8.

Prerequisites
This tutorial assumes that you have little experience with TGrid, but that you are familiar
with the graphical user interface.

Preparation
1. Download valve.zip from the Fluent Inc. User Services Center to your working
directory. This file can be found from the Documentation link on the TGrid product
page.

OR

Copy valve.zip from the TGrid documentation CD to your working directory.


• For UNIX systems, insert the CD into your CD-ROM drive and go to the
following directory:
cdrom/tgrid4.0/help/tutfiles/
where cdrom must be replaced by the name of your CD-ROM drive.
• For Windows systems, insert the CD into your CD-ROM drive and go to the
following folder:
cdrom:\tgrid4.0\help\tutfiles\
where, cdrom must be replaced by the name of your CD-ROM drive (e.g., E).

2. Unzip valve.zip.
The file, valve-sf.msh is found in the valve folder created on unzipping the file.

3. Start the 3D version of TGrid.

2-2
c Fluent Inc. May 25, 2006
Tetrahedral Mesh Generation

Step 1: Read and Display the Boundary Mesh


1. Read the boundary mesh.
File −→ Read −→Boundary Mesh...

(a) Select valve-sf.msh in the Files list.


(b) Click OK.


c Fluent Inc. May 25, 2006 2-3
Tetrahedral Mesh Generation

2. Display the boundary mesh (Figure 2.1).


Display −→Grid...

(a) Select boundary in the Face Zone Groups selection list to select all the boundary
zones in the Face Zones selection list.
(b) Click Display.

Y
XZ

Mesh
Restrictions: TGrid 4.0 (3D)

Figure 2.1: Boundary Mesh for the Valve Port

2-4
c Fluent Inc. May 25, 2006
Tetrahedral Mesh Generation

Step 2: Check the Skewness Distribution of the Boundary Mesh


Display −→ Plot −→Face Distribution...

1. Select all the zones in the Boundary Zones selection list.


2. Click Plot.

450.00

400.00

350.00

300.00

250.00
Faces
200.00

150.00

100.00

50.00

0.00
0.00 0.10 0.20 0.30 0.40 0.50 0.60 0.70 0.80 0.90 1.00
Y
XZ
Quality

Histogram of Face Quality, Equilateral Volume Deviation Method


TGrid 4.0 (3D)

Figure 2.2: Boundary Mesh Skewness Distribution

Extra: You can change the Minimum and Maximum skewness to display the number of
faces between two skewness values. It is a good practice to display the upper end of
the skewness range (e.g., between 0.8 and 1.0).


c Fluent Inc. May 25, 2006 2-5
Tetrahedral Mesh Generation

As a rule of thumb, keep the maximum boundary face skewness below 0.85. TGrid has
tools to improve the face skewness (as desribed in Step 4). This is practical only if you
have a relatively small number of boundary faces that are highly skewed. Otherwise, it is
recommended that you regenerate the boundary mesh using your surface mesh generator.

Step 3: Check for Free and Unused (Isolated) Nodes


Boundary −→Nodes...

1. Click Count Free Nodes.


TGrid reports the number of free nodes in the Message box.
Click Merge to remove mergable free nodes, if any. You may need to repeat this step
with a larger Tolerance if some free nodes are not removed the first time. However,
using a Tolerance that is too large can collapse faces.

Free nodes are nodes associated with free edges. There should not be any
i free nodes unless there are “thin walls” in the geometry. If a boundary
mesh contains free nodes when there should be none, there will be “holes”
in the boundary mesh and TGrid will report a “no live zone” error after
initializing the boundary mesh. Merging free nodes and deleting unused
nodes are part of the automatic procedure performed by TGrid when the
Auto Mesh/Initialize or Auto Mesh/Init & Refine menu item is used.

2-6
c Fluent Inc. May 25, 2006
Tetrahedral Mesh Generation

2. Click Count Unused Nodes.


TGrid reports the number of unused nodes in the Message box.
Click Delete Unused Nodes to remove unused nodes, if any.

Step 4: Improve the Boundary Mesh


Boundary −→Faces...

1. Improve the boundary mesh by performing edge swapping.


(a) Select all the zones in the Tri Boundary Zones selection list.
(b) Click Improve until TGrid reports zero modifications in the Message box.
When you click Improve, TGrid swaps the edges of boundary faces that violate
the Delaunay condition. Edge swapping is performed only if the Maximum
Angle between Face Normals is less than the specified value (10 degrees, by
default). Higher angles may distort the geometry represented by the boundary
faces.


c Fluent Inc. May 25, 2006 2-7
Tetrahedral Mesh Generation

2. Check the skewness of the worst boundary face.


(a) Click Skew.
TGrid reports that the worst boundary face is bf4995 with a skewness of 0.873.

The skewness of the volume mesh is always higher than that of the corresponding
boundary mesh. Try to improve the boundary mesh by edge swapping. When you use
Auto Mesh/Initialize or Auto Mesh/Init & Refine, Improve is automatically invoked.

Edge swapping does not always reduce the skewness of the boundary mesh.
! If the boundary mesh is still highly skewed, perform manual repairs, as
described in Step 5.

2-8
c Fluent Inc. May 25, 2006
Tetrahedral Mesh Generation

Step 5: Repair the Boundary Mesh


1. Display the worst face.
Boundary −→Modify...

(a) Click Skew.


TGrid selects the longest edge of boundary face bf4995 (bf4995-edge 01) and the
node opposite this edge (bn2575). TGrid also updates the grid display, limiting
it to the neighborhood of the selected items.
(b) Display the front view and zoom in to the area of interest (Figure 2.3).
Use the Views panel (opened using the Display/Views... menu item) to obtain
the front view shown in Figure 2.3. Then, use the mouse to zoom in and center
the object of interest in the graphics window.

2. Collapse boundary face bf4995 by merging the selected boundary node with the
longest edge of the face.
(a) Click Merge under Operation.
The modified mesh is shown in Figure 2.4.

If Auto Redisplay is selected in the Modify Boundary panel, the display will
i be updated after every operation. The graphics window update may take
some time if you are displaying a large part of the boundary mesh, or if
you do not restrict the display to the neighborhood of an object.


c Fluent Inc. May 25, 2006 2-9
Tetrahedral Mesh Generation

Y
Z X

Mesh
TGrid 4.0 (3D)

Figure 2.3: Boundary Mesh Near bf4995

Y
Z X

Mesh
TGrid 4.0 (3D)

Figure 2.4: Boundary Mesh after Merging

2-10
c Fluent Inc. May 25, 2006
Tetrahedral Mesh Generation

3. Click Skew in the Swap Face Edges panel to check the worst boundary face .
Boundary −→Faces...

Ideally, you should continue to modify the boundary faces until the maximum boundary
face skewness is below 0.85. In this tutorial, you will now proceed with the rest of the
mesh generation procedure.

Step 6: Enable the Meshing of Multiple Regions


Mesh −→ Tri/Tet −→ Controls −→Init/Mesh...

1. Select solid in the Non-Fluid Type drop-down list.


2. Click OK.
By default, TGrid automatically makes the cell zone with the largest volume (or the
cell zone that contains a boundary zone of the inlet, outlet, or far-field type) the
active fluid zone. TGrid treats the rest of the cell zones (non-fluid zones) as dead
zones and does not refine them.

• If you want to mesh multiple regions, change the Non-Fluid Type to solid or fluid
depending on the problem.
• If you have multiple fluid and solid regions, choose one of them and modify the
zone types as necessary using the Cell Zones panel or the solver. When Non-Fluid
Type is set to some parameter other than dead, TGrid treats all the zones as active
zones and automatically refines these zones.
• If your mesh has only one region, this step is not necessary.


c Fluent Inc. May 25, 2006 2-11
Tetrahedral Mesh Generation

Step 7: Initialize the Mesh


Mesh −→ Tri/Tet −→Initialize
TGrid reports its progress while initializing the mesh.

i You can also use the Auto Mesh/Initialize menu item to initialize the bound-
ary mesh and to perform node merging and edge swapping (as in Steps 3
and 4).

Step 8: Refine the Initial Volume Mesh


Mesh −→ Auto Mesh −→Refine
TGrid refines the initial mesh and reports the number of cells and the maximum and
average skewness of the volume mesh in the console window.
If you are generating a volume mesh for a single fluid zone and feel that the boundary
mesh is acceptable, you can use Auto Mesh/Init & Refine, which essentially combines Auto
Mesh/Initialize and Auto Mesh/Refine.

• By default, Auto Mesh/Refine performs two refinement cycles (i.e., the Number of
Levels in the Auto Mesh Controls panel is set to 2). The refinement parameters for
the first two cycles are listed below:

Level 1 2
Max Cell Skew 0.85 0.70
Max Boundary Skew 0.70 0.70
Min Boundary Closeness 0.85 0.50

• To add more cells to the volume mesh after the automatic mesh refinement with
Auto Mesh/Refine is complete, change the refinement parameters and refine the
mesh manually, as shown in Step 9. You can also increase the Number of Levels in
the Auto Mesh Controls panel and invoke the Auto Mesh/Refine menu item again.

2-12
c Fluent Inc. May 25, 2006
Tetrahedral Mesh Generation

Step 9: Further Refinement of the Mesh


Mesh −→ Tri/Tet −→ Refine −→Global...

1. Enable Boundary Cells, Cell Zones, and Must Improve Skewness under Refine Options.

2. Click the Refine Controls... button to open the Refinement Controls panel.

(a) Enter 0.6 for Max Cell Skew, 0.6 for Max Boundary Cell Skew, and 0.5 for Min
Boundary Closeness, respectively.
(b) Click OK to close the Refinement Controls panel.

3. Click Refine in the Refine Global Mesh panel.

4. Click Swap until TGrid reports that zero faces were swapped.

5. Enter 0.8 for Minimum Skewness, 10 for Iterations, and 0.1 for Minimum Skewness
Change, respectively.


c Fluent Inc. May 25, 2006 2-13
Tetrahedral Mesh Generation

6. Click Smooth.

If more cells are needed, repeat Step 9 with lower refinement parameters.

Step 10: Check the Cell Skewness


1. Plot the cell skewness distribution (Figure 2.5).
Display −→ Plot −→Cell Distribution...

(a) Select all the zones in the Cell Zones selection list.
(b) Click Plot.
The default quality measure is skewness. Other measures (aspect ratio and
change in size) can be selected in the Quality Measure panel.

2-14
c Fluent Inc. May 25, 2006
Tetrahedral Mesh Generation

700.00

600.00

500.00

400.00

Cells
300.00

200.00

100.00

0.00
0.00 0.10 0.20 0.30 0.40 0.50 0.60 0.70 0.80 0.90 1.00
Y
Z X Quality

Histogram of Cell Quality, Equilateral Volume Deviation Method


TGrid 4.0 (3D)

Figure 2.5: Cell Skewness Distribution

2. Report the worst cell skewness.


Report −→Cell Limits...

(a) Select all the zones in the Cell Zones selection list.
(b) Click Compute to report the minimum, maximum, and average cell skewness
values.

Note: The maximum skewness of the present volume mesh is acceptable. If you cannot
improve the skewness of the volume mesh by global refinement, refine each individual
cell that is highly skewed.


c Fluent Inc. May 25, 2006 2-15
Tetrahedral Mesh Generation

Step 11: Check and Save the Volume Mesh


1. Check the mesh.
Before saving the mesh file, ensure that it has no negative cell volumes or left-handed
faces.
Mesh −→Check

2. Save the mesh.


File −→ Write −→Mesh...

Enter valve.msh for Mesh File and click OK.

3. Exit TGrid.
Exit TGrid when the mesh generation is complete.
File −→Exit

2-16
c Fluent Inc. May 25, 2006
Tetrahedral Mesh Generation

Summary
This tutorial demonstrated the use of some of the automatic and manual meshing features
in TGrid. The possible applications of the tools you learned to use are:

• Generate the mesh using only the automatic features (often possible for high-quality
surface meshes).

• Perform some manual repairs, and then continue the mesh generation automatically
(often possible for surface meshes with isolated troubles).

• Generate the mesh automatically and then manually refine it further (often possible
for high-quality surface meshes for which more refinement is needed).

• Perform all or most of the mesh generation manually (likely if the surface mesh has
many problems or the geometry is very complicated).

Always check the boundary mesh before attempting to generate the volume mesh.

• If the boundary mesh seems satisfactory (i.e., the faces are not highly skewed), try
using the Auto Mesh/Init & Refine menu item to automatically generate the mesh.

• If there are problems in the boundary mesh, or if automatic meshing fails, use some
of the manual procedures demonstrated here and described in the TGrid User’s
Guide.


c Fluent Inc. May 25, 2006 2-17
Tetrahedral Mesh Generation

2-18
c Fluent Inc. May 25, 2006

Potrebbero piacerti anche