Introduction to ANSYS FLUENT Meshing -...

29
© 2011 ANSYS, Inc. December 21, 2012 1 Release 14.0 Introduction to ANSYS FLUENT Meshing Workshop 02 Volume Fill Methods

Transcript of Introduction to ANSYS FLUENT Meshing -...

Page 1: Introduction to ANSYS FLUENT Meshing - Mr-CFDdl.mr-cfd.com/tutorials/ansys-fluent/Fluent_Meshing_14.5...Starting ANSYS Fluent in Meshing Mode Note that parallel processing and double

© 2011 ANSYS, Inc. December 21, 2012 1 Release 14.0

Introduction to ANSYS FLUENT Meshing

Workshop 02 Volume Fill Methods

Page 2: Introduction to ANSYS FLUENT Meshing - Mr-CFDdl.mr-cfd.com/tutorials/ansys-fluent/Fluent_Meshing_14.5...Starting ANSYS Fluent in Meshing Mode Note that parallel processing and double

© 2011 ANSYS, Inc. December 21, 2012 2 Release 14.0

Workshop Description:

• Mesh files will be read into the Fluent Meshing software ready for volume mesh generation. Various options for volume fill will be explored including creation of tet, hexcore, and prism layers

Learning Aims:

This workshop aims to teach basic skills in the use of the Fluent Meshing interface for filling boundary meshes with volume mesh elements

– Launching Fluent in Mesher Mode

– Reading Mesh file(s)

– Generating tet meshes

– Generating tet meshes with prisms

– Generating hexcore meshes

– Using advanced prism options

– Improving the quality of the volume mesh

– Setting Boundary Condition types

– Switching from Serial Meshing Mode to Parallel Solution Mode

I Introduction

Page 3: Introduction to ANSYS FLUENT Meshing - Mr-CFDdl.mr-cfd.com/tutorials/ansys-fluent/Fluent_Meshing_14.5...Starting ANSYS Fluent in Meshing Mode Note that parallel processing and double

© 2011 ANSYS, Inc. December 21, 2012 3 Release 14.0

– Open the Fluent Launcher by clicking the Windows Start menu, then selecting

Fluent. 14.5 in the Fluid Dynamics sub-menu of the ANSYS 14.5 program group. – Enable Meshing Mode under Options. – Choose Double Precision – Choose Parallel Processing Option and 2 processors – Set Working Directory to the area where files are – Click OK to start Fluent in meshing mode.

Starting ANSYS Fluent in Meshing Mode

Note that parallel processing and double precision

currently only affects Solver Mode. Meshing is done in

serial and parallel processes are utilized only when we

switch to solution mode.

Page 4: Introduction to ANSYS FLUENT Meshing - Mr-CFDdl.mr-cfd.com/tutorials/ansys-fluent/Fluent_Meshing_14.5...Starting ANSYS Fluent in Meshing Mode Note that parallel processing and double

© 2011 ANSYS, Inc. December 21, 2012 4 Release 14.0

Read and Display Boundary Mesh • Read in the Mesh file using

– File Read Boundary Mesh

– Choose the file sedan.msh.gz

• Display the Grid

– Open Display Grid

– Select Boundary filter

– Hit Display

– The mesh is shown in the graphics window

– The Surface mesh is of a simple car with small wind tunnel surrounding it

– Click into the graphics window and use Ctrl-z to switch to zone filter. Right click twice on some boundaries to deselect them from the Face Zones list interactively and hit Display again to see the car inside the wind tunnel

Page 5: Introduction to ANSYS FLUENT Meshing - Mr-CFDdl.mr-cfd.com/tutorials/ansys-fluent/Fluent_Meshing_14.5...Starting ANSYS Fluent in Meshing Mode Note that parallel processing and double

© 2011 ANSYS, Inc. December 21, 2012 5 Release 14.0

Add Prefix to Wind-Tunnel Zones

• To make list navigation easier, it is good practice to employ prefixes in Fluent Meshing

