100% found this document useful (1 vote)
553 views

CFD Lesson Ansys

The document discusses meshing fundamentals in ANSYS, including: - Meshing methods like tetrahedral, hexahedral, and prism elements - Geometry configurations for multiple parts and bodies - Meshing workflows involving geometry preparation, meshing methods, and diagnostics - Interface and options in ANSYS Meshing for tasks like named selections and mesh display

Uploaded by

Aditya Jain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
553 views

CFD Lesson Ansys

The document discusses meshing fundamentals in ANSYS, including: - Meshing methods like tetrahedral, hexahedral, and prism elements - Geometry configurations for multiple parts and bodies - Meshing workflows involving geometry preparation, meshing methods, and diagnostics - Interface and options in ANSYS Meshing for tasks like named selections and mesh display

Uploaded by

Aditya Jain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 178

ME - 733

Computational Fluid Mechanics


Lecture 4
Meshing

Dr./ Ahmed Nagib Elmekawy


Nov 11, 2018
Introduction to ANSYS Meshing

Module 01: Core Skills

Dr. Ahmed Nagib Elmekawy


Overview

In this lecture we will learn:


• Meshing Fundamentals
• ANSYS Meshing interface
• Geometry concepts
• Meshing methods
• Diagnostics & Usability
• Display Option
• Mesh Statistics & Mesh Metrics

3
Preprocessing Workflow

Preprocessing
Meshing
and Solution

Geometry
Import / Geometry
Creation Cleanup /
Modifications

4
Mesh Process & Course Plan
Global
Controls
Module 3

Meshing Core Local


Methods Skills Controls
Module 2 Module 1 Module 4

Mesh
Quality
Module 5
5
What is ANSYS Meshing

ANSYS Meshing is a component of ANSYS Workbench


• Meshing platform
• Combines and builds on strengths of preprocessing offerings from ANSYS:
– ICEM CFD, TGRID (Fluent Meshing), CFX-Mesh, Gambit

Able to adapt and create Meshes for different Physics and Solvers
• CFD: Fluent, CFX and POLYFLOW
• Mechanical: Explicit dynamics, Implicit
• Electromagnetic
Integrates directly with other WB systems

6
Meshing Fundamentals

Purpose of the Mesh


• Equations are solved at cell/nodal locations
–Domain is required to be divided into
discrete cells (meshed)

Mesh Requirements
• Efficiency & Accuracy
– Refine (smaller cells) for high solution gradients and fine geometric detail.
– Coarse mesh (larger cells) elsewhere.
• Quality
– Solution accuracy & stability deteriorates as mesh cells deviate from ideal
shape

7
Launching ANSYS Meshing
ANSYS Meshing is launched within Workbench
– 2 ways:
From Analysis Systems From Component Systems
Fluid Flow (Fluent), Static Structural,… Mesh

Double click
Mesh in the
System

or right click and


select Edit

10
Graphical User Interface
Toolbars

Outline Graphics window

Worksheet

Details view

Manage views Message window Mesh Metrics

Section Planes

Entity Details Bar Units Bar

9
Outline

Three default sections


• Geometry
– Bodies
• Coordinate Systems
– Default global & user defined systems
• Mesh
– Meshing operations (controls & methods)
▪ displayed in the order in which they are inserted
In the tree
• Right clicking on any object
– launches a context sensitive menu
– Example: contains commands to generate, preview, clear mesh etc.

10
Details View

Accessing Object Details


• Select an object (in the Outline)
– Related information to that object are displayed in the Details View below
– Ex: Select a body (“Fluid”) in the Outline
• Details of “Fluid” : contains graphical and geometric details
– To access meshing details
• Click the Mesh object or any of the inserted objects

• The Details View provides options to


– review,
– edit, or values for every object in the Tree
– input

11
Geometry Configuration – Multiple Parts
• Geometry composed of Multiple parts
– No connection between parts (no face sharing)
Grid interface
- Fluent
‘Contact Region’
Each part Results in Non-conformal interface.
is automatically GGI - CFX
meshed Meshes do not match.
created between
independently No nodes connection.
2 faces Contact -
Mechanical

Independent faces

12
Hexa vs. Tetra

• Hexa: Concentration in one direction Hexa


– Angles unchanged
• Tetra: Concentration in one direction
– Angles change Tetra
• Prism: Concentration in one direction
– Angles unchanged
Prism

Tetra (in volume)

Prisms (near wall)

13
Geometry Configuration – Multi-bodyParts
• Geometry composed of multiple bodies in a part
– Depend on ‘Shared Topology method’ (in DM)
• None
– Results in a no connection between the bodies (similar to
multiple parts)
• Automatic

Note: The CFX users will


still get duplicate nodes
at interface in CFX, which
is fine for its solver

Faces in contact imprinted & fused to Results in Common face acts


form a single face shared between 2 bodies Conformal mesh as ‘Interior’

14
Geometry Configuration – Multiple – body Parts

• Geometry composed of multiple bodies in a part


• Imprints

Grid interface
Faces are imprinted Contact Region For identical mesh on these non - Fluent
on each other ➔ is automatically faces, use ‘Match Control’ conformal
‘like’ faces created Results in unconnected mesh interface GGI - CFX

15
Meshing – 3D Geometry (1)

• 3D cell Types
• First Meshing Approach

Part/Body Methods
Part/Body based • Tetrahedrons.
− Tetras only
• Meshing occurs at part or
body level.
• Sweep.
− Prisms & hexahedrons
• Meshing Methods are scoped
to individual bodies. • MultiZone.
− Mainly hexahedron
• Method assignment can be
automatic or manual.
• Hex Dominant
− Not for CFD
• Bodies contained in one part
are conformally meshed. • Automatic.
− Sweep + PC Tet (Depends
on bodies) or PC Tet

16
Meshing – 3D Geometry (2)
• Second Meshing Approach (mainly for CFD users)

Cut Cell Meshing


Assembly Meshing
• Meshes an entire model in one
process.
Assembly Meshing
− Assembly of parts Methods
• Generate mainly
• Performs boolean operations. − Hexahedrons
− Volume filling, intersection & − Tetrahedrons
combination
− Does not require prior fluid body
definition or shared topology.

• Conformal mesh created across


parts. Part/Body Meshing
& Assembly Meshing
not interoperable

17
Diagnostics: Mesh display By Body Connection (New in R17.0)
Default meshdisplay
Turning
wireframe
mode on

Turning on Mesh display bybody


connection.

19
Named Selections (1)
Named Selections are groups of geometric or finite element entities:
• Named selections can be created either by selecting the desired items and clicking the “Named
Selection” icon in the context toolbar or RMB > Named Selection OR using the named selection
worksheet (shown later).

RMB

• Named selections must be composed of “like” entities (all surfaces or all edges, all nodes, etc.).

19
Named Selections (2)
A new criteria selection can be based on an initial selection:
• Make an initial selection followed by a RMB > “Create Named Selection”.
• Note, initial selection must be a single entity.

Selection here will


create the first row of
the worksheet.

RMB > Convert to nodal named selection immediately.


20
Named Selections (3)
In many detail window fields Named Selections can be referenced directly:
− In the Details view, change “Scoping Method” from “Geometry Selection” to “Named
Selection”
− Select the “Named Selection” from the pull-down menu

− A named selection toolbar provides quick access to basic controls “View > Toolbars > Named
Selections”:

21
Usability: Option to save mesh out to separate file (New in R17.0)
● When “Save Mesh Data in
Separate File” is on the mesh is
saved as a separate file (*.acmo).
● Duplication, Resume, Replace, and
Save will handle the separate
database and acmo files.
● Clear generated data will not
remove the acmo file. Reset will
remove the acmo file.
● Design Points (also w/RSM)
support the separate database and
acmo files.
This functionality is particularly helpful on Linux
to keep file sizes smaller.

