Sei sulla pagina 1di 16

Tutorial 4.

Viscous Hybrid Mesh Generation

Introduction
In cases where you want to resolve the boundary layer, it is often more efficient to use
prismatic cells in the boundary layer rather than tetrahedral cells. The prismatic cells
allow you to resolve the normal gradients associated with boundary layers with fewer
cells. The resulting mesh is referred to as a “viscous” hybrid mesh.
TGrid allows you to create a viscous hybrid mesh by growing prisms from the faces on the
surface mesh. It creates high quality prism elements near the boundary and tet elements
in the rest of the domain. TGrid also supports automatic collision detection and height
adjustment while growing prisms in a narrow gap. Prism creation also allows special
treatment for sharp corners.
This tutorial demonstrates the mesh generation procedure for a viscous hybrid mesh,
starting from a triangular boundary mesh for a sedan car body.
In this tutorial, the volume mesh generation comprises the following steps:

1. Read the mesh file and display the boundary mesh

2. Check for free and unused nodes

3. Check the skewness of the boundary faces

4. Set controls to grow prismatic cells from multiple boundary zones

5. Set controls to allow non-conformal interface

6. Create the volume mesh

7. Examine the prism growth in proximity and sharp angle regions

8. Check the skewness of the entire volume mesh

9. Check and save the volume mesh

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


c Fluent Inc. May 25, 2006 4-1
Viscous Hybrid Mesh Generation

Preparation
1. Download sedan.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 sedan.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 sedan.zip.
The file, sedan.msh can be found in the sedan folder created on unzipping the file.

3. Start the 3D version of TGrid.

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

Step 1: Read and Display the Boundary Mesh


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

(a) Select sedan.msh in the Files list.


(b) Click OK.


c Fluent Inc. May 25, 2006 4-3
Viscous Hybrid Mesh Generation

2. Display the boundary mesh (Figure 4.1).


Display −→Grid...

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

Figure 4.1: Boundary Mesh for the Sedan

4-4
c Fluent Inc. May 25, 2006
Viscous Hybrid Mesh Generation

(c) Rotate the display and familiarize yourself with the boundary mesh.
• The wall zones defining the car body are car, wheel-front, and wheel-rear.
• The side and top of the domain are in the tunnel zone.
• The flow inlet and exit are inlet and outlet, respectively.
• The floor of the tunnel is ground.
• The symmetry boundary for the car and tunnel is symmetry.

Step 2: Check for Free and Unused Nodes


Boundary −→Nodes...

1. Click Count Free Nodes.


TGrid reports the number of free nodes in the Message box. Click Merge to remove
free nodes, if any.

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.


c Fluent Inc. May 25, 2006 4-5
Viscous Hybrid Mesh Generation

Free nodes are nodes associated with free edges. There should not be any
i free nodes unless you have “thin walls” in your geometry. If free nodes are
located between a zone you are building prisms from and an adjacent zone,
TGrid will be unable to project to and retriangulate the adjacent zone.

Step 3: Check the Skewness of the Boundary Faces


1. Improve the boundary mesh by performing edge swapping.
Boundary −→Faces...

(a) Select all the zones in the Tri Boundary Zones selection list.
(b) Click Check.
The Message box reports 69 violations. This means that there are 69 faces that
do not satisfy the circumcircle test. You may be able to improve these faces
by performing edge swapping.
(c) Click Improve until TGrid reports zero modifications in the Message box.
In this case, TGrid performs no modifications because the angles between the
face normals are greater than 10 degrees. It is possible to increase the Maximum
Angle between Face Normals to swap the edges of these faces, but doing so may
distort the discrete geometry represented by the boundary faces.
The presence of these violations does not necessarily mean that TGrid will fail
to initialize the tetrahedral mesh. To ensure that the faces are acceptable, check
that the maximum skewness is less than 0.75. If so, you need not worry about
the violations.

4-6
c Fluent Inc. May 25, 2006
Viscous Hybrid Mesh Generation

2. Check the skewness of the worst boundary face.


(a) Click Skew.
TGrid reports in the Message box that the worst face is bf140113 with a skew-
ness of 0.58571. Since this is less than 0.75, you can proceed with this boundary
mesh. If the maximum value were greater than 0.75, you would need to repair
the boundary mesh using the procedures demonstrated in Tutorial 2.

Step 4: Set Controls to Create Prisms from Multiple Boundary Zones


Mesh −→Prisms...

1. Select car, ground, wheel-front, and wheel-rear in the Boundary Zones selection list.