• In Boundary Manage panel select the zones:

– ground, inlet, outlet, outlet-side, outlet-top, symmetry

• Choose Rename option and tick Change Prefix

• Change From to a blank as shown and To to wt-

• Hit Apply and note that the zones selected now have the prefix wt- and now sit at the bottom of the list

• Forms are listed alphabetically and so prefixes like this help to organise lists

Page 6: Introduction to ANSYS FLUENT Meshing - Mr-CFDdl.mr-cfd.com/tutorials/ansys-fluent/Fluent_Meshing_14.5...Starting ANSYS Fluent in Meshing Mode Note that parallel processing and double

© 2011 ANSYS, Inc. December 21, 2012 6 Release 14.0

Check for Free and Multi Faces

• Open Boundary Merge Nodes panel and click ‘Count Free Nodes’

– There should be none

– If there were some free nodes we could try to merge nodes in this panel to fix

– Close the panel

• Open Display Grid and deselect All but select Free and Multi and then Display to see if there are any issues visually

– There should be no free or multi faces in this mesh file

– If there were free or multi faces where there should not be, the steps shown in Workshop 1 should be followed in order to fix them

Page 7: Introduction to ANSYS FLUENT Meshing - Mr-CFDdl.mr-cfd.com/tutorials/ansys-fluent/Fluent_Meshing_14.5...Starting ANSYS Fluent in Meshing Mode Note that parallel processing and double

© 2011 ANSYS, Inc. December 21, 2012 7 Release 14.0

Check the Quality of the Surface Mesh

• Open Report Face Limits

• Select all Face Zones in the list and hit compute

• The default quality measure is tri skewness for the surface mesh and here we see the mesh is good quality, having max skew < 0.6

• Close the panel

When generating prism layers we

recommend to lower max skewness on

boundaries to < 0.7 or better < 0.6

Page 8: Introduction to ANSYS FLUENT Meshing - Mr-CFDdl.mr-cfd.com/tutorials/ansys-fluent/Fluent_Meshing_14.5...Starting ANSYS Fluent in Meshing Mode Note that parallel processing and double

© 2011 ANSYS, Inc. December 21, 2012 8 Release 14.0

Create a Boundary Group for Prisms

• From the Mesh Generation pane click button Create Groups

• Select all the car boundaries and the ground boundaries in the list:

– car, mirror, wheel-arch-front, wheel-arch-rear, wheel-front, wheel-rear and wt-ground

• Hit Create and give the Group Name _prisms

• Close the User Defined Groups panel

Use of underscore _ at the start of the group

name allows that group to be listed at the top of

the Face Zone Groups List

Page 9: Introduction to ANSYS FLUENT Meshing - Mr-CFDdl.mr-cfd.com/tutorials/ansys-fluent/Fluent_Meshing_14.5...Starting ANSYS Fluent in Meshing Mode Note that parallel processing and double

© 2011 ANSYS, Inc. December 21, 2012 9 Release 14.0

Verify Correct Normal Orientation (1)

• Prisms will grow from a boundary in the direction the boundary normals are pointing

• We have a few ways to visualize this in Fluent Meshing

• Open Display -> Grid, in the Faces tab select only All in the Options and the group _prisms in the Face Zone Groups selection

• Click into the Attributes tab and enable Edges, Filled and Lights

• Enable Normals and choose the Normal Scale of 0.005

• Hit Display and examine the mesh

• Normals should point inside the flow region except for the wheel-arch boundaries which are mis-aligned

• Look at the wheel arches to examine normals

Page 10: Introduction to ANSYS FLUENT Meshing - Mr-CFDdl.mr-cfd.com/tutorials/ansys-fluent/Fluent_Meshing_14.5...Starting ANSYS Fluent in Meshing Mode Note that parallel processing and double

© 2011 ANSYS, Inc. December 21, 2012 10 Release 14.0

Verify Correct Normal Orientation (2)