22
Usability: Better Meshing Status in R17.0
● Progress is reported as parts are meshed in parallel
● As a part is meshed the topology (edges, faces, bodies) are highlighted to show what is
being worked on
– This can be turned off by unchecking “Highlight”
– If user stops meshing, entity will stay highlighted, allowing user to find problematic geometry easier

If user stops meshing, parts that have been


meshed are done. Restarting meshing resumes
only with unmeshed parts

23
Usability: Folders for Meshing Controls in R17.0

● Mesh controls can now be grouped for easier


organization
● Option: Group All Similar Children, will group all
objects based on type
● Options to suppress, rename, nest groups,
ungroup, delete objects in group
● Drag and drop capabilities to modify the grouping

24
Display Option: Color by quality
• Displays mesh color by quality metrics
• Options to probe quality or show min/max
• Contour band can be adjusted

Probe Element Find Min or Display mesh


Values Max value contours

29
Section Planes (1)
Displays internal elements of the mesh
• Elements on either side of plane can be displayed
• Toggle between cut or whole elements display
• Elements on the plane
Edit Section Plane button can be used to drag section plane to new location
• Clicking on “Edit Section Plane” button will make section plane’s anchor to appear
Multiple section planes are allowed

For large meshes, it is advisable to switch to


geometry mode (click on geometry in the Tree
Outline), create the section plane and then go
back to mesh model

39
Section Planes (2)
● Shaded section planes (New in R17.0)
– Shaded or hollow section plane
– Plot by body color or same color for section plane

27
Mesh Statistics & Mesh Metrics
• Displays mesh information for Nodes and Elements
• List of quality criteria for the Mesh Metric
– Different physics and different solvers have different requirements for mesh quality

Mesh metrics available in Workbench Meshing include:


– Element Quality
– Aspect Ratio
– Jacobean Ration
– Warping Factor
– Parallel Deviation
– Maximum Corner Angle
– Skewness
– Orthogonal Quality
For Multi-Body Parts, go to corresponding body in Tree Outline
to get its separate mesh statistics per part/body

28
Mesh Metric Graph
• Displays Mesh Metrics graph for the element
quality distribution
• Different element types are plotted with
different color bars
• Can be accessed through menu bar using
Metric Graph button

• Axis range can be adjusted using controls


button (details next slide)

• Click on bars to view corresponding elements


in the graphics window
– Use to help locate poor quality elements

29
Mesh Metric Graph Controls
• Elements on Y-Axis can be plotted with two
methods;
– Number of Elements
– Percentage of Volume/Area
• Options to change the range on either axis
• Specify which element types to include in graph
– Tet4 = 4 Node Linear Tetrahedron
– Hex8 = 8 Node Linear Hexahedron
– Wed6 = 6 Node Linear Wedge (Prism)
– Pyr5 = 5 Node Linear Pyramid
– Quad4 = 4 Node Linear Quadrilateral
– Tri3 = 3 Node Linear Triangle
• Te10, Hex20, Wed15, Pyr13, Quad8 & Tri6 non-linear
elements
For more information about the different mesh metrics please consult module 05: Mesh Quality
30
Summary
What have we learnt in this session:
• The global process to run ANSYS Meshing
• On overview of the interface and
• The various Geometry configurations
– Multiple parts
– Multi-body parts And the associated
– Multiple body parts shared topology option
• Meshing methods
– Part/body based
– Assembly meshing
• Section Planes
• Diagnostics & Usability
• Mesh Statistics & Mesh Metrics
• Display option
31
Workshop 1.1 CFD – ANSYS WB Meshing Basics

32
Workshop 1.1 FEA – ANSYS WB Meshing Basics

33
Introduction to ANSYS Meshing

Module 2: Meshing Methods


Meshing Methods
What you will learn from this presentation

• Meshing Methods for Part/Body Meshing


– Assembly Meshing covered separately
• Methods & Algorithms for;
– Tetrahedral Meshing
– Hex Meshing
– 2D Meshing
• Meshing Multiple Bodies
– Selective Meshing
– Recording Meshing Order

35
Preprocessing Workflow

Geometry Creation
Geometry
OR Meshing Solver
Operations
Geometry Import

Sketches and Meshing


3D Operations
Planes Methods

Boolean, Body Hybrid Mesh: Tet,


Operations, Split, Prisms, Pyramids
3D Operations
etc

Extrude, Revolve, Hexa Dominant,


Sweep, etc Sweep meshing
Geometry
Cleanup and Assembly
Repair Meshing
Geometry Import
Options
Automatic Global Mesh
Cleanup
Direct CAD/Bi-
Settings
Directional CAD
Merge, Connect,
Projection, Flow
Local Mesh
Volume Settings
Extraction, etc
Sizing,
Body/Sphere of
Influence, Match
Control, etc

36
Methods

Why Multiple Methods? High aspect ratio cells Cells refined around
(Inflation) near wall to small geometric
• Choice can depend on; capture boundary layer details and complex
– Physics gradients flow
– Geometry
– Resources
• Mesh could require just one or a
combination of methods.
• Example – Typical mesh design
based on geometric, physics and
resource considerations.

Hex (3d) or Quad


(2d) cells used to
mesh simple Tet (3d) or Tri (2d) cells used here to mesh
regions complex region

37
Inserting Methods

• In the Outline, right click Mesh, Insert > Method


– Select body in Details View
• Or, in the Graphics Window, Select body(s) , right
click, Insert > Method
– Body automatically selected in Details View

• Method is selectable using the drop down box


– Select, Automatic, Tetrahedrons, Hex Dominant,
Sweep or Multizone

38
Tetrahedrons Method

Method Behavior
• Generates tetrahedral elements - two algorithms are
available:
• Patch Conforming
• Patch Independent

39
Tetrahedrons Method: Patch Conforming

Method & Algorithm Behavior


• Bottom up approach: Meshing process starts
from edges, faces and then volume
• All faces and their boundaries are respected
(conformed to) and meshed
• Good for high quality (clean) CAD geometries
– CAD cleanup required for dirty geometry
• Sizing is defined by global and/or local controls
• Compatible with inflation

Access
• Insert Method and set to Tetrahedrons
– Additional drop down box for algorithm choice
appears - Set to Patch Conforming

40
Tetrahedrons Method: Patch Independent

Method & Algorithm Behavior


• Top down approach: Volume mesh generated
first and projected on to faces and edges
• Faces, edges and vertices not necessarily
conformed to
– Controlled by tolerance and scoping of
Named Selection, load or other object
• Good for gross de-featuring of poor quality
(dirty) CAD geometries
• Method Details contain sizing controls
• Compatible with inflation
Access
• Insert Method and set to Tetrahedrons
– Additional drop down box for algorithm
choice appears - Set Patch Independent
41
Tetrahedrons Method: Algorithm
Comparison (Surface Mesh)
Patch Conforming:All Patch Independent: Can
Geometry containing geometric detail is ignore and defeature
small details captured geometry
Tetrahedrons Method: Algorithm
Comparison (Volume Mesh)
Geometry containing Patch Conforming: Patch Independent: Default
small details Delaunay mesh – Octree Mesh – approximate
smooth growth rate growth rate

Smooth Transition option


creates Delaunay mesh
43
Tetrahedrons Method: Control

Patch Conforming
• Sizing
– Mesh sizing for the Patch Conforming algorithm
is defined by Global & Local Controls
– Automatic refinement based on curvature
and/or proximity accessible in Global Controls
• Details of Global & Local Controls covered in
separate lectures
– Choice of surface mesher algorithm in global
controls
Proximity

Curvature

44
Tetrahedrons Method: Control

Patch Independent
• Sizing
– Sizing for the Patch Independent algorithm
defined in Patch Independent Details
– Automatic curvature & proximity
refinement option

45
Tetrahedrons Method: Control

Patch Independent
• Defeaturing Control
– Set Mesh Based Defeaturing On
– Set Defeaturing Tolerance
– Assign Named Selections to
selectively preserve geometry