2. Select aspect-ratio in the Offset Method drop-down list and enter 5 for First Aspect
Ratio.

3. Select geometric in the Growth Method drop-down list.

4. Set Number of Layers to 5.

5. Enter 1.1 for Rate.


c Fluent Inc. May 25, 2006 4-7
Viscous Hybrid Mesh Generation

6. Specify additional growth options.


The car, wheel-front, and wheel-rear zones are very close to each other. Hence, the
prism layers may intersect or collide with each other. Also the region of intersection
of the ground and wheels results in a sharp angle, Creating prisms in such cases
may result in bad quality prism elements.
You will now specify prism growth options to detect proximity/collision of prism
layers and to avoid sharp corners while generating prisms.
(a) Click the Growth Options... button to open the Prisms Growth Options panel.

(b) Enable Detect proximity/Collision under Proximity/Collision.


The Detect proximity/Collision option enables automatic detection of prism
layer collision. TGrid allows you to avoid intersection of prism layers by ad-
justing the height of prisms in closely placed zones. Figures 4.2 and 4.3 show
the collision of prism layers and the adjusted prism layers generated using the
Detect proximity/Collision option, respectively.

4-8
c Fluent Inc. May 25, 2006
Viscous Hybrid Mesh Generation

Figure 4.2: Collision of Prism Lay- Figure 4.3: Adjusted Prism Layers
ers to Avoid Collision

(c) Enter 0.3 for Gap Size Factor.


(d) Enable Ignore Sharp Corner under Sharp Corner.
As shown in Figure 4.4 the geometry in the region of the wheel and the ground
contains a sharp corner. Creating prisms in this case may result in bad quality
prism elements in this region.

Y
Z X

Mesh
Restrictions: TGrid 4.0 (3D)

Figure 4.4: Sharp Corner Near Wheel and Ground

(e) Enter 25 for Max Sharp Angle.


(f) Click Apply and close the Prism Growth Options panel.


c Fluent Inc. May 25, 2006 4-9
Viscous Hybrid Mesh Generation

7. Click Apply Growth under Zone Specific Growth.


A Question dialog box appears, asking if you want to apply different growth controls
on different zones.

8. Click Yes to close the Question dialog box.

9. Verify that the normals for the selected zones are pointing in the right direction.
Display −→Grid...
(a) Select car, ground, wheel-front, and wheel-rear in the Face Zones selection list.
(b) Enable Normals under Options in the Attributes section of the Display Grid
panel.
(c) Click Display.
If you zoom in, the normals on the car, wheel-front, and wheel-rear zones point
outward, while those on the ground zone point upward.

10. Click Apply in the Prisms panel to save the prism parameters and save an interme-
diate mesh file.
It is a good practice to save the prism settings and the mesh file before generating
prisms. If for any reason you are dissatisfied with the prisms, you can read the
mesh file back in, modify the parameters, and try again.

4-10
c Fluent Inc. May 25, 2006
Viscous Hybrid Mesh Generation

Step 5: Set Controls to Allow for Non-Conformal Interface


The Non Conformal Interface option is useful while generating prisms in regions having
sharp corners.
TGrid allows you to create a triangular surface mesh on the quad surfaces in the domain.
This option is useful when you want to avoid the generation of pyramids on the quad
surfaces of a mix surface mesh. TGrid copies the surfaces containing quad cells and
triangulates them, keeping the original faces intact. The free nodes of the triangular mesh
will then be merged with the original surface mesh and both surfaces will be converted to
interface type.

1. Set controls to allow for non-conformal interface.


Mesh −→ Auto Mesh −→Controls...

(a) Enable Non Conformal Interface under Initialization.


When the Non Conformal Interface option is enabled, TGrid automatically remeshes
all the surfaces having quad elements with triangular cells.
(b) Click OK to close the Auto Mesh Controls panel.


c Fluent Inc. May 25, 2006 4-11
Viscous Hybrid Mesh Generation

2. Specify the method for retriangulation using TUI commands.


You may need to press <Enter> to get the > prompt.

> mesh/auto-mesh-controls/non-conformal-retri-method <Enter>

Retriangulation Method [quad-split]> <Enter>

prism quad-split remesh

Retriangulation Method [quad-split]> prism <Enter>

Step 6: Create the Volume Mesh