• Another (Beta) option for viewing normals is to use color-by-normal, activated using a hidden command

• Type this command into the console and press <Enter>

(enable-color-by-normal #t)

• De-select Normals under options and click Colors. Choose the new Color-by-Normal option and Close the Grid Colors panel

• Hit Display

• The Color-by-Normal option will color the direction normals are pointing in grey while the other side of the boundary will be yellow

• This method can make normal direction easier to understand for complex cases

Page 11: Introduction to ANSYS FLUENT Meshing - Mr-CFDdl.mr-cfd.com/tutorials/ansys-fluent/Fluent_Meshing_14.5...Starting ANSYS Fluent in Meshing Mode Note that parallel processing and double

© 2011 ANSYS, Inc. December 21, 2012 11 Release 14.0

Normal Orientation Visualization

Display Normal Option with 0.005 Scale Factor Color by Normal Options

• We see here that the wheel arch boundary has the normals pointing in the wrong direction – i.e. Into the solid of the car • We will need to reorient these normals which could be done by flipping them in Boundary Manage but here we will use a more automatic command in the Prisms Panel

Page 12: Introduction to ANSYS FLUENT Meshing - Mr-CFDdl.mr-cfd.com/tutorials/ansys-fluent/Fluent_Meshing_14.5...Starting ANSYS Fluent in Meshing Mode Note that parallel processing and double

© 2011 ANSYS, Inc. December 21, 2012 12 Release 14.0

Prism Growth Settings

• Open the Auto Mesh panel by clicking the button in the Volume Mesh area

• We have not been using an Object based workflow here so retain none for Object

– Automesh will act on the currently active domain (global)

• Click Boundary Layer Mesh -> Set...

– Select the _prisms Boundary Zone Group filter to select the zones we wish to grow prisms on (all car zones + ground zone)

– Choose the following settings:

• Offset Method: Aspect Ratio

• Growth Method: Geometric

• First Aspect Ratio: 5

• Rate: 1.2

• Click Apply under Zone Specific Growth

Page 13: Introduction to ANSYS FLUENT Meshing - Mr-CFDdl.mr-cfd.com/tutorials/ansys-fluent/Fluent_Meshing_14.5...Starting ANSYS Fluent in Meshing Mode Note that parallel processing and double

© 2011 ANSYS, Inc. December 21, 2012 13 Release 14.0

Prism Growth Options

• Click Growth Options...

• Ensure Allow Shrinkage is selected

• Enter 200 for the Max Aspect Ratio and click Apply

• Close the panel

The Allow Shrinkage option enables

prism proximity algorithms in Fluent

Meshing which will prevent prism cells

colliding with each other in areas of

proximity and sharp corners

Page 14: Introduction to ANSYS FLUENT Meshing - Mr-CFDdl.mr-cfd.com/tutorials/ansys-fluent/Fluent_Meshing_14.5...Starting ANSYS Fluent in Meshing Mode Note that parallel processing and double

© 2011 ANSYS, Inc. December 21, 2012 14 Release 14.0

Orient Normal Direction • In the Directon tab click on Orient

Normals ...

• Display the boundaries in the list using Draw to view the wheel arch boundaries with incorrect normal direction (yellow)

• Enter a location within the flow region (e.g. 0, 1, 1 for X, Y and Z respectively)

• Click Apply to orient the normals correctly and Close panel

• Click Draw again to see the updated coloring showing normals are now pointing into the flow (grey)

• Switch back to Color-by-ID in Display Grid Attributes Colors

Oriented

Page 15: Introduction to ANSYS FLUENT Meshing - Mr-CFDdl.mr-cfd.com/tutorials/ansys-fluent/Fluent_Meshing_14.5...Starting ANSYS Fluent in Meshing Mode Note that parallel processing and double

© 2011 ANSYS, Inc. December 21, 2012 15 Release 14.0

Set Automesh and Save Settings

• Close the Prism panel

• In the Auto Mesh Panel tick the Prisms tickbox which is now un-greyed as we have set the parameters up

• There are no quad zones in this problem so Quad Tet Transition can be left as default

• Choose No Fill for the Volume Fill option

• Prior to prism generation click Apply and save the mesh file

– FileWrite Mesh sedan-prisms-set.msh.gz

In Fluent Meshing the surface mesh is the only geometry we have. Once prism quads have

been imprinted we cannot simply delete prisms to get back to the original mesh – it is an

irreversible process. For this reason it is good practice to “Apply” settings and save a

mesh with that set-up before proceeding to create the mesh. !

Page 16: Introduction to ANSYS FLUENT Meshing - Mr-CFDdl.mr-cfd.com/tutorials/ansys-fluent/Fluent_Meshing_14.5...Starting ANSYS Fluent in Meshing Mode Note that parallel processing and double

© 2011 ANSYS, Inc. December 21, 2012 16 Release 14.0

Create Prisms

• Hit Mesh to create prisms

• Prisms are created with an advancing layer algorithm and quality assessed and improved at each layer until the final layer is generated

Page 17: Introduction to ANSYS FLUENT Meshing - Mr-CFDdl.mr-cfd.com/tutorials/ansys-fluent/Fluent_Meshing_14.5...Starting ANSYS Fluent in Meshing Mode Note that parallel processing and double

© 2011 ANSYS, Inc. December 21, 2012 17 Release 14.0

Examine Prisms

• Open Display Grid panel

• Click into the Bounds tab and enable Limit by Z with min = max = 0.38

• In the Cells tab select the prism cells (prism-cells-#) and tick

All, then Display

• The graphics window

shows the prisms on the

cut-plane Z=0.38

• Zoom to view the area around where wheel and ground meet and note the shrinkage around areas of proximity

Shrunk prism layers

Page 18: Introduction to ANSYS FLUENT Meshing - Mr-CFDdl.mr-cfd.com/tutorials/ansys-fluent/Fluent_Meshing_14.5...Starting ANSYS Fluent in Meshing Mode Note that parallel processing and double

© 2011 ANSYS, Inc. December 21, 2012 18 Release 14.0

Prism Quality

• Open Report Cell Limits

• Select the prism cells in the Cell Zones list and Compute the quality limits

• Note the maximum skewness reported is less than 0.9 skewness

• Close the Report Cell Limits panel

• Write the current Mesh. File Write Mesh sedan_with_prisms.msh.gz

Note that if the mesh was of poor quality

(Skew > 0.9) Mesh Tools Prism

Improve could be used to smooth the

cells and improve quality further as a

post-mesh operation.

Page 19: Introduction to ANSYS FLUENT Meshing - Mr-CFDdl.mr-cfd.com/tutorials/ansys-fluent/Fluent_Meshing_14.5...Starting ANSYS Fluent in Meshing Mode Note that parallel processing and double

© 2011 ANSYS, Inc. December 21, 2012 19 Release 14.0

Investigate Domains

• The “No Fill” option for Volume Fill within Auto Mesh will allow the user to grow prism and/or pyramids if required and then automatically create a closed domain for the user to fill later with their choice of volume mesh

• Open Mesh Domains

• Select “tetrahedral” Domain and click Activate. Draw to view the boundaries in the active domain. Close the Domains panel.

• All Fluent Meshing panels will now only “see” boundaries which form the closed shell on top of the prism layers previously generated

Page 20: Introduction to ANSYS FLUENT Meshing - Mr-CFDdl.mr-cfd.com/tutorials/ansys-fluent/Fluent_Meshing_14.5...Starting ANSYS Fluent in Meshing Mode Note that parallel processing and double

© 2011 ANSYS, Inc. December 21, 2012 20 Release 14.0

Set Tet Parameters

• Auto Mesh will apply only to the current active domain

• Switch Prisms off as we don’t want prisms in the tet domain

• Select “Tet” for Volume Fill and click Set...

• Retain default options in the Tet Initialization tab

• In Tet Refinement tab hit Compute to calculation max tet volume based upon max triangle edge length in the domain

• Choose a Geometric Cell Size Function Growth Rate of 1.35

• Click Apply and Close

• In Auto Mesh click Mesh to create the tets

Page 21: Introduction to ANSYS FLUENT Meshing - Mr-CFDdl.mr-cfd.com/tutorials/ansys-fluent/Fluent_Meshing_14.5...Starting ANSYS Fluent in Meshing Mode Note that parallel processing and double

© 2011 ANSYS, Inc. December 21, 2012 21 Release 14.0

Display Grid

• Ensuring the bounds are still set to Zmin=Zmax=0.38, display the Mesh in the active domain using Display Grid and choosing “fluid-#” tet cells in the Cell Zones tab and hitting Display

• Return to Mesh Domains panel and activate the Global Domain

• Note that in Display Grid Cell Zones we now see both the tet and prism fluid zones in the list

• Select both zones and click Display to see both tet and prism cell zones with bounds set to the same cutplane

Page 22: Introduction to ANSYS FLUENT Meshing - Mr-CFDdl.mr-cfd.com/tutorials/ansys-fluent/Fluent_Meshing_14.5...Starting ANSYS Fluent in Meshing Mode Note that parallel processing and double

© 2011 ANSYS, Inc. December 21, 2012 22 Release 14.0

Check Cell Quality • Activate the Global domain using Mesh Domain Global Activate

• Check Mesh Size using Report Mesh Size Update

• Check the maximum skewness using Report Cell Limits

• The tet part of the mesh has skew > 0.9

• Use Mesh Tools Auto Node Move

– Set Quality Limit to 0.9 (default)

– Select All Zones for Cell Zones (default)

– Select all Boundary Zones in the list

– Retain Restrict Boundary Nodes Along Surface and Dihedral Angle of 120

– Increase Iterations to 5

– Hit Apply

Save the improved mesh with File Write Mesh sedan_tet_prism_vol.msh.gz

Page 23: Introduction to ANSYS FLUENT Meshing - Mr-CFDdl.mr-cfd.com/tutorials/ansys-fluent/Fluent_Meshing_14.5...Starting ANSYS Fluent in Meshing Mode Note that parallel processing and double

© 2011 ANSYS, Inc. December 21, 2012 23 Release 14.0

Hexcore Mesh with Prism Ignore

• We will now produce another mesh with the same prism settings but we will now

– Allow prisms to be ignored in regions where they are shrinking too much

– Allow non-conformal hex-tet transition where prisms are ignored

– Fill with Hexcore volume mesh rather than tet

– Merge the cell zones into one

– We will do all this in one step using Auto Mesh and avoiding manual usage of Domains

• Read in the boundary mesh with prism settings saved

– FileRead Mesh sedan-prisms-set.msh.gz

– Open Auto Mesh and apply settings in following slide then hit Mesh

Page 24: Introduction to ANSYS FLUENT Meshing - Mr-CFDdl.mr-cfd.com/tutorials/ansys-fluent/Fluent_Meshing_14.5...Starting ANSYS Fluent in Meshing Mode Note that parallel processing and double

© 2011 ANSYS, Inc. December 21, 2012 24 Release 14.0

Auto Mesh Settings for Hexcore-Prism

• Allow Ignore stops shrinking and ignores prisms completely if shrinkage more than shrink factor is required for good quality • 3 Buffer Layers slows hex growth in hexcore • 0 Peel Layers maximises number of hexes in the domain and lessens cell count due to tet number reduction

1.

2.

3.

4.

5.

Page 25: Introduction to ANSYS FLUENT Meshing - Mr-CFDdl.mr-cfd.com/tutorials/ansys-fluent/Fluent_Meshing_14.5...Starting ANSYS Fluent in Meshing Mode Note that parallel processing and double

© 2011 ANSYS, Inc. December 21, 2012 25 Release 14.0

Display Grid

• Ensuring the bounds are set to Zmin=Zmax=0.38 in DisplayMeshBounds, display the Mesh in the active domain using Display Grid and choosing “fluid-#” in the Cell Zones tab and hitting Display

• Zoom to the wheel and note:

– There is only one cell zone and it contains all cells (prism, tet, hex) as we used “Merge Cell Zones”

– The prisms stop once shrinkage hits the Max Shrink Factor of 0.5 and non-conformals used to transition to tet elements

Page 26: Introduction to ANSYS FLUENT Meshing - Mr-CFDdl.mr-cfd.com/tutorials/ansys-fluent/Fluent_Meshing_14.5...Starting ANSYS Fluent in Meshing Mode Note that parallel processing and double

© 2011 ANSYS, Inc. December 21, 2012 26 Release 14.0

Display Prism Sides • In Display Grid switch cell display

off by deselecting All and Cell Zones

• In Bounds tab deselect Limit by Z

• In Faces tab choose the _prisms Face Zone Group and also manually select the boundary prism-side-# and Display. Observe prism side.

• Remove prism-side-# from the list and add prism-side-#-intf:# and Display. Observe prism side interface.

Prism-side-#

Prism-side-#-intf:#

Page 27: Introduction to ANSYS FLUENT Meshing - Mr-CFDdl.mr-cfd.com/tutorials/ansys-fluent/Fluent_Meshing_14.5...Starting ANSYS Fluent in Meshing Mode Note that parallel processing and double

© 2011 ANSYS, Inc. December 21, 2012 27 Release 14.0

Check Cell Quality • Check Mesh Size using Report Mesh Size

Update

• Check the maximum skewness using Report Cell Limits

• The mesh has skew > 0.9

• Use Mesh Tools Auto Node Move

– Set Quality Limit to 0.85

– Select All Zones for Cell Zones (default)

– Select all Boundary Zones in the list

– Retain Restrict Boundary Nodes Along Surface and Dihedral Angle of 120

– Increase Iterations to 5

– Hit Apply

Save the improved mesh with File Write Mesh sedan_hexcore_prism_vol.msh.gz

Page 28: Introduction to ANSYS FLUENT Meshing - Mr-CFDdl.mr-cfd.com/tutorials/ansys-fluent/Fluent_Meshing_14.5...Starting ANSYS Fluent in Meshing Mode Note that parallel processing and double

© 2011 ANSYS, Inc. December 21, 2012 28 Release 14.0

Check Boundary Condition Types • Open Boundary Manage

• Highlight all Face Zones in the list

• Click List and observe the output in the console window

• Note that each boundary is described in detail and the boundary condition type can be verified and changed if necessary before moving to solution mode

• Note that the interfaces created in the prism ignore regions automatically have “interface” type

• Save mesh File Write Mesh sedan_hexcore_prism_vol.msh.gz

• Switch to solution mode by clicking the button and answering Yes to the question

Page 29: Introduction to ANSYS FLUENT Meshing - Mr-CFDdl.mr-cfd.com/tutorials/ansys-fluent/Fluent_Meshing_14.5...Starting ANSYS Fluent in Meshing Mode Note that parallel processing and double

© 2011 ANSYS, Inc. December 21, 2012 29 Release 14.0

Create Mesh Interface in Solution Mode

• Before proceeding with the standard solution the prism-side interface must be set up in Mesh Interfaces Create/Edit

• Choose a name e.g. Prism-side-interface

• Select prism-side-# as Interface Zone 1 and prism-side-#-intf:# as Interface Zone 2 (order not important)

• Choose Matching Interface Option as we have a 1:1 type overlap between interfaces

• Hit Create to create the Interface and Close

• Save Case as sedan_hexcore_prism_vol.cas.gz

Note that we used Double Precision in

this example because robustness of the

prism ignore option is much better in

the solver for interface creation.