Named Selection assigned


and Defeaturing Tolerance
= 0.03m. Features > 0.03m
respected.

Defeaturing Tolerance Off

46
Tetrahedrons Method: Application
Examples

Patch Conforming Patch Independent


• Clean CAD, accurate surface mesh • Dirty CAD, defeatured surface mesh

47
Hex Meshing

48
Introduction

Tet Mesh
Hex Meshing Elements: 48K

• Reduced element count


– Reduced run time
• Elements aligned in direction of flow
– Reduced numerical error
Methods Available
• Sweep
• MultiZone Sweep Mesh
Elements: 19K
• Hex Dominant (not recommended for
CFD)
Initial Requirements
• Clean geometry
• May require geometric decomposition

49
Sweep Meshing

Method Behavior Sweep Path


• Meshes source surface, sweeps through to the
target
– Body must have topologically identical faces
Side Face(s)
on two ends, (which act as source and target
faces) Target Face Source Face

• Generates hex/wedge elements


• Side faces must be mappable
• Only one source and one target face is allowed
– Alternative ‘Thin’ sweep algorithm can have
multiple source and target faces
Access
• Insert Method and set to Sweep

50
Sweep Meshing

Source/Target (Src/Trg Selection)


• Automatic
– Source & target faces identified automatically
– Not compatible with inflation
• Manual Source & Manual Source and Target
– User selection (required for inflation)
– Compatible with inflation
• Automatic Thin & Manual Thin
– Multiple source and target faces
– Not compatible
with inflation

Sweep Direction Source Face Target Face


51
Sweep Meshing

Src/Trg Selection Behaviour


• Automatic selection requires
that the application find the
Source and Target. Specifying
both Source & Target will
Automatic Selection
accelerate meshing
Sweep Mesh No inflation
• Inflation
– Must specify at least Source
manually when using
Inflation & Sweep Method
– 2D inflation defined on
source face from boundary
edges then swept through Manual Selection
volume, source must
therefore be specified first
Sweep Mesh with inflation
Sweep Meshing

Sweep
Path
Rotational Sweeping
• Sweep meshes can also be
created by sweeping a Source
around an axis Target Source
Face Face
• Example: Src/Trg Selection -
Rotational sweep for sector
geometry
– Rotational sweeping requires
both Source & Target to be
selected

• For both rotational and axial Manual Source &


sweeping Source & Target faces Target Selection
are color coded when selected

53
Sweep Meshing

Src/Trg Selection: Automatic Thin


& Manual Thin
• Selects an alternate sweep
algorithm
• Advantages
– Capable of sweeping multiple
Source
Source & Targets Faces Target
– Can perform some automatic
defeaturing
• Disadvantages
– For Multibody Parts only one
division across the sweep is
allowed
– Inflation & Sweep Bias not Source Faces
allowed Imprinted on Target

54
Sweep Meshing

How to Identify Sweepable bodies


• ANSYS Meshing can identify sweepable bodies automatically
– Rotational Sweep bodies are not identified
• Right click Mesh object in Outline and select Show > Sweepable Bodies

Geometry RMB on Mesh to find Sweepable bodies in


sweepable bodies green color
55
Sweep Meshing

How to Ensure Bodies are Sweepable


• Bodies which will not allow sweeping can be decomposed into a number
of topologically simpler sweepable bodies
• Decomposition can be performed in CAD/DM
• Example 1 Decomposed in
CAD/DM
Unsweepable body Sweepable!

56
Sweep Meshing

Example 2

T Junction Geometry
Unsweepable

Decomposed in
CAD/DM
Sweepable!

57
MultiZone Meshing

Method Behavior
• Based on blocking approach used in ANSYS ICEM
CFD Hexa MultiZone
• Automatically decomposes geometry into blocks Mesh
• Generates structured hex mesh where block
topology permits
– Remaining region (Free Mesh) filled with
unstructured Hexa Core or Tetra or Hexa
Dominant mesh.
• Can select source & target faces automatically
or manually
– Can have multiple source faces
• Compatible with 3D inflation
Access
• Insert Method and set to Multizone
Target faces should also be selected as “Source” for Multizone
Method as mesh is swept from both directions
58
MultiZone Meshing

• Mapped Mesh Type - determines the shape of the


elements used to fill structured regions (the default is
Hexa).
• Hexa - All hexahedral elements are generated
• Hexa/Prism - For swept regions, the surface mesh can
allow triangles for quality and transitioning
• Prism - All prism elements are generated
– This option is sometimes useful if the source facemesh is
being shared with a tet mesh, as pyramids are not required to
transition to the tet mesh
• Surface Mesh Method – specifies method to create the
surface mesh.
• Program Controlled - automatically uses a combination Surface mesh method = Uniform
of Uniform and Pave mesh methods depending on the
mesh sizes set and face properties
• Uniform - uses a recursive loop-splitting method which
creates a highly uniform mesh Surface mesh method = Pave
• Pave - creates a good quality mesh on faces with high
curvature, and also when neighboring edges have a high
aspect ratio
Release 14.5
MultiZone Meshing

Example 1
• Single body automatically decomposed into three blocks
• Src/Trg Selection – Automatic
• Results in all hex mesh
• Equivalent to manually decomposing by slicing off upper
and lower cylinders to produce three bodies and
applying sweep methods

60
MultiZone Meshing

Example 2
• Blend on central body, Multizone no longer ableto
create structured block
– Filled according to Free Mesh setting
• Tetra, Hexa Core, Hexa Dominant
• Can specify type of surface mesh using Mapped
Mesh Type (Hexa, Hexa/Prism, Prism)

61
Automatic Method
Automatic Method

Method Behavior
• Combination of Tetrahedron Patch
Conforming and Sweep Method
– Automatically identifies sweepable
bodies and creates sweep mesh
– All non-sweepable bodies meshed
using tetrahedron Patch Conformal
method
• Compatible with inflation

Access
• Default Method where not specified
• Can specify by inserting Method and
setting to Automatic

63
2D Meshing

64
Methods for 2D Meshing
Automatic Triangles
• Patch Conforming Methods
– Automatic Method (Quadrilateral
Dominant) & Triangles

Multizone Multizone
Quad/Tri Quad

• Patch Independent Methods


– Multizone Quad/Tri
– Full Quad will be generated if "All Quad" is
selected as Free Face Mesh Type
• Advanced size functions and local size Multizone Quad/Tri & Multizone Quad Methods were
controls are supported previously called Uniform Quad/Tri and Uniform
Quad till R14.0
65
2D Meshing Control & Inflation

Mapped Surface Meshes 2D


Mapped
• Fully mapped surface meshes and Mesh
specified edge sizing/intervals can be
obtained by applying local controls
– Covered in the Local Mesh Controls
lecture

2D mesh with Inflation


• Boundary edges are inflated
• Support for global and local inflation
controls

66
2D Mesh Solver Guidelines
ANSYS FLUENT ANSYS CFX
• For a 2D analysis in • For 2D analysis in CFX, create a
FLUENT generate the
volume mesh (using Sweep) that is 1
mesh in the XY plane (z=0).
element thick in the symmetry
• For axisymmetric direction, i.e.,
applications y  0 and
make sure that the
• Thin Block for Planar 2D
domain is axisymmetric • Thin Wedge (< 5°) for 2D Axis-
about x axis symmetric
• In ANSYS Meshing, by
default, a thickness is
defined for a surface
body and is visible when
the viewis not normal to
the XY Plane. This is
purely graphical – no
thickness will be present
when the mesh is
exported into the FLUENT
2D solver

67
Meshing Multiple Bodies

68
Selective Meshing

What is Selective Meshing?


• Selectively picking bodies and meshing them incrementally

Why use Selective Meshing?


• Bodies can be meshed individually
• Mesh seeding from meshed bodies influences neighboring bodies (user
has control)
• Automated meshing can be used at any time to mesh all remaining
bodies
• When controls are added, only affected body meshes require remeshing
• Selective body updating
• Extensive mesh method interoperability