The Auto Mesh tool in TGrid can create prisms as well as perform tetrahedral meshing in
a single step, thereby allowing automatic generation of hybrid meshes. TGrid automati-
cally extrudes prism layers from the zones for which prism growth parameters have been
specified, and then proceeds with tetrahedral meshing.
If required, you can carry out the meshing procedure separately.
Mesh −→ Auto Mesh −→Init & Refine
TGrid analyzes the zones for projection and retriangulation. Prisms will be grown from
the zones for which prism growth parameters have been set (using the Apply Growth button
in the Prisms panel. TGrid will extrude the prism layers before meshing the tetrahedral
domain.
TGrid reports the progress in the console and presents a summary of the prism layers
created. It then retriangulates the adjacent zones (symmetry, inlet, outlet, and tunnel).
TGrid then proceeds to initialize and then refine the mesh.

Step 7: Examine the Prism Growth in the Proximity and Sharp Angle Regions
Now that the tetrahedral volume mesh has been generated, examine the prism growth in
the proximity and sharp angle regions.
Display −→Grid...

1. Examine the prism boundary faces and the retriangulated boundary zones.
(a) Select only symmetry in the Face Zones selection list in the Faces section of the
Display Grid panel.
(b) Click Display.
(c) Zoom in to see the boundary layers (Figure 4.5).

4-12
c Fluent Inc. May 25, 2006
Viscous Hybrid Mesh Generation

Y
Z X

Mesh
Restrictions: TGrid 4.0 (3D)

Figure 4.5: Quadrilateral and Retriangulated Faces of the Symmetry Zone–Zoomed View

2. Examine the region of proximity.


(a) Click the Cells tab in the Display Grid panel.
(b) Enable All under Options and select fluid-17 in the Cell Zones selection list.
(c) Click the Bounds tab and enable Limit by Z.
(d) Enter 0.4 for Maximum and Minimum under Z Range.
(e) Click Display.
(f) Separate the fluid cells by shape to enhance visibility.
i. Separate the fluid cells by shape using the following TUI command:

> mesh/modify/separate-cell-by-shape <Enter>

cell zone/id [""] fluid-17 <Enter>

TGrid reports the cells and faces that were moved to new zones.
ii. Select fluid-17 and fluid-17:1 in the Cell Zones selection list in the Cells tab.
iii. Click the Attributes tab and enable Filled and Lights under Options.
iv. Click the Colors... button in the Attributes tab and select Color by ID in
the Grid Colors panel.
v. Click Display (Figure 4.6).
3. Zoom in to the region of proximity of the car and the wheel.
In Figure 4.7, the prism heights are automatically adjusted to avoid collision of the
prism layers.


c Fluent Inc. May 25, 2006 4-13
Viscous Hybrid Mesh Generation

Figure 4.6: Boundary Layers Around the Car and Wheels

Figure 4.7: Adjusted Prism Height in Region of Proximity

4-14
c Fluent Inc. May 25, 2006
Viscous Hybrid Mesh Generation

4. Zoom in to the region of wheel and ground intersection.

Figure 4.8: Prisms Created Ignoring Sharp Corner

In Figure 4.8, the sharp corner region has been ignored while generating prisms.

Step 8: Check the Skewness of the Volume Mesh


1. Report the worst cell skewness.
Report −→Cell Limits...

(a) Select all the zones in the Cell Zones selection list.


c Fluent Inc. May 25, 2006 4-15
Viscous Hybrid Mesh Generation

(b) Click Compute to report the Minimum, Maximum, and Average cell skewness
values.
TGrid reports the Maximum Skewness to be around 0.92, which is acceptable.

Step 9: Check and Save the Volume Mesh


1. Check the mesh.
Mesh −→Check
TGrid performs various checks on the mesh and reports the progress in the console.
Ensure that the minimum volume is a positive number.

You will have to fix the mesh if TGrid reports negative volumes or “left-
! handed” faces when it checks face handedness.
2. Save the mesh
File −→ Write −→Mesh...
(a) Change the Mesh File entry to sedan-vol.msh.
(b) Click OK to save the volume mesh.

3. Exit TGrid.
File −→Exit

Summary
This tutorial demonstrated the creation of viscous hybrid mesh starting from a triangular
mesh. You did the following:

• Checked the skewness of the boundary faces

• Set controls to create prisms from multiple zones using the additional growth op-
tions to detect proximity/collision and to ignore sharp corners

• Set controls to allow a non-conformal interface

• Generated the volume mesh

• Examined the region of proximity of the car and the wheel and the region near the
wheel and the ground

4-16
c Fluent Inc. May 25, 2006

Potrebbero piacerti anche