69
Selective Meshing

Local meshing
• Mesh or clear meshes on individualbodies
• Subsequent bodies will use the attached face
mesh
• The meshing results (cell types) will depend on
the meshing order
• Adjust/add controls – able to remesh only
affected body
• Select body(s) right click for context menu
Meshing first the pipe then the block Meshing first the block then the pipe

70
Selective Meshing

Recording Mesh Operations


• When using selective meshing the order
of meshing can be recorded for
automated future use
• Right click Mesh in the Outline for
Context Menu

• Worksheet is generated recording mesh


operations as ordered steps
• Named Selections are automatically
created for each meshed body for
reference in the Worksheet
– Example; Meshing cylinder then block
71
Selective Meshing

Selective Body Updating


• Remeshing only bodies that have changed
• Access option through Tools > Options
– No: All geometry updated, all bodies
remeshed.
– Associatively: Accommodates for body
topology change (add/delete) (slower)
– Non-Associatively: Assumes no topology
change (faster)
• Example; Geometric change to block.
Workshop 2 – Introducing Meshing Methods
Appendix

Contents
• Hex Dominant Meshing
• Sweep Meshing Biasing & Complex Geometry
• Surface Meshing with Inflation
• Mesh Connections
• Shell Meshing
• Patch Independent Tetrahedrons - Transition

74
Hex Dominant Meshing
• The mesh contains a combination of tet
and pyramid cells with majority of cell
being of hex type
• Useful for bodies which cannot be swept
• Useful for CFD applications not requiring
inflation
• Useful for CFD in the range of
acceptable Skewness or Orthogonal
Quality mesh quality metrics
Access
• RMB on Mesh
• Insert → Method
• Definition → Method

75
Hex Dominant Meshing

• Example:

Geometry with Hex Dominant


valve inside Mesh generated

76
Hex Dominant Meshing
Free (unstructured) Face Mesh Types
• Determines the element shape in the free zone (wherestructured
meshing is not possible)
Options
• Quad/Tri
• All Quad
– May insert triangular elements depending on complexity of geometry

77
Hex Dominant Meshing

Example:
Higher no. of
elements

Free Face Mesh Type:


Quad/Tri

Geometry with
valve inside
Lower no. of
elements

Free Face Mesh Type:


All Quad

78
Sweep Meshing
• Control:
• Free (unstructured) Mesh Type
Source face
elements: Only
Quad

Type: All Quad

Source face
elements: Quad
plus Tri

Type: Quad/Tri

Sweepable Geometry
Source face
elements: Only Tri

Type: All Tri

79
Sweep Meshing

Control: Type
Element size in
swept direction
2mm
Sweep Element Size

No. of elements in
Sweepable Geometry swept direction: 10

Sweep Num Divisions

80
Sweep Meshing

• Control: Sweep Bias Type

Uniform mesh

No Bias

Cells are
concentrated on
Sweepable Geometry one side

With Bias
Sweep Meshing : Complex geometry

82
Tetrahedrons Method: Patch Independent

Transition
• Effect of Smooth Transition
• Smooth transition uses advanced
front meshing technique

Smooth Transition Off (default) Smooth Transition On

83
Introduction to ANSYS Meshing

Module 3: Global Mesh Controls


Dr. Ahmed Nagib Elmekawy
Global Mesh Controls
What you will learn from this presentation

• Introduction to Global Mesh Controls


• Defaults
• General Sizing Controls & Advanced Size Functions
• Global Inflation
• Assembly Meshing Controls
• Statistics

85
Preprocessing Workflow
Geometry Creation
Geometry
OR Meshing Solver
Operations
Geometry Import

Sketches and Meshing


3D Operations
Planes Methods

Boolean, Body Hybrid Mesh: Tet,


Operations, Split, Prisms, Pyramids
3D Operations
etc

Extrude, Revolve, Hexa Dominant,


Sweep, etc Sweep meshing
Geometry
Cleanup and Assembly
Repair Meshing
Geometry Import
Options
Automatic Global Mesh
Cleanup
Direct CAD/Bi-
Settings
Directional CAD
Merge, Connect,
Projection, Flow
Local Mesh
Volume Settings
Extraction, etc
Sizing,
Body/Sphere of
Influence, Match
Control, etc

86
Meshing Process in ANSYS Meshing

87
Global Mesh Controls (1)
• Global mesh controls are used to
make global adjustment in the
meshing strategy, which includes
sizing functions, inflation, smoothing,
defeaturing, parameter inputs,
assembly meshing inputs, etc.
• Minimal inputs
– Automatically calculates global
element sizes based on the smallest
geometric entity
– Smart defaults are chosen based on
physics preference
• Makes global adjustments for
required level of mesh refinement
• Advanced Size Functions for resolving
regions with curvatures and
proximity of surfaces

Smart
5 defaults !
Global Mesh Controls (2) Physics Based Settings
• Physics and Solver Preferences
Global Mesh Sizing Controls
• Relevance and Relevance Center
• Advanced Size Functions
• Smoothing and Transition
• Span Angle Center
• Curvature Normal Angle
• Proximity Accuracy and Cells Across Gap
Inflation
• Inflation Option, Inflation Algorithm
• Collision Avoidance
• Maximum Angle, Fillet Ratio, Smoothing
Assembly Meshing
• Activation of CutCell/Tetrahedrons Meshing
Patch Confirming Options
• Activation of Advancing Front Method
Advanced
• Shape Checking
• Element midside nodes
Defeaturing
• Pinch based
• Automatic Mesh Based
Statistics
• Mesh statistics, Quality criteria
89
Global Mesh Controls (3)

90
Defaults
• Four options under “Physics Preference”
– CFD, Mechanical, Explicit and Electromagnetic
• Three options under “Solver Preference” when CFD is
selected:
– Fluent, CFX andPOLYFLOW
• Mesh setting defaults are automatically adjusted to suit the
“Physics Preference” and “Solver Preference”
• Assembly Meshing is active only when Physics Preference is
CFD and Solver Preference is Fluent

91
Defaults : Relevance
Relevance and Relevance Center
• Useful for automatic Global Refinement or Coarsening of
the mesh

Relevance Center
Coarse Medium Fine

-100 -100 -100


0 0 0
100 100 100

92
Sizing : Advanced Sizing Functions
• Controls the growth and distribution of mesh in important
regions of high curvature or close proximity of surfaces

• Five Options:
– Off.
– Proximity and Curvature
– Curvature
– Proximity
– Fixed
Sizing : Advanced Sizing Function (ASF) Examples

ASF: Off ASF: Curvature ASF: Proximity


• The edges are meshed • Determines the Edge and • Controls the mesh resolution
with global Element Size Face sizes based on on proximity regions in the
• Then the edges are Curvature Normal Angle model
refined for curvature and • Finer Curvature Normal • Fits in specified number of
2D proximity Angle creates finer surface elements in the narrow gaps
• At the end, corresponding mesh • Higher Number of Cells
face and volume mesh is • Transition of cell size is Across Gap creates more
generated defined by Growth Rate refined surface mesh
• Transition of cell size is • Transition of cell size is
defined by Transition defined by Growth Rate

94
Sizing : Advanced Sizing Function Examples

ASF: Proximity & Curvature ASF: Fixed ASF: Fixed + Local Sizings
• Combines the effect of • Constant mesh size through • Mesh is refined locally due to
‘Proximity’ and ‘Curvature’ out sizing (on 2 edges for that
size function • No refinement due to example)
curvature or proximity in the • Elsewhere size is defined by
model Max (Face) Size
More computational time • Surface mesh is generated • Transition of cell size is
with specified Max Face defined by Growth Rate
Size
• Volume mesh is generated
with specified Max Size

95
Sizing : Element Size
Element Size
• Element size used for the entire model
– This size will be used for meshing all edges, faces and bodies
• Default value based on Relevance and Initial Size Seed
– User can input required value as per geometry dimensions

Element size option


available when Advanced
Size Function is not used

96
Sizing : Min and Max Size
Min Size
• Minimum element size that the size function will generate
• Some element sizes may be smaller than this size depending on
the edge length
Max Face Size
• Maximum face size that the size function will generate
Max Size
• Maximum element size that can be grown in the interior of
volume mesh

Mouse Pointer serves to estimate


mesh sizes

Min Size

Max Face Size

Min Size ≤ Max Face Size ≤ Max Size Max Size

97
Sizing : Growth Rate
• Define the ratio between sizes of adjacent cells
– On surfaces and inside the volumes

Growth Rate = 1.1 Growth Rate = 1.2 (Default)

Growth Rate = 1.3

Mesh size:
GR = 1.1 : 1,263,297 cells
GR = 1.2 : 587,026 cells
GR = 1.3 : 392,061 cells

98
Sizing : Transition
• Controls the rate at which elements grow
• Two level control for transition
– Slow (Default for CFD, Explicit), produces smooth transitions
– Fast (Default for Mechanical and Electromagnetic), produces more
abrupt transitions
• Hidden for sheet models, ignored for assemblies containing
sheets, when ASF is On

Fast Slow

99
Sizing : Smoothing
• Improves quality by moving locations of nodes with respect to
surrounding nodes
• Three level control for smoothing iterations
– High (Default for Explicit)
– Medium (Default for Mechanical, Electromagnetic and CFD)
– Low

• For Cutcell meshing, the Smoothing option controls the quality


threshold at which it will start smoothing. High is recommended.
Low Medium High

100
Sizing : Span Angle Center
• Controls curvature based refinement for Edges
• Three options and corresponding span angle ranges are
– Coarse: 91° to 60°
– Medium: 75° to 24°
– Fine: 36° to12°

Fine
Medium
Coarse

101
Inflation
Inflation
• Used to generate thin cells adjacent to boundaries
• Required for capture of wall adjacent boundary layers
– Resolve viscous boundary layer in CFD
– Resolve thin air gaps in Electromagnetic analysis
– Resolve high stress concentration regions in Structures
• Cells are created by ‘inflating’ from the surface mesh into the
volume (3d) or inflating from the boundary edge onto the face (2d)
• Options to control growth

102
Inflation : Automatic Inflation
• Three options
– None
• Select this for manual inflation settings using local mesh
controls
– Program Controlled
• All the faces are selected for inflation except:
• Faces scoped to a Named Selection
• Faces with manual inflation defined
• Faces in contact regions
• Faces in symmetry
• Faces that belong to a part or body that has a mesh method
defined that does not support 3D inflation, such as hex-
dominant
• Faces in sheet bodies
– All Faces in chosen Named Selection: can grow inflation
layers from faces grouped in one named selection

103
Inflation : Inflation Options
Five options: All available for PC tets and Assembly meshing
Smooth Transition
Maintains smooth volumetric growth
between each adjacent layer. Total
Smooth thickness depends on the variation of
Smoo
Transition th base surface mesh sizes (Default)
Transition
First Layer Thickness
Maintains constant first cell height
throughout First Layer
Total Thickness Thickness
Maintains constant total height of inflation
layer throughout
Total
Thickness First Aspect Ratio
Controls the heights of the inflation layers
by defining the aspect ratio of the
inflations that are extruded from the
First Aspect
inflation base
Ratio
Last Aspect Ratio
Creates inflation layers using the values
Last Aspect of the first layer height, maximum layers,
Ratio and aspect ratio controls

104
Inflation : Inflation Algorithms
• Two Algorithms
– Post
– Pre
• Patch independent
meshes use Post Post

• First Tet grows then Inflation process starts


• Tet mesh is undisturbed, if the inflation options are altered
• Default option for Patch IndependentTetrahedrons

Preview Inflation
is available only
with Pre Algorithm

Pre

• Surface mesh is inflated first, then rest of the volume meshgrows


• Default method for Patch ConformingTetrahedrons

105
Defeaturing
• Removes small geometry features meeting the tolerances
using Pinch or/and Automatic Mesh Based Defeaturing
controls in order to improve the mesh quality. Not all
meshing methods can take advantage of these controls
• Automatic Mesh Based Defeaturing (AMBD) when it is ‘On’,
features smaller than or equal to the value of Defeaturing
Tolerance are removed automatically

AMBD Off AMBD On

106
Statistics
• Option to view the mesh quality metric
• Exhaustive list of quality metrics
• Orthogonal Quality mesh quality metrics
• Option to view the Mesh Metric chart
– Intuitive controls available under Mesh Metric Chart
– Various options to explore under the ‘Controls’
• See Module 5 for details

107
Parallel Statistic Calculations

• Note that statistics can utilize multi-core machines to


speed up calculations in parallel
• Specify your core count in Tools > Options to allow this
• Note that options set here will be remembered for future
sessions so you can set physics preference default etc here.

108
Workshop 3 – Global Mesh Controls

109
Introduction to ANSYS Meshing

Module 4: Local Mesh Controls

110
Local Mesh Controls

What you will learn from this presentation

• Local mesh controls (Mesh sizing, Refinement, Match control, Inflation, etc)
• How to apply local controls?
• Effect of local controls on mesh

111
Preprocessing Workflow

Geometry Creation
Geometry
OR Meshing Solver
Operations
Geometry Import

Sketches and Meshing


3D Operations
Planes Methods

Boolean, Body Hybrid Mesh: Tet,


Operations, Split, Prisms, Pyramids
3D Operations
etc

Extrude, Revolve, Hexa Dominant,


Sweep, etc Sweep meshing
Geometry
Cleanup and Assembly
Repair Meshing
Geometry Import
Options
Automatic Global Mesh
Cleanup
Direct CAD/Bi-
Settings
Directional CAD
Merge, Connect,
Projection, Flow
Local Mesh
Volume Settings
Extraction, etc
Sizing,
Body/Sphere of
Influence, Match
Control, etc

112
Meshing Process in ANSYS Meshing

113
Local Mesh Controls
Control the mesh locally
• Depends on the “Mesh Method” used
Local Mesh Controls are:
• Sizing
– For Vertex, Edge, Face and Body
• Contact Sizing
– For Edge and face
• Refinement
– For Vertex, Edge and Face
• Mapped Face Meshing
– For Face
• Match Control
– For Edge and Face
• Pinch
– For Vertex and Edge
• Inflation
– For Edge and Face

The latest control added on a particularentity


overrides any prior controls

114
Sizing
Recommended for locally defining the mesh sizes
You can only scope sizing to one geometry entity type at a time
• For example: you can apply sizing to a number of edges or a number of faces, but not a mix of
edges and faces.

Four Types of Sizing option


• Element Size specifies average element edge length on bodies, faces or edges
• Number of Divisions specifies number of elements on edge(s)
• Body of Influence specifies average element size within a body
• Sphere of Influence specifies average element size within the sphere

Sizing options vary depending on the entity type chosen


Entity/Option Element Size Number of Divisions Body of Influence Sphere of Influence
Vertices x
Edges x x x Requires a
Coordinate
Faces x x system for
Bodies x x x the sphere
Advanced Size
Only Element Size type is available for Function in Global
CutCell meshing settings should be
disabled

115
Sizing : Edges
Sizing Type:
Element Size

Edge meshed with constant


element size of 60mm

Sizing Type:
Number of Divisions

Edge meshed with 10


elements

The Curvature Normal Angle and/or the GrowthRate


maybe not displayed depending on the ASF used

116
Sizing : Edges
Bias Type and Bias Factor
Specify the grading scheme and factor
• Bias Type: grading of elements towards one end, both ends, or the center

• Bias Option:
– Bias Factor: is the ratio of the largest element to the smallest element
– Smooth Transition: defined by Growth Rate which is ratio of size of an
element with size of previous element. (Growth Rate = Bias Factor^(1(n-1))

117
Sizing : Edges
Behavior
Soft: Sizing will be influenced by global sizing functions such as those based on
proximity and/or curvature as well as local mesh controls
Hard: Size control is strictly adhered to
•Transition between hard edges (or any edge with bias) and adjacentedge
and face meshes may be abrupt
•Hard edges or edges with bias will override Max Face Size and Max Size
properties

Influenced by global
Proximity advanced
Soft size function.

No influence from other


Hard global settings

118
Sizing : Faces
Element Size
Defines the maximum element size on the face

Face meshed with


constant element
size

Edge curvature is
resolved

119
Sizing : Body (volume)
Element Size
Defines the maximum cell size on the Body

Tetrahedron patch CutCell


conforming mesh mesh

Without Without
body sizing body sizing

With body Body meshed with max With body


cell size defined sizing
sizing

120
Sizing : Sphere of Influence
Sphere of Influence : on Vertex
– Available with or without Advanced Size Functions
– Sets the average element size around the selected vertex
– Inputs:
• Sphere radius and Element size
• Center of the sphere is defined by a model vertex

• Good resolution at the vertex


• The element size will be applied to all entities
connected to the selected vertex

121
Sizing : Sphere of Influence
Sphere of Influence : on Bodies
– Available with or without Advanced Size Functions
– Constant element size is applied within the confines
of a sphere
– Use coordinate system to define the center of the
Sphere

122
Sizing : Bodies of Influence
Bodies of influence (BOI)
– Lines, surfaces and solid bodies can be used to refine
the mesh
– Accessible when ASF is On

Line BOIs

Surface BOI Solid BOI

Without BOIs

The ‘Body of Influence’ itself will not be meshed


123
Mapped Face Meshing
• Creates structured meshes on selected mappable surfaces
– Mapped Face Meshing with advanced control is supportedfor
• Sweep, Patch Conforming, Hexa Dominant
• Quad Dominant and Triangles
– Mapped Face Meshing with basic control is supportedfor
• MultiZone
• Uniform Quad/Tri and Uniform Quad
– RMB on Mesh and Show/Mappable Faces to display all
mappable faces

If Mapped Face Meshing fails, ( ) icon appears adjacent to corresponding object


in the Tree outline. The mesh will still be created but will ignore this control.
124v
Mapped Face Meshing: Vertex Type
• ‘Side’, ‘Corner’ and ‘End’ controls for vertices, to define strategyfor
Mapping

Vertex Type Intersecting Grid Lines Angle BetweenEdges


End 0 0° — 135°
Side 1 136° — 224°
Corner 2 225° — 314°

125
Mapped Face Meshing: Example
E

E E
E E E S
E
E
E
E ES
EE E
E E

Vertex type is dependant to the attached face =>


the mesh can be individually controlled on all faces

126
Mapped Face Meshing: Radial No. of Divisions
• If face is defined by two loops, then the “Radial Number of Divisions”
field is activated
• Specify the number of divisions across the annular region
• Useful for creating number of layers across an annulus

Mapped face is swept to create


pure hex mesh

127
Match Control
• Define periodicity on faces (3D) or edges (2D)
• The two faces or edges should be topologically and geometrically the same
• A match control can only be assigned to one unique face/edge pair
• Match controls are not supported with Post Inflation Algorithm
• Match Control with Patch Independent tetrahedrons not supported yet
– Two types of match controls available:
• Cyclic and
• Arbitrary
– Not available for CutCell meshing

Matching face
mesh

If ‘Match Control’ fails, ( ) icon appears adjacent to corresponding


object in the outline Tree, however the mesh is created ignoring it

128
Match Control: Cyclic
• Define Rotational periodic
Full Model Cut Boundaries Periodic Model

Model is symmetrical at 90° so slice the body along dotted lines in DesignModeler

Selected Faces
for Match control
Matching face
mesh

129
Match Control: Arbitrary
• Two faces or edges to be matched, can be arbitrarily located

Full Model : Tube Banks


Symmetric + Periodic Model Face Mesh before ‘Match Control’

Model extracted through ‘Slice’


operation in DM
Face Mesh after ‘Match Control’

Coordinate systems need


to be suitably defined at
the faces to be matched Matching face mesh

130
Pinch

• To improve quality Pinch control


removes small features (edges or
narrow regions) at the mesh level
• The Pinch feature is supported
for the following mesh methods:
• Patch Conforming Tetrahedrons
• Thin Solid Sweeps
• Hex Dominant meshing
• Quad Dominant Surface Meshing
• Triangles Surface meshing
– Not supported for CutCell
meshing
– More details in lecture 5 “Mesh
Quality”

131
Inflation
Used to generate prism layers (as explained in Global settings chapter)
Inflation layer can be applied to faces or bodies using respectively edgesor
faces as the boundary

Inflation layer grown on edge boundary (red)

Inflation layer grown on face boundary (red)

132
Workshop 4 – Local Mesh Controls

133
Appendix

Contents
• Edge, Face & Body Sizing Options
• Sizing: Sphere of Influence
• Contact Sizing
• Refinement
• Inflation
• Object generator for copying mesh settings to like bodies

134
Edge, Face and Body Sizing Options
Curvature Normal Angle
Maximum allowable angle that one element edge is allowed tospan
Available only when Use Advanced Size Function is set to either On: Proximity and Curvature
or On: Curvature
You can specify a value from 0 to 180 degrees or accept the default. (A value of 0 resets the
option to its default.)
The default is calculated based on the values of the Relevance and Span Angle Center options
Growth Rate

Represents the increase in element edge length with each succeeding layer of elements. (For
example, a growth rate of 1.2 results in a 20% increase in element edge length with each
succeeding layer of elements.)
Available when Use Advanced Size Function is on
Specify a value from 1 to 5 or accept the default
The default is calculated based on the values of the Relevance and Transition options
Must be always lower or equal the global growthrate
135
Sizing : Sphere of Influence
Sphere of Influence : on Edges
– Available only if Advanced Size Function is OFF
– Use coordinate system to define the center of the Sphere

Mesh on the entity and other


proximity entities that lies within
the sphere of influence is affected

136
Sizing : Sphere of Influence
Sphere of Influence : on Faces
– Available only if Advanced Size Function is OFF
– Elements within the sphere will have given average elemen t size
– Use coordinate system to define the center of the sphere

137
Contact Sizing
• Generates similar-sized elements on contact faces between parts
– Two options
• Element Size. The size of the elements on contact faces respects the value
of Element Size specified
• Relevance. The size of the elements on contact faces are determined
internally by spheres of influence with automatic determination of radius
and size depending on the value of specified Relevance
– Not available for CutCell Meshing

Mesh without
Contact Sizing

138
Contact Sizing
•Note that the mesh is still non-conformal across the contact region
•To insert a Contact Sizing in the Mesh tree select the contact region
from Contacts list and drag it to Mesh object, or use RMB on the
Mesh

139
Refinement
• Valid for only for faces or edges
• Not available for Patch Independent Tetrahedrons, CutCell, Uniform Quad/Tri
Uniform Quad meshing methods
• Refinement is applied after the creation of mesh with rest of the
settings
• Refinement level can vary from 1 (minimal) to 3 (maximum)
• A refinement level of “1” breaks up the edges of the elements into half
– The Refinement control may be automatically suppressed when use inflation
depending on how the inflation/refinement is used. See the user’s Guide for details

Resultant mesh may be of poor quality

Only the selected face is affected and rest is almost unchanged

140
Inflation
Transition Ratio: Attempts to match the size
of last prism layer with that
of next Tet cell
Growth Rate: It determines the relative
thickness of adjacent inflation
layers
Transition Ratio: 0.5 Transition Ratio: 0.8
Growth Rate: 1.2 Growth Rate: 1.2

Defaults: Transition Ratio: 0.272


Growth Rate: 1.2

Transition Ratio: 0.27 Transition Ratio: 0.27


Growth Rate: 1.1 Growth Rate: 1.4
141
Object Generator
• Object generator allows user to copy tree objects attached to
an entity to several entities.
• Entities may or may not be similar. However, this works best for
copying mesh settings on similar entities.
• With mesh controls, it provides an easy way to assign similar
controls to a group of objects.

There are 4 similar bolt bodies on


In this example, multiple mesh controls are which these mesh settings can be
used to define mesh for a bolt body copied easily using Object Generator
142
Object Generator
• To use the Object Generator:
– In the standard toolbar, click the View Object Generator button to view the Object
Generator window.
– In the Tree Outline, select the mesh control to becopied.
– In the Geometry window, select the geometry to which the mesh control should be copied in the
Object Generator window.
– In the Object Generator window, select any required options and press Generate.
For mesh controls requiring multiple geometry,
primary set of entities should be selected in
“Generate From”. The entities for rest of the
inputs can be grouped in Named Selections.

For example, in this case input for “Source”


comes from set of source faces grouped in
“Source_Faces” Named Selection. This can be
created based on instance information if it exists,
or similar sized faces, etc. See slides on Named
Selection Worksheet. Similarly, Named Selection
can be provided for “Target”.

143
Object Generator
For copying inflation settings, two sets of entities will be required, first one for “Geometry” on
which inflation needs to be applied and second one for “Boundary”. Here, set of faces for
“Boundary” is grouped in “INF” Named Selection.

144
Introduction to ANSYS Meshing

Module 5: Mesh Quality

145
Mesh Quality
What you will learn from this presentation

• Impact of the Mesh Quality on the Solution


• Quality criteria
• Methods for checking the mesh quality
• Tools to improve quality in Meshing
• Pinch
• Virtual topology

146
Preprocessing Workflow

Geometry Creation
Geometry
OR Meshing Solver
Operations
Geometry Import

Sketches and Meshing


3D Operations
Planes Methods

Boolean, Body Hybrid Mesh: Tet,


Operations, Split, Prisms, Pyramids
3D Operations
etc

Extrude, Revolve, Hexa Dominant,


Sweep, etc Sweep meshing
Geometry
Cleanup and Assembly
Repair Meshing
Geometry Import
Options
Automatic Global Mesh
Cleanup
Direct CAD/Bi-
Settings
Directional CAD
Merge, Connect,
Projection, Flow
Local Mesh
Volume Settings
Extraction, etc Check Mesh
Sizing, Quality
Body/Sphere of
Influence, Match
Control, etc

147
Meshing Process in ANSYS Meshing

148
Impact of the Mesh Quality
Good quality mesh means that…
• Mesh quality criteria are within correct range
– Orthogonal quality …
• Mesh is valid for studied physics
– Boundary layer …
• Solution is grid independent
• Important geometric details are wellcaptured

Bad quality mesh can cause;


• Convergence difficulties
• Bad physic description
• Diffuse solution
User must…
• Check quality criteria and improve grid if needed
• Think about model and solver settings before generating thegrid
• Perform mesh parametric study, mesh adaption …
149
Impact of the Mesh Quality on the
Solution

• Example showing
difference between a
mesh with cells
failing the quality
criteria and a good
mesh
• Unphysical values in
vicinity of poor
quality cells

150
Impact of the Mesh Quality on the Solution
• Diffusion example
(max,avg)CSKEW=(0.912,0.291)
(max,avg)CAR=(62.731,7.402)

Mesh 1
VzMIN≈-90ft/min
VzMAX≈600ft/min

Large cell size


change
(max,avg)CSKEW=(0.801,0.287)
(max,avg)CAR=(8.153,1.298)
Mesh 2

VzMIN≈-100ft/min
VzMAX≈400ft/min
Grid Dependency

DP 0 DP 1 DP 2 DP 3 DP 4
Nb Cells 500 3 000 24 000 190 000 x8 1.5 M

• Solution run with DP 0 DP 3


multiple meshes
• Note : For all runs the
computed Y+ is valid
for wall function (first
cell not in laminar
zone)

2%

152
Grid Dependency

• Hexa cells can be stretched in


stream direction to reduce
number of cells
• Bias defined on inlet and
outlet walls
• Bias defined on inlet edges

– 16 000 cells (~DP2)


– Delta P = 310 Pa (~DP3)

153
Hexa vs. Tetra

• Hexa: Concentration in one direction Hexa


– Angles unchanged
• Tetra: Concentration in one direction
– Angles change Tetra
• Prism: Concentration in one direction
– Angles unchanged
• Solution for boundary layer Prism
resolution
– Hybrid prism/tetra meshes
– Prism in near-wall region, tetra in volume
– Automated
– Reduced CPU-time for good Tetra (in volume)
boundary layer resolution

Prisms (near wall)

154
Mesh Statistics and Mesh Metrics
Displays mesh information for Nodes and Elements
List of quality criteria for the Mesh Metric
• Select the required criteria to get details for quality
• It shows minimum, maximum, average and standard deviation
Different physics and different solvers have different requirements for
mesh quality
Mesh metrics available in ANSYS Meshing include:
– Element Quality
– Aspect Ratio
– Jacobean Ration
– Warping Factor
– Parallel Deviation
– Maximum Corner Angle
– Skewness
– Orthogonal Quality
For Multi-Body Parts, go to corresponding body in Tree Outline
to get its separate mesh statistics per part/body

155
Mesh Quality Metrics
Orthogonal Quality (OQ)
On cell On face
Derived directly from
A1
Fluent solver discretization
A1
c1
• For a cell it is the minimum of: c2 e1
f1
Ai  f i Ai ci f2 e2
f3 A2 e3 A2
| Ai || f i | | Ai || ci | c3
computed for each face i A3 A3
Ai ei
For the face it is computed as the minimum of | Ai || ei | computed for each edgeI
Where Ai is the face normal vector and fi is a vector from the centroid of the cell to the centroid
of that face, and ci is a vector from the centroid of the cell to the centroid of the adjacent cell,
where ei is the vector from the centroid of the face to the centroid of the edge
At boundaries and internal walls
ci is ignored in the computations of OQ 0 1
Worst Perfect

156
Mesh Quality Metrics
Optimal (equilateral) cell
Skewness
Two methods for determining skewness:
1. Equilateral Volume deviation:

Skewness = optimal cell size − cell size


optimal cell size
Applies only for triangles and tetrahedrons Actual cell

2. Normalized Angle deviation: Circumsphere

max −e e −min  max


Skewness = max  , 
 180− e e  min
Where e is the equiangular face/cell (60 for
tets and tris, and 90 for quads and hexas)
– Applies to all cell and face shapes
0 1
– Used for hexa, prisms and pyramids Perfect Worst

157
Mesh Quality
Mesh quality recommendations
Low Orthogonal Quality or high skewness values are not recommended
Generally try to keep minimum orthogonal quality > 0.1, or maximum skewness < 0.95.
However these values may be different depending on the physics and the location
of the cell
Fluent reports negative cell volumes if the mesh contains degenerate cells
Skewness mesh metrics spectrum

Excellent Very good Good Acceptable Bad Unacceptable


0-0.25 0.25-0.50 0.50-0.80 0.80-0.94 0.95-0.97 0.98-1.00

Orthogonal Quality mesh metrics spectrum

Unacceptable Bad Acceptable Good Very good Excellent


0-0.001 0.001-0.14 0.15-0.20 0.20-0.69 0.70-0.95 0.95-1.00
158
Aspect Ratio
2-D:
δy
• Length / height ratio: δx/δy
δx
3-D
• Area ratio
• Radius ratio of circumscribed / inscribed
circle

Limitation for some iterative solvers


• A < 10 … 100
• (CFX: < 1000)

Large aspect ratio are accepted where


there is no strong transverse
gradient (boundary layer ...)

159
Mesh quality: skewness
• Two methods for determining
skewness:
1. Based on the equilateral
volume: optimal (equilateral) cell
optimal cell size - cell size
• Skewness =
optimal cell size circumcircle

• Applies only to triangles and


tetrahedra.
• Default method for tris and tets.
actual cell

2. Based on the deviation from a


normalized equilateral angle:
90 90
• Skewness (for a quad) = max
max min
,
90

• Applies to all cell and face  max


shapes.
• Always used for prisms and min

pyramids.
24
Equiangle skewness
• Common measure of quality is based on equiangle skew.
• Definition of equiangle skew:

max max e , e min


180 e e

where:
– max = largest angle in face or cell.
– min = smallest angle in face or cell. max
– e = angle for equiangular face or cell. min
• e.g., 60 for triangle, 90 for square.
• Range of skewness:

0 1
best worst
Mesh quality: smoothness and aspect ratio
• Change in size should be gradual (smooth).

smooth change large jump in


in cell size cell size

• Aspect ratio is ratio of longest edge length to shortest edge


length. Equal to 1 (ideal) for an equilateral triangle or a square.

aspect ratio = 1 high-aspect-ratio quad

aspect ratio = 1 high-aspect-ratio triangle


26
Striving for quality
• A poor quality grid will cause inaccurate solutions and/or slow
convergence.
• Minimize equiangle skew:
– Hex and quad cells: skewness should not exceed 0.85.
– Tri’s: skewness should not exceed 0.85.
– Tets: skewness should not exceed 0.9.
• Minimize local variations in cell size:
– E.g. adjacent cells should not have ‘size ratio’ greater than 20%.
• If such violations exist: delete mesh, perform necessary
decomposition and/or pre-mesh edges and faces, and remesh.

Value of 0-0.25 0.25-0.50 0.50-0.80 0.80-0.95 0.95-0.99 0.99-1.00


Skewness
Cell Quality excellent good acceptable poor sliver degenerate
Grid design guidelines: resolution
• Pertinent flow features should be adequately resolved.

flow inadequate better

• Cell aspect ratio (width/height) should be near one where flow is


multi-dimensional.
• Quad/hex cells can be stretched where flow is fully-developed
and essentially one-dimensional.

Flow Direction
OK!

28
Grid design guidelines: smoothness
• Change in cell/element size should be gradual (smooth).

smooth change sudden change


in cell size in cell size — AVOID!

• Ideally, the maximum change in grid spacing should be <20%:

• • • xi 1
1.2
xi xi+1 xi

29
Grid design guidelines: total cell count
• More cells can give higher accuracy. The downside is increased
memory and CPU time.
• To keep cell count down:
– Use a non-uniform grid to cluster cells only where they are needed.
– Use solution adaption to further refine only selected areas.
• Cell counts of the order:
– 1E4 are relatively small problems.
– 1E5 are intermediate size problems.
– 1E6 are large. Such problems can be efficiently run using multiple
CPUs, but mesh generation and post-processing may become slow.
– 1E7 are huge and should be avoided if possible. However, they are
common in aerospace and automotive applications.

30
Solution adaption
• How do you ensure adequate grid resolution, when you don’t
necessarily know the flow features? Solution-based grid adaption!
• The grid can be refined or coarsened by the solver based on the
developing flow:
– Solution values.
– Gradients.
– Along a boundary.
– Inside a certain region.

31
Grid adaption
• Grid adaption adds more cells where needed to resolve the flow
field.
• Fluent adapts on cells listed in register. Registers can be defined
based on:
– Gradients of flow or user-defined variables.
– Isovalues of flow or user-defined variables.
– All cells on a boundary.
– All cells in a region.
– Cell volumes or volume changes.
– y+ in cells adjacent to walls.
• To assist adaption process, you can:
– Combine adaption registers.
– Draw contours of adaption function.
– Display cells marked for adaption.
– Limit adaption based on cell size and number of cells.
32
Adaption example: final grid and solution

2D planar shell - final grid 2D planar shell - contours of pressure


final grid

33
Main sources of errors
• Mesh too coarse.
• High skewness.
• Large jumps in volume between adjacent cells.
• Large aspect ratios.
• Interpolation errors at non-conformal interfaces.
• Inappropriate boundary layer mesh.

34
Smoothness
Checked in solver
• Volume Change in Fluent
– Available in Adapt/Volume
– 3D : σi = Vi / Vnb

Recommendation:
• Expansion Factor in CFX Good: 1.0 < σ < 1.5
– Checked during mesh import Fair: 1.5 < σ < 2.5
– Ratio of largest to smallest element volumes Poor: σ > 5 … 20
surrounding a node

171
Mesh Metric Graph

• Displays Mesh Metrics graph for the


element quality distribution
• Different element types are plotted
with different color bars
• Can be accessed through menu bar
using Metric Graph button

• Axis range can be adjusted using


controls button (details next slide)

• Click on bars to view corresponding


elements in the graphics window
– Use to help locate poor quality
elements

172
Mesh Metric Graph Controls

• Elements on Y-Axis can be plotted


with two methods;
– Number of Elements
– Percentage of Volume/Area
• Options to change the range on
either axis
• Specify which element types to
include in graph
– Tet4 = 4 Node Linear Tetrahedron
– Hex8 = 8 Node Linear Hexahedron
– Wed6 = 6 Node Linear Wedge (Prism)
– Pyr5 = 5 Node Linear Pyramid
– Quad4 = 4 Node Linear Quadrilateral
– Tri3 = 3 Node Linear Triangle
• Te10, Hex20, Wed15, Pyr13, Quad8 &
Tri6 non-linear elements
173
Section Planes
Displays internal elements of the mesh
• Elements on either side of plane can be displayed
• Toggle between cut or whole elements display
• Elements on the plane
Edit Section Plane button can be used to drag section plane to new location
• Clicking on “Edit Section Plane” button will make section plane’s anchor to appear
Multiple section planes are allowed

For large meshes, it is advisable to switch to geometry mode (click on geometry in the Tree Outline),
create the section plane and then go back to mesh model
174
Mesh Quality Check for CFX

• The CFX solver calculates 3 important measures of mesh


quality at the start of a run and updates them each timethe
mesh is deformed
• Mesh Orthogonality
• Aspect Ratio
• Expansion Factor
+--------------------------------------------------------------------+
| Mesh Statistics |
+--------------------------------------------------------------------+
Domain Name: Air Duct
Good
Minimum Orthogonality Angle [degrees] = 20.4 ok (OK)
Maximum Aspect Ratio = 13.5 OK
Maximum Mesh Expansion Factor = 700.4 !
Domain Name: Water Pipe
Minimum Orthogonality Angle [degrees] = 32.8 ok Acceptable
Maximum Aspect Ratio = 6.4 OK (ok)
Maximum Mesh Expansion Factor = 73.5 !
Global Mesh Quality Statistics :
Minimum Orthogonality Angle [degrees] = 20.4 ok Questionable
Maximum Aspect Ratio = 13.5 OK
Maximum Mesh Expansion Factor = 700.4 !
(!)

175
Mesh Quality Check for Fluent
Grid check tools available
• Check : Perform various mesh consistency
checks
• Report Quality : lists worse values of
orthogonal quality and aspect ratio
• TUI command mesh/check-verbosity sets
the level of details in the report

176
Factors Affecting Quality
Geometry problems
Geometry cleanup in Design Modeler
• Small edge or
• Gaps Virtual topology & pinch in Meshing
• Sharp angle
Meshing parameters
• Sizing Function On / Off
• Min size too large Mesh setting change
• Inflation parameters
– Total height
– Maximum angle
• Hard sizing
Meshing methods
Mesh setting change
• Patch conformal or patch independent tetra
• Sweep or Multizone
• Cutcell

177
Workshops 5

Automotive Aero

178

You might also like