Вы находитесь на странице: 1из 196

1

2016 ANSYS, Inc.

Module A: Introduction to ANSYS Inc.


Introduction to ANSYS Fluent

April 12, 2016

ANSYS is the Simulation Leader


TRUSTED
USTEED

FOCUSED

96

This is all we do.


Leading product technologies in all physics areas
Largest development team focused on simulation

CAPABLE

of the
e top
op 100
1

FORTUNE
RTUNE 500
500 Industrials
Indust
Ind
u riaalss
ust
ISO 9001 and
nd
d NQA-1
N A-1 certified
NQ
cert
er ifie
e
ed

PROVEN
2,700+
employees

Recognized as one of the worlds MOST INNOVATIVE


AND FASTEST-GROWING COMPANIES*

75

INDEPENDENT

locations

Long-term financial stability


CAD agnostic

40

countries

LARGEST

3x

2016 ANSYS, Inc.

The size of our


nearest competitor
*BusinessWeek, FORTUNE

April 12, 2016

Breadth of Technologies

2016 ANSYS, Inc.

To Multi-Domain
System Analysis

Systems:
From Data Sharing

To High-Frequency
Field Analysis

Electromagnetics: From
Low-Frequency Windings

To High-Speed Impact

Structural Mechanics:
From Linear Statics

To Multiphase
Combustion

Fluid Mechanics:
From Single-Phase Flows

April 12, 2016

ANSYS Customer Portal

https://support.ansys.com
Submit and review service requests
If you cannot find the answer to your question within the ANSYS Customer Portal then you can
submit a service request for technical assistance.

Download the latest software and updates


Download either ISO images or individual installer packages to access the latest software release.

Download training and tutorial materials


Examples are available for both a broad range of ANSYS products and users experience. Search
the hundreds of examples available and improve your knowledge of ANSYS software.

2016 ANSYS, Inc.

April 12, 2016

2016 ANSYS, Inc.

17.0 Release

Module 00: Virtual Classroom Course Agenda


Introduction to ANSYS Fluent

April 12, 2016

Agenda
Module 00: Introduction to ANSYS
Module 01: Overview of the CFD Process
Module 02: Setting Up Domain

Workshop 01: Mixing Tee


Module 03: Setting up Physics
Workshop 02: Discrete Phase Model

Module 04: Postprocessing


Workshop 03: Postprocessing

2016 ANSYS, Inc.

April 12, 2016

Agenda
Module 05: Solving
Workshop 04: Airfoil
Module 06: Parameters and Design Points

Workshop 05: Parametric Analysis


Module 07: Turbulence
Workshop 06: Backward Facing Step

Module 08: Heat Transfer


Workshops 07: Electronics Cooling

2016 ANSYS, Inc.

April 12, 2016

Agenda
Module 09: Best Practices
Workshop 08: MRF and Sliding Mesh
Module 10: Transient Flow Modeling

Workshop 09: Vortex shedding


or
Workshop 10: Tank Flushing

2016 ANSYS, Inc.

April 12, 2016

2016 ANSYS, Inc.

17.0 Release

Module 01: Overview of the CFD Process


Introduction to ANSYS Fluent

April 12, 2016

Introduction
Lecture Theme:
All CFD simulations follow the same key stages. This lecture will explain how to
go from the original planning stage to analyzing the end results
Learning Aims:
You will learn:
The basics of what CFD is and how it works
The different steps involved in a successful CFD project
Learning Objectives:
When you begin your own CFD project, you will know what each of the steps
requires and be able to plan accordingly
Introduction
2

CFD Approach

2016 ANSYS, Inc.

Pre-Processing

Solution

Post-Processing

Summary

April 12, 2016

What is CFD?
Computational Fluid Dynamics (CFD) is the science of predicting fluid flow, heat and mass
transfer, chemical reactions, and related phenomena.
To predict these phenomena, CFD solves equations for conservation of mass,
momentum, energy etc..
CFD can provide detailed information on the
fluid flow behavior:

CFD is used in all stages of the engineering


process:

Distribution of pressure, velocity, temperature, etc.


Forces like Lift, Drag.. (external flows, Aero, Auto..)
Distribution of multiple phases (gas-liquid, gas
solid..)

Species composition (reactions, combustion,


pollutants..)

Much more...
Introduction

Conceptual studies of new designs


Detailed product development
Optimization
Troubleshooting
Redesign

CFD analysis complements testing and experimentation by reducing


total effort and cost required for experimentation and data acquisition
CFD Approach

2016 ANSYS, Inc.

Pre-Processing

Solution

Post-Processing

Summary

April 12, 2016

How Does CFD Work?


ANSYS CFD solvers are based on the finite volume method

Domain is discretized into a finite set of control volumes

Control
Volume*

General conservation (transport) equations for mass, momentum, energy,


species, etc. are solved on this set of control volumes

Unsteady

Convection

Diffusion

Generation

Partial differential equations are discretized into a system of algebraic equations

1
u
v
w
h

Continuity
X momentum
Y momentum
Z momentum
Energy

Equation

All algebraic equations are then solved numerically to render the solution field
Introduction
4

CFD Approach

2016 ANSYS, Inc.

Pre-Processing

Solution

Post-Processing

Summary

April 12, 2016

Step 1. Define Your Modeling Goals


What results are you looking for (i.e. pressure drop, mass flow rate), and
how will they be used?
What are your modeling options?
What simplifying assumptions can you make (i.e. symmetry, periodicity)?
What simplifying assumptions do you have to make?
What physical models will need to be included in your analysis

What degree of accuracy is required?


How quickly do you need the results?
Is CFD an appropriate tool?
Introduction
2016 ANSYS, Inc.

CFD Approach

Pre-Processing

Solution

Post-Processing

Summary

April 12, 2016

Step 2. Identify the Domain You Will Model


How will you isolate a piece of the
complete physical system?
Where will the computational domain
begin and end?
Do you have boundary condition information at
these boundaries?

Domain of Interest
as Part of a Larger
System (not modeled)

Can the boundary condition types accommodate


that information?

Can you extend the domain to a point where


reasonable data exists?

Can it be simplified or approximated as a


2D or axi-symmetric problem?
Introduction
6

2016 ANSYS, Inc.

CFD Approach

Pre-Processing

Domain of interest
isolated and meshed
for CFD simulation.

Solution

Post-Processing

Summary

April 12, 2016

Step 3. Create a Solid Model of the Domain


How will you obtain a model of the fluid region?
Make use of existing CAD models?
Extract the fluid region from a solid part?
Create from scratch?
Can you simplify the geometry?
Remove unnecessary features that would complicate meshing
(fillets, bolts)?
Make use of symmetry or periodicity?
Are both the flow and boundary conditions symmetric /
periodic?

Do you need to split the model so that boundary


conditions or domains can be created?
Introduction
2016 ANSYS, Inc.

CFD Approach

Pre-Processing

Solution

Post-Processing

Original CAD Part

Extracted
Fluid Region
Summary

April 12, 2016

Step 4. Design and Create the Mesh


What degree of mesh resolution is required in each region of
the domain?

Can you predict regions of high gradients?


The mesh must resolve geometric features of interest and capture
gradients of concern, e.g. velocity, pressure, temperature gradients

Will you use adaption to add resolution?


What type of mesh is most appropriate?

How complex is the geometry?


Can you use a quad/hex mesh or is a tri/tet or hybrid mesh suitable?
Are non-conformal interfaces needed?
Do you have sufficient computer resources?

How many cells/nodes are required?


How many physical models will be used?
Introduction
8

2016 ANSYS, Inc.

CFD Approach

Pre-Processing

Solution

Post-Processing

Summary

April 12, 2016

Step 5. Set Up the Solver


For a given problem, you will need to:

Define material properties


Fluid
Solid
Mixture
Select appropriate physical models
Turbulence, combustion, multiphase, etc.
Prescribe operating conditions
Prescribe boundary conditions at all boundary zones
Provide initial values or a previous solution
Set up solver controls
Set up convergence monitors
Introduction
2016 ANSYS, Inc.

CFD Approach

Pre-Processing

Solution

For complex problems solving a


simplified or 2D problem will provide
valuable experience with the models and
solver settings for your problem in a
short amount of time

Post-Processing

Summary

April 12, 2016

Step 6. Compute the Solution


The discretized conservation equations are solved
iteratively until convergence
Convergence is reached when:

Changes in solution variables from one iteration


to the next are negligible

Residuals provide a mechanism to help


monitor this trend

Overall property conservation is achieved


Imbalances measure global conservation

Quantities of interest (e.g. drag, pressure drop) have reached


steady values

Monitor points track quantities of interest

The accuracy of a converged solution is dependent upon:

Appropriateness and accuracy of physical models


Assumptions made
Mesh resolution and independence
Numerical errors

Introduction
10

CFD Approach

2016 ANSYS, Inc.

Pre-Processing

Solution

A converged and mesh-independent


solution on a well-posed problem
will provide useful engineering
results!

Post-Processing

Summary

April 12, 2016

11

Step 7. Examine the Results


Examine the results to review solution and
extract useful data

Visualization Tools can be used to answer such


questions as:

What is the overall flow pattern?


Is there separation?
Where do shocks, shear layers, etc. form?
Are key flow features being resolved?

Numerical Reporting Tools can be used to calculate


quantitative results:

Forces and Moments


Average heat transfer coefficients
Surface and Volume integrated quantities
Flux Balances

Introduction

CFD Approach

2016 ANSYS, Inc.

Pre-Processing

Solution

Examine results to ensure correct physical behavior and


conservation of mass energy and other conserved
quantities. High residuals may be caused by just a few poor
quality cells.
Post-Processing

Summary

April 12, 2016

Step 8. Consider Revisions to the Model


Are the physical models appropriate?

Is the flow turbulent?


Is the flow unsteady?
Are there compressibility effects?
Are there 3D effects?
Are the boundary conditions correct?

Is the computational domain large enough?


Are boundary conditions appropriate?
Are boundary values reasonable?
Is the mesh adequate?

Does the solution change significantly with a refined mesh, or


is the solution mesh independent?

Does the mesh resolution of the geometry need to be


improved?

High residuals may be caused by


just a few poor quality cells

Does the model contain poor quality cells?


Introduction
12

CFD Approach

2016 ANSYS, Inc.

Pre-Processing

Solution

Post-Processing

Summary

April 12, 2016

Use CFD with Other Tools to Maximize its Effect


Problem Identification
1.
2.

CAD Geometry

Mesh

Define goals
Identify domain

Pre-Processing
cessing
3.
4.
5.
6.

Thermal Profile on Windshield

Geometry
Mesh
Physics
Solver Settings

Solve
So
7.

Compute solution

9. Update Model

Automated Optimization of
Windshield Defroster with
ANSYS DesignXplorer

Final Optimized Design

Post Processing
essing

8.

Examine
m
results

Prototype Testing
13

2016 ANSYS, Inc.

Manufacturing

April 12, 2016

Summary and Conclusions


Summary:
All CFD simulations (in all mainstream CFD software products) are
approached using the steps just described
Remember to first think about what the aims of the simulation are
prior to creating the geometry and mesh
Make sure the appropriate physical models are applied in the
solver, and that the simulation is fully converged (more in a later
lecture)
Scrutinize the results, you may need to rework some of the earlier
steps in light of the flow field obtained

What Next:
Trainer will now demonstrate Fluent in action
Introduction
14

CFD Approach

2016 ANSYS, Inc.

Pre-Processing

Solution

Post-Processing

1. Define Your Modeling


Goals
2. Identify the Domain You
Will Model
3. Create a Geometric
Model of the Domain
4. Design and Create the
Mesh
5. Set Up the Solver
Settings
6. Compute the Solution
7. Examine the Results
8. Consider Revisions to the
Model
Summary

April 12, 2016

2016 ANSYS, Inc.

17.0 Release

Module 02: Setting Up Domain


Introduction to ANSYS Fluent

April 12, 2016

Introduction
Lecture Theme:
The ribbon in the Fluent user interface is used to guide your workflow.
Learning Aims:
You will learn:
The Fluent user interface
How to use the Ribbon to guide your workflow
Some basic operations under Setting Up Domain
Learning Objectives:
You will become familiar with the Fluent environment and the first steps
performed at the beginning of a Fluent session
Introduction
2

CFD Approach

2016 ANSYS, Inc.

Pre-Processing

Solution

Post-Processing

Summary

April 12, 2016

Fluent Graphical User Interface (GUI): Ribbon


The Ribbon, at the top of
the GUI, is the primary
method for setting up and
running your simulation
Work through the tabs from
left to right
Setting Up Domain
Setting Up Physics
Solving
Postprocessing

2016 ANSYS, Inc.

April 12, 2016

ANSYS Fluent Workflow


Ribbon Guides Basic Workflow

Settingg Up
p Domain

Setting Up Physics

Read and check mesh


Check mesh quality
Define mesh interfaces
(if needed)
See Module 3
Convert mesh to
polyhedra (optional, if
needed)
Transform mesh
(optional, if needed)
Scale, translate, rotate
Set units
Introduction
4

2016 ANSYS, Inc.

Solver
Setup basic options
Models
Setup Energy, Viscous
(turbulence),
Multiphase,
Materials
Create/Edit materials
and their properties
Zones
Cell zone and boundary
conditions

Material Properties

Cell Zone Conditions

Solving

Postprocessing

Choose solution methods


and controls
Define reports for
convergence checking
Initialization
Run calculation

Boundary Conditions

Mesh Interfaces

Graphics and Plots


Visualize solution data
Reports
Quantitative solution
analysis

Summary

April 12, 2016

Demo: GUI and Setting Up Domain Operations


Instructor will demonstrate
Starting Fluent
From Workbench
Outside Workbench (standalone mode)
GUI Components
Graphics windows and mouse operation
Changing the layout
Setting Up Domain Operations
Mesh check
Mesh quality report
Polyhedral conversion
Scaling
Units
2016 ANSYS, Inc.

April 12, 2016

Summary
The Ribbon is the primary method for setting up and running your
simulation
Workflow proceeds through the Ribbon tabs from left to right
The GUI layout can be customized
The most common steps in the Setting Up Domain tab have been
demonstrated

Introduction
6

2016 ANSYS, Inc.

CFD Approach

Pre-Processing

Solution

Post-Processing

Summary

April 12, 2016

Auxiliary Operations
The definition of models, material properties, boundary conditions
and cell zone conditions is a fundamental part of setting up any CFD
simulation in Fluent
There are some additional auxiliary operations that may be generally
very useful when setting up a simulation in Fluent

Polyhedral mesh conversion


Text User Interface (TUI)
Journal files
Reading and writing data profiles

2016 ANSYS, Inc.

April 12, 2016

Polyhedral Mesh Conversion

Tet/Hybrid Mesh

A tetrahedral or hybrid grid can be converted to


polyhedra in the Fluent GUI (not in ANSYS Meshing).
Generate a tetrahedral mesh then convert inside Fluent.
Advantages
Improved mesh quality.
Can reduce cell count significantly.
User has control of the conversion process.
Disadvantages:
Cannot be adapted or converted again.
Cannot use tools such as skewness-based smoothing or extrude to
modify the mesh.

Polyhedral Mesh

Laplacian and quality-based smoothing can be used as an alternative

Two conversion options are available in the Mesh menu:


Mesh > Polyhedra > Convert Domain
Convert all cells in the domain (except hex cells) to polyhedra
Cannot convert adapted meshes with hanging nodes
Convert only highly skewed cells to polyhedra

Mesh > Polyhedra > Convert Skewed Cells


8

2016 ANSYS, Inc.

April 12, 2016

Text User Interface


Most GUI commands have a
corresponding TUI command.
Press the Enter key to display the
command set at the current level.
q moves up one level.
Some advanced commands are only
available through the TUI.

The TUI offers many valuable


benefits:

TUI in Console Window

Journal (text) files can be constructed


to automate repetitive tasks.
Fluent can be run in batch mode, with
TUI journal scripts set to automate
the loading / modification / solver
execution and postprocessing.
Very complex models can be set using a
spreadsheet to generate the TUI
commands.
2016 ANSYS, Inc.

April 12, 2016

Sample Fluent Journal


A journal file is a text file which contains TUI
commands which Fluent will execute
sequentially.
Note that the Fluent TUI accepts abbreviations
of the commands for example,
rcd
wcd

Reads case and data files


Writes case and data files

Fluent text commands listed in the ANSYS


Documentation: FLUENT->Text Command List

; Read case file


rc example.cas.gz
; Initialize the solution
/solve/initialize/initialize-flow
; Calculate 50 iterations
it 50
; Write data file
wd example50.dat.gz
; Calculate another 50 iterations
it 50
; Write another data file
wd example100.dat.gz
; Exit Fluent
exit
yes

Sample Journal File


10

2016 ANSYS, Inc.

April 12, 2016

11

Launching ANSYS Fluent: Batch Mode


ANSYS Fluent can be run in batch mode in conjunction with a journal file
This is useful if the HPC cluster being used to run a job does not allow interactive execution

See User Guide for more details

2016 ANSYS, Inc.

April 12, 2016

Scaling the Mesh and Selecting Units


When Fluent reads a mesh file (.msh),
all dimensions are assumed to be in
units of meters
If your model was not built in meters, then it must
be scaled
Always verify that the domain extents are
correct

When importing a mesh under


Workbench, the mesh does not need
to be scaled; however, the units are
set to the default MKS system
Any mixed units system can be used
if desired
By default, Fluent uses the SI system of units
(specifically, MKS system)
Any units can be specified in the Set Units panel,
accessed from the Define menu
12

2016 ANSYS, Inc.

April 12, 2016

Reordering and Modifying the Grid


The grid can be reordered so that neighboring cells are near each other in the zones and in
memory
Improves efficiency of memory access and reduces the bandwidth of the computation
Reordering can be performed for the entire domain or specific cell zones.
Mesh > Reorder > Domain
Mesh > Reorder > Zones
The bandwidth of each partition in the grid can be printed for reference.
Mesh > Reorder > Domain

Face and cell zones can be modified by the following operations in the Mesh menu:

Separation and merge of zones


Fusing of cell zones with merge of duplicate faces and nodes
Translate, rotate, reflect face or cell zones
Extrusion of face zones to extend the domain
Replace a cell zone with another or delete it
Activate and Deactivate cell zones

2016 ANSYS, Inc.

2016 ANSYS, Inc.

13

April 12, 2016

17.0 Release

Module 03: Setting up Physics


Introduction to ANSYS Fluent

April 12, 2016

Introduction
Lecture Theme:
Defining material properties, cell zones and boundary conditions in the Setting Up Physics tab
in the Ribbon is an important part of any Fluent simulation. The accuracy of the simulation
results depends on defining these properly.

Learning Aims:
You will learn:
How to define material properties
The different boundary condition types in Fluent and how to use them
How to define mesh interfaces
How to define cell zone conditions in Fluent including solid zones and porous media
How to specify well-posed boundary conditions
Learning Objectives:
You will know how to perform these essential steps in setting up a CFD analysis
Introduction

Material Properties

2016 ANSYS, Inc.

Cell Zone Conditions

Boundary Conditions

Mesh Interfaces

Summary

April 12, 2016

ANSYS Fluent Workflow


Ribbon Guides Basic Workflow

Setting Up Domain

Setting Up Physics

Read and check mesh


Check mesh quality
Define mesh interfaces (if
needed)
See Module 3
Convert mesh to
polyhedra (optional, if
needed)
Transform mesh
(optional, if needed)
Scale, translate, rotate
Set units
Introduction
3

Cell Zone Conditions

Postprocessing

Solving

Solver
Setup basic options
Models
Setup Energy, Viscous
(turbulence),
Multiphase,
Materials
Create/Edit materials
and their properties
Zones
Cell zone and boundary
conditions

Material Properties

2016 ANSYS, Inc.

Choose solution methods


and controls
Define reports for
convergence checking
Initialization
Run calculation

Boundary Conditions

Graphics and Plots


Visualize solution data
Reports
Quantitative solution
analysis

Mesh Interfaces

Summary

April 12, 2016

Setting Up Physics: Other Group Boxes


Solver
There is normally no need to change anything here unless a
simulation is
Transient (covered in Module 10)
High speed compressible flow

Models
Commonly used models include
Energy (heat transfer) (covered in Module 8)
Radiation (covered in Module 8)
Viscous (turbulence) (covered in Module 7)
Additional models are demonstrated in the workshops but not
covered in detail (advanced training courses available)
Multiphase
Species and combustion
Discrete Phase
Introduction
2016 ANSYS, Inc.

Material Properties

Cell Zone Conditions

Boundary Conditions

Mesh Interfaces

Summary

April 12, 2016

Setting Up Physics: Create/Edit Materials


Fluent materials database
Provides access to a number of pre-defined
fluid, solid and mixture materials
Properties listed depend on the models used
Materials can be copied to the case file and
edited if required

User-Defined materials database


Custom databases can be created, accessed
and modified from the standard materials
panel in Fluent

Introduction
5

2016 ANSYS, Inc.

Material Properties

Cell Zone Conditions

Boundary Conditions

Mesh Interfaces

Summary

April 12, 2016

Fluid Density
For incompressible flow with U = constant
Select constant for density

Ideal gas properties

Incompressible flow, U = f(T)


Polynomial or piecewise-polynomial
Incompressible ideal gas law (U = poperating/RT)
Set poperating close to the mean pressure in the
problem see next slide

Compressible flow, U = f(p,T)


Use ideal-gas for density (U = pabsolute/RT)
For low-Mach-number flows, set poperating close to mean pressure of the problem to
avoid round-off errors
Introduction

Material Properties

2016 ANSYS, Inc.

Cell Zone Conditions

Boundary Conditions

Mesh Interfaces

Summary

April 12, 2016

Operating Pressure
Represents the absolute pressure datum from which
all relative pressures are measured
Pabsolute = Poperating + Prelative
Pressures specified at boundary conditions and initial conditions are relative
to the Operating Pressure

Used to avoid problems with round-off errors which occur


when the dynamic pressure differences in a fluid are small
compared to the absolute pressure level
Pref

Pressure

Pressure
Prel,max = 100,001 Pa
Prel,min = 99,999 Pa

Prel,max=1 Pa
Prel,min=-1 Pa

Pref

Ex. 1:
Introduction
7

Poperating=

Ex. 2:

0 Pa

Material Properties

2016 ANSYS, Inc.

Poperating=

Cell Zone Conditions

100,000 Pa

Boundary Conditions

Mesh Interfaces

Summary

April 12, 2016

Cell Zones and Boundary Zones


The mesh consists of a large number of finite
volumes, or cells
The cells are grouped into one or more cell
zones
For instance in a conjugate heat transfer calculation there
may be one cell zone for the fluid region and a second cell
zone for the solid material

Each cell is bounded by a number of faces


These faces are grouped into a number of
face zones
Some of these faces are located on the
boundaries of the model
The zones to which such faces belong are
called boundary zones
Introduction
2016 ANSYS, Inc.

Material Properties

Cell Zone Conditions

Simple 3D mesh
Boundary
Face
Cell
Cell zone conditions are applied
to all cell zones
Boundary conditions are applied
to all boundary zones

Boundary Conditions

Mesh Interfaces

Summary

April 12, 2016

Setting Up Physics: Cell Zones


Select Cell Zones in the Zones group box
Filter by type (fluid or solid) or select all
The Cell Zone Conditions task page opens
Double click on any zone in the list to bring up its cell zone
conditions panel
The cell zone conditions panel can be used to define a
porous zone, prescribe energy sources in solid and fluid
zones, specify inputs for rotating machinery, fix the values
of one or more solution variables and many other
operations

Introduction
9

2016 ANSYS, Inc.

Material Properties

Cell Zone Conditions

Boundary Conditions

Mesh Interfaces

Summary

April 12, 2016

10

Cell Zones
A fluid cell zone, or more simply, a fluid zone, is a group of cells for which all
q
active equations
are solved

e.g. A simulation of a copper heating coil in water will


require a fluid zone and a solid zone. Using water
properties, the equations of flow and heat transfer will
be solved in the fluid zone. Using copper properties,
only the heat transfer equation will be solved in the
solid zone.
Introduction
2016 ANSYS, Inc.

Material Properties

Cell Zone Conditions

e.g. To account for rotational motion, the impellers


are placed in a rotating domain. The impeller fluid
zones will use equations in the rotating frame of
reference. Everywhere else will use equations in the
stationary frame of reference.

Boundary Conditions

Mesh Interfaces

Summary

April 12, 2016

Setting Up Physics: Boundaries


Select Boundaries in the Zones group box
Filter by type (inlets, outlets, walls, ) or select all

Zones and zone types are initially defined


in the preprocessing phase
To change the boundary condition type for
a zone:
Select zone in the list in the Boundary Conditions task
page
Use "Type" menu to choose from a list of available
boundary types

Introduction
11

2016 ANSYS, Inc.

Material Properties

Cell Zone Conditions

Boundary Conditions

Mesh Interfaces

Summary

April 12, 2016

12

Defining Boundary Conditions


To define a problem that results in a unique solution, you must specify information
on the dependent (flow) variables at the domain boundaries
Specify fluxes of mass, momentum, energy, etc. into the domain

Poorly defined boundary conditions can have a significant impact on your solution
Defining boundary conditions involves:
Identifying types (e.g. inlets, walls, symmetry,)
Identifying location
Supplying required data depending on boundary type, location and physical models

Choice depends on:


Geometry
Availability of data at the boundary location
Numerical considerations
Introduction
2016 ANSYS, Inc.

Material Properties

Cell Zone Conditions

Boundary Conditions

Mesh Interfaces

Summary

April 12, 2016

Available Boundary Condition Types


External Boundaries
Any flow
Pressure Inlet
Pressure Outlet

Incompressible flow
Velocity Inlet
Outflow (not recommended)

Internal Boundaries

Fan
Interior
Porous Jump
Radiator
Wall

wall

orifice

outlet

Compressible flow
Mass Flow Inlet (can also use for incompressible)
Pressure Far Field
Other
Wall
Symmetry
Axis
Periodic

plate
plate-shadow

inlet

Special flow boundaries


Inlet / Outlet Vent
Intake / Exhaust Fan
Introduction
13

Material Properties

2016 ANSYS, Inc.

Cell Zone Conditions

Boundary Conditions

Mesh Interfaces

Summary

April 12, 2016

14

Demo
Instructor will demonstrate how to define materials, cell zone
conditions and boundary conditions

Introduction
2016 ANSYS, Inc.

Material Properties

Cell Zone Conditions

Boundary Conditions

Mesh Interfaces

Summary

April 12, 2016

General Guidelines for Boundaries in CFD


If possible, select inflow and outflow boundary locations and shapes such that flow
either goes in or out normal to the boundaries
Typically better convergence

Should not observe large gradients in direction normal to boundary


Indicates incorrect set-up
Move the boundary further upstream or downstream so it is located away from gradients

Minimize grid skewness near the boundary


Errors resulting from high skewness will propagate through the rest of the computational domain

Introduction
15

2016 ANSYS, Inc.

Material Properties

Cell Zone Conditions

Boundary Conditions

Mesh Interfaces

Summary

April 12, 2016

16

Symmetry Planes
Symmetry boundary conditions can be applied at symmetry planes
No inputs are required
Both the geometry and the flow field must be symmetric:
Zero normal velocity at symmetry plane
Zero normal gradients of all variables at symmetry plane
Must take care to correctly define symmetry boundary locations

Symmetry
Planes
Introduction
2016 ANSYS, Inc.

Material Properties

Cell Zone Conditions

Boundary Conditions

Mesh Interfaces

Summary

April 12, 2016

Specifying Well Posed Boundary Conditions


Consider the following case which contains separate air and fuel supply pipes
Air
Three possible approaches
in locating inlet boundaries:
1
1 Upstream of manifold

Can use uniform profiles since


natural profiles will develop in the
supply pipes
Requires more elements

2 Nozzle inlet plane

Requires accurate velocity profile


data for the air and fuel
3 Nozzle outlet plane

Requires accurate velocity profile


data and accurate profile data for
the mixture fractions of air and fuel
Introduction
17

2016 ANSYS, Inc.

Material Properties

Cell Zone Conditions

Nozzle

Manifold box
Fuel

Boundary Conditions

Mesh Interfaces

Summary

April 12, 2016

18

Specifying Well Posed Boundary Conditions


Boundaries near recirculation zones

Ideal Location: Apply an outlet downstream of the recirculation zone to allow


the flow to develop. This will make it easier to specify accurate boundary
conditions.
Pressure Outlet

Bad Location: Difficult to apply the correct backflow conditions for turbulence,
temperature, species, etc. if the pressure outlet is located here.
Pressure Outlet

Introduction

Material Properties

2016 ANSYS, Inc.

Cell Zone Conditions

Boundary Conditions

Mesh Interfaces

Summary

April 12, 2016

Specifying Well Posed Boundary Conditions


When there is 1 Inlet and 1 Outlet:

Most Robust: Velocity at inlet with static pressure at outlet (Velocity Inlet :: Pressure Outlet)
The inlet total pressure is an implicit result of the prediction

Robust: Mass flow rate at inlet with static pressure at outlet (Mass Flow Inlet :: Pressure Outlet)
The total pressure at the inlet will be adjusted to set the given mass flow

Sensitive to Initial Guess: Total pressure at inlet with static pressure at outlet
(Pressure Inlet :: Pressure Outlet)

The system mass flow is part of the solution

Very Unreliable:
Total pressure or mass flow rate at inlet with Outflow boundary at outlet
(Pressure Inlet :: Outflow or Mass Flow Inlet :: Outflow)

This combination should not be used, because the static pressure level is not fixed
Mass Flow Inlet :: Outflow combination is ok if the density is constant

Velocity at inlet and velocity at outlet system is numerically unstable


Introduction
19

Material Properties

2016 ANSYS, Inc.

Cell Zone Conditions

Boundary Conditions

Mesh Interfaces

Summary

April 12, 2016

20

Specifying Well Posed Boundary Conditions


External Flow

In general, if the object (building, wind turbine, automobile,...) has height H and width W, you
would want your domain to be at least more than : 5H high, 10W wide, with at least 2H
upstream of the building and 10 H downstream of the building
You would want to verify that there are no significant pressure gradients normal to any of the
boundaries of the computational domain. If there are, then it would be wise to enlarge the size
of your domain

W
Concentrate mesh in
regions of high gradients

5H

10W
Introduction

Material Properties

2016 ANSYS, Inc.

Cell Zone Conditions

Boundary Conditions

Mesh Interfaces

Summary

April 12, 2016

Mesh Interfaces
Across an interface between two cell zones, the nodes may or may not exactly align
If the nodes match perfectly, this is a Conformal mesh
If using SpaceClaim, set the Share Topology property to Share in Component Properties
If using DesignModeler, combining bodies into a single part will give a conformal mesh
If the nodes do not match up, this is a Non Conformal mesh
Fluent can interpolate across the interface, but this must be defined in the GUI
If not, Fluent will treat the interface as a wall, and no fluid can flow through

Conformal
Introduction
21

Material Properties

2016 ANSYS, Inc.

Non-Conformal

Cell Zone Conditions

Boundary Conditions

Mesh Interfaces

Summary

April 12, 2016

22

Uses of Mesh Interfaces


Non-conformal Interfaces can be used for:
Connection of mismatched meshes (hex to tet for example)
a single mesh file may contain non-matching mesh regions and require non-conformall interfaces

Changes in reference frames between cell zones


even if the mesh matches

Connect different types of cell zones together (e.g. Fluid and Solid)
Create periodic regions
region
nss within a domain
n
d

Introduction
2016 ANSYS, Inc.

Material Properties

Cell Zone Conditions

Boundary Conditions

Mesh Interfaces

Summary

April 12, 2016

Defining Mesh Interfaces


To create a non-conformal interface:
Step 1: Setting Up Physics: Boundaries
Change the type of each pair of zones that
comprises the non-conformal boundary to
interface
This step not necessary if zones have already been
named as interfaces in Meshing

Step 2: Setting Up Domain > Interfaces > Mesh


Enter a name for the interface in the Mesh
Interface text-entry box
Specify the zones comprising the interface by
selecting one or more zones below Interface Zone
1 and one or more below Interface Zone 2
If one interface zone is much smaller than the other,
specify the smaller zone as Interface Zone 1 to
improve the accuracy of the intersection calculation

Enable the desired interface options if


appropriate
Introduction
23

2016 ANSYS, Inc.

Material Properties

Cell Zone Conditions

Boundary Conditions

Mesh Interfaces

Summary

April 12, 2016

24

Periodic Boundary Condition


To create a Periodic boundary condition
Enable the Periodic Boundary Condition option in the Mesh interfaces panel
Select either Translational or Rotational as the periodic boundary condition Type
Retain the enabled default setting of Auto Compute Offset if you want ANSYS Fluent to automatically
compute the offset
Mesh can be conformal or non-conformal

Translational Periodicity
Simulates geometries that have translational periodicity
Allows for either the mass flow rate or the pressure change
across the interface to be specified
The quantity not specified will be part of the solution

Rotational Periodicity
Simulates rotationally periodic geometries
Before proceeding, you have to correctly enter the
rotational axis for the corresponding cell zone in the BC

panel

Introduction
2016 ANSYS, Inc.

Material Properties

Cell Zone Conditions

Boundary Conditions

Mesh Interfaces

Summary

April 12, 2016

Demo
Instructor will demonstrate mesh interfaces

Introduction
25

2016 ANSYS, Inc.

Material Properties

Cell Zone Conditions

Boundary Conditions

Mesh Interfaces

Summary

April 12, 2016

Summary
Cell zones are used to assign which fluid/solid material(s) exist in a region
Also have options for porous media, laminar region, fixed value, etc.

Fluent has an extensive, customizable database of material properties


Numerous models and options are available for definition of properties

Boundary zones are used to assign boundary conditions at external and internal
boundaries
Locations and types of boundary condition are extremely important for good
convergence and accurate results

Mesh interfaces can be defined to allow flow and energy to pass between zones
connected with non-conformal mesh
Introduction

2016 ANSYS, Inc.

27

2016 ANSYS, Inc.

26

Material Properties

Cell Zone Conditions

Boundary Conditions

Mesh Interfaces

Summary

April 12, 2016

Appendix

April 12, 2016

28

Options for Defining Common Properties


Density
Viscosity
Constant
Constant
Incompressible Ideal Gas
Temperature Dependent1
Sutherland
Ideal Gas
Power Law
Real Gas (5 Built-in Models)
Kinetic Theory
Temperature Dependent1
Boussinesq
Non-Newtonian (4 Built-in Models)
User-defined
User-defined
Thermal Conductivity
Specific Heat
Constant
Constant
Temperature Dependent1
Temperature Dependent1
Kinetic Theory
User-defined
User-defined
1 Temperature Dependent options include definition of properties as piecewise linear , polynomial or
piecewise polynomial functions temperature
2016 ANSYS, Inc.

April 12, 2016

Case Setup Replication


To replicate a case setup:
Open the actual case file and go to File/Read/Mesh
Choose the option : Replace Mesh

The text user interface (TUI) commands /file/write-settings and /file/readsettings can also be used for the same purpose. You can transfer settings from a 2D
case to a 3D case!
inlet-1

inlet-1
2D Flow Domain
(approximation)

Actual 3D Flow Domain

outlet-2

inlet-2

inlet-2
outlet-2

outlet-1
29

2016 ANSYS, Inc.

outlet-1

April 12, 2016

Cell Zone Definition Fluid


Fluid material selection is
required
For multiple species or multiphase
flows, the material is not shown
Instead, the fluid zone consists of the
mixture of the phases

Optional inputs

30

Frame/Mesh Motion
3D Fan Zone
Porous region
Source terms
Laminar region
Fixed Values

2016 ANSYS, Inc.

April 12, 2016

Cell Zones Definition Solid


A solid zone is a group of cells for which only the
heat conduction equation is solved. Flow
equations are not solved
The only required input is the Material Name (defined in the

Materials panel)
Optional inputs allow you to set
volumetric heat generation rate
(heat source)
Motion can be defined for a solid zone
However, this is uncommon
Rotation axis must be specified if the solid
zone is rotating or if rotationally periodic
boundaries are adjacent to the solid zone

31

2016 ANSYS, Inc.

April 12, 2016

Cell Zone Definition - Porous Media


A porous zone is a special type of fluid zone
Enable Porous Zone option in the Fluid panel
Pressure loss in flow determined via user inputs
of resistance coefficients to lumped parameter model

Used to model flow through porous


media and other uniformly distributed
flow resistances

Packed beds
Filter papers
Perforated plates
Flow distributors
Tube banks

Inputs are directional viscous and


inertial resistance coefficients

32

2016 ANSYS, Inc.

April 12, 2016

Porous Media
Porous media can be used to model some
flows where the geometry is too complex,
or has too many scales, to resolve with a
grid
Instead of including the geometric details,
their effects are accounted for numerically
through the use of loss coefficients

Images Courtesy of Babcock and Wilcox, USA


33

2016 ANSYS, Inc.

April 12, 2016

34

Porous Media Inputs


Fluid Porosity
The local ratio of the volume of fluid to the total physical volume

Superficial Velocity
By default ANSYS Fluent calculates the superficial velocity based on
volumetric flow rate
ANSYS Fluent allows the selection of the physical velocity using the
Porous Formulation
superficial

2016 ANSYS, Inc.

physical

April 12, 2016

Porous Media Loss Coefficients


Directional Losses
Different losses can be defined for the streamwise and
transverse directions
Honeycombs and Porous plates
For an isotropic porous medium such as a packed bed, the
same value can be applied in all three directions

Losses are applied using Darcys Law


Permeability and Loss Coefficients

 dp
dxi

P
K perm

U i  K loss

U
2

Ui

Viscous Resistance input is (1/Kperm) in the equation


The default value should generally not be used except for
reservoir modeling applications
Inertial Resistance input is Kloss in the equation
35

2016 ANSYS, Inc.

April 12, 2016

36

Profile Data and Solution Data Interpolation


Fluent allows interpolation of selected variable data
on both face zones and cell zones by using profile
files and data interpolation files, respectively.
For example, a velocity profile from experimental data or
previous Fluent run at an inlet, or a solution interpolated from a
coarse mesh to fine mesh.

Profile files are data files which contain point data


for selected variables on particular face zones, and
can be both written and read in a Fluent session.
File > Write > Profile
File > Read > Profile

Similarly, interpolation files contain discrete data


for selected field variables on particular cell zones
to be written and read into Fluent.
File > Interpolate
2016 ANSYS, Inc.

April 12, 2016

Profile Boundary Conditions

Select the arrow and scroll down in the drop-down list until the desired profile is reached (right figure)

After reading the profile, open the panel for the boundary where it is to be applied

Select Profiles in the Boundary Conditions panel (left figure)

The first three items in the list will usually be the the coordinates of the profile variables do not select these

Profiles can be created from experimental data by creating an appropriately formatted file
The file format details are in the Users Guide

37

2016 ANSYS, Inc.

April 12, 2016

38

Velocity Inlet
Velocity Specification Method
Magnitude, Normal to Boundary
Components
Magnitude and Direction
Turbulence quantities (if applicable)
Covered in Day 2
Thermal conditions (if applicable)
Covered in Day 2
Applies a uniform velocity profile at the boundary unless UDF
or profile is used
Velocity Magnitude input can be negative, implying that

you can prescribe the exit velocity

Velocity inlets are intended for use in


incompressible flows and are not recommended
for compressible flows

2016 ANSYS, Inc.

April 12, 2016

Pressure Inlet
Required inputs

Gauge Total Pressure


Supersonic / Initial Gauge Pressure
Inlet flow direction
Turbulence quantities (if applicable)
Total temperature (if heat transfer and/or compressible)

Pressure inlet boundary is treated as a loss-free


transition from stagnation to inlet conditions
Fluent calculates the static pressure and velocity at
the inlet and the mass flux through the boundary
varies depending on the interior solution and
specified flow direction

Incompressible:
Compressible:

Pressure inlets are suitable for both


compressible and incompressible flows

39

2016 ANSYS, Inc.

April 12, 2016

40

Buoyancy
Operating Density
The Operating Density is used to avoid round-off errors by solving at an
offset level
Similar to the use of the Operating Pressure to offset the operating
pressure of the domain, the Operating Density is used to offset the
hydrostatic pressure in the domain
The pressure solution is relative to Uop g h, where h is relative to the
Reference Location
If Uop = the fluid density (U), then the pressure field in the solution is
relative to the hydrostatic pressure, so when visualizing Pressure you
only see the pressure that is driving the flow
For a non-buoyant flow the numerical solution ignores the hydrostatic
pressure as it has no effect on fluid motion
However, if necessary, hydrostatic pressure can be accounted for in
Fluent for gravity driven flow of a constant density fluid

2016 ANSYS, Inc.

April 12, 2016

Pressure and Buoyancy Example


Consider the case of flow through a tank

30 psi

The inlet is at 30 [psi] absolute


Buoyancy is included, therefore a hydrostatic pressure gradient exists
The outlet pressure will be approximately
30 [psi] plus the hydrostatic pressure given by Ug h
The flow field is driven by small dynamic pressure changes
NOT by the large hydrostatic pressure

Small pressure changes


drive the flow field in
the tank

To accurately resolve the small dynamic pressure


changes, we use the Operating Pressure and the
Operating Density to offset the hydrostatic pressure

~30 psi + Ugh

Details presented in Lecture 8: Heat Transfer

41

2016 ANSYS, Inc.

Gravity, g

April 12, 2016

42

Mass Flow Inlet


Required inputs
Mass Flow Rate or Mass Flux
Supersonic/Initial Gauge Pressure
Static pressure where flow is
locally supersonic; ignored if subsonic
Will be used if flow field is initialized from this boundary
Total Temperature (on Thermal tab)
Used as static temperature for incompressible flow
Direction Specification Method
Total pressure adjusts to accommodate mass flow inputs
More difficult to converge than Pressure Inlet

Mass flow inlets are intended for compressible


flows; however, they can be used for
incompressible flows
2016 ANSYS, Inc.

April 12, 2016

Pressure Outlet
Required inputs
Gauge Pressure (static) static pressure of the environment into

which the flow exits

Specified pressure is ignored if flow is locally supersonic at the

outlet

Backflow quantities Used as inlet


conditions if/when backflow occurs
(outlet acts like an inlet)
Can be used as a free boundary in an external or unconfined

flow

Target Mass Flow Rate Option can be applied


Not available for multiphase problems

Suitable for compressible and incompressible


flows
Non-reflecting outlet boundary conditions (NRBC) are available for ideal
gas (compressible) flow

43

2016 ANSYS, Inc.

April 12, 2016

Outflow
No pressure or velocity information is required
Data at exit plane is extrapolated from interior
Mass balance correction is applied at boundary
Flow exiting outflow boundary exhibits zero normal diffusive flux for all

flow variables

Appropriate where the exit flow is fully developed

Limitations :
Cannot be used with a pressure inlet boundary
must use velocity-inlet
Combination does not uniquely set pressure gradient over whole domain
Cannot be used for unsteady flows with variable density

The outflow boundary is intended for use with


incompressible flows

Poor rate of convergence when backflow occurs during


iterations
Cannot be used if backflow is expected in the final solution

44

2016 ANSYS, Inc.

April 12, 2016

Wall Boundaries
In viscous flows, no-slip conditions are applied
at walls
Shear stress can be applied
Wall roughness can be defined for turbulent flows
Modification of the Logarithmic Standard Wall Function

Wall thermal boundary conditions described in


Lecture 08 "Heat Transfer"

45

2016 ANSYS, Inc.

April 12, 2016

46

Axis Boundaries
An axis boundary is used at the center line for 2d axi-symmetric problems
Does not apply in 3d cases

No user inputs required


Fluent requires any axis boundary to be located at y=0
Solution will diverge immediately if this condition is not satisfied
If necessary, use Grid > Translate to reposition the mesh so the axis is at y=0

Axis

2016 ANSYS, Inc.

April 12, 2016

Other Inlet / Outlet Boundary Conditions


Pressure Far Field
Used to model free-stream compressible flow at infinity, with prescribed static conditions and the free-stream
Mach number
Available only when density is calculated using the ideal gas law

Exhaust Fan / Outlet Vent


Models an external exhaust fan or outlet vent with specified pressure rise/loss coefficient and ambient discharge
pressure and temperature

Inlet Vent / Intake Fan


Models an inlet vent / external intake fan with specified loss coefficient / pressure rise, flow direction and ambient
inlet pressure and temperature

47

2016 ANSYS, Inc.

April 12, 2016

48

Modeling Multiple Exits


Flows with multiple exits can be modeled using pressure outlet or
outflow boundaries, depending on the information you know
Pressure outlets: requires knowledge of downstream pressures; Fluent calculates the fraction of
total flow through each branch

Velocity inlet (V, T0)


OR
Pressure inlet (p0, T0)
Outflow:
Mass flow rate fraction determined from Flow Rate Weighting (FRW, varies from 0 to 1) by

Pressure outlet

Pressure outlet

Static pressure varies among exits to accommodate the prescribed flow distribution

Outflow (FRW1)
Velocity inlet (V, T0)
2016 ANSYS, Inc.

Outflow (FRW2)

April 12, 2016

Periodic Boundaries
Used to reduce the overall mesh size
Flow field and geometry must contain
either rotational or translational periodicity
Rotational periodicity
P = 0 across periodic planes.
Axis of rotation must be defined in fluid zone
Translational periodicity
P can be finite across periodic planes
Models fully developed conditions
Specify either mean P per period
Flow
or net mass flow rate

Periodic boundaries can be either


conformal or non-conformal
See next two slides

Rotationally periodic planes

Translationally
periodic planes
2D Tube Heat Exchanger

49

2016 ANSYS, Inc.

April 12, 2016

50

Non-conformal Periodic Boundary Conditions


Fluent permits the use of nonconformal rotationally periodic BCs
Non-conformal periodics do not
require a matching mesh on the
boundaries
Coupling of the periodic zones is accomplished
using the same algorithms employed in nonconformal interfaces

Non-conformal periodic can now be


created in the Create/Edit Mesh
Interfaces GUI!
Select Periodic Boundary Condition option and
choose the Type (Translational or Rotational)
Offset is computed automatically, but check this
value to make sure it is evenly divisible into 360
deg!
2016 ANSYS, Inc.

April 12, 2016

Conformal Periodic Boundary Conditions


Conformal periodic BCs in Fluent require that the
boundary face mesh elements match one-for-one
on the periodic boundary
Rotationally periodic BCs rely on the rotational
axis specification to transfer information correctly
Rotationally periodic boundaries can be used in
moving reference frame problems to reduce mesh
size provided both the geometry and flow are
periodic
Notes:
If you are using the make-periodic command
in the TUI, make sure you set the rotational axis
in the Fluid BC panel first before creating the
periodic BCs
Once the periodic BCs have been set, perform a
mesh check to see if the reported periodic angles
are correct
51

2016 ANSYS, Inc.

April 12, 2016

52

Internal Face Boundaries


Defined on the cell faces only:
Thickness of these internal faces is zero
These internal faces provide means of introducing step changes in flow properties

Used to implement various physical models including:


Fans
Radiators
Porous-jump models
Preferable over porous media for its better convergence behavior
Interior walls

2016 ANSYS, Inc.

April 12, 2016

Specifying Well Posed Boundary Conditions


Turbulence at an Inlet:
If you have no idea, use the default settings:
Turbulent Intensity = 5%
Turbulent Viscosity Ratio = 10
Typically, turbulence intensities range from 1% to 5% but will depend on your specific application. The values given
above are sufficient for nominal turbulence through a circular inlet, and are good estimates in the absence of
experimental data
For situations where turbulence is generated by wall friction, consider extending the domain upstream to allow the
walls to generate turbulence and the flow profiles to become developed

Addressed in Module 7: Turbulence

53

2016 ANSYS, Inc.

April 12, 2016

2016 ANSYS, Inc.

17.0 Release

Module 04: Postprocessing


Introduction to ANSYS Fluent

April 12, 2016

Introduction
Lecture Theme:
The purpose of CFD analysis is to obtain quantitative and/or qualitative information
about fluid flow performance of the system. This lecture will explain how to do this
both in CFD-Post and within Fluent.
Learning Aims:
You will learn:
How to perform flow field visualization and quantitative data analysis on your CFD
results
How to do this in Fluent and in CFD-Post
Learning Objectives:
You will know what post-processing options are available and how to perform the
post-processing work that your CFD simulations require
Introduction
2

2016 ANSYS, Inc.

Overview

Fluent

CFD-Post

Summary

April 12, 2016

Overview
There are two ways to post-process CFD results from Fluent
Fluent post-processing tools tools integrated in the Fluent solver
ANSYS CFD-Post application
A state-of-the-art post-processor for ANSYS CFD products.
CFD-Post can run as a standalone post-processor, or within Workbench

Both post-processors include many tools for analyzing CFD results


Isosurfaces
Vector plots
Contour plots (shaded and graded)
Streamlines and pathlines
XY plotting
Animation creation
Introduction
2016 ANSYS, Inc.

Overview

Fluent

CFD-Post

Summary

April 12, 2016

ANSYS Fluent Workflow


Ribbon Guides Basic Workflow

Setting Up Domain

Setting Up Physics

Read and check mesh


Check mesh quality
Define mesh interfaces (if
needed)
See Module 3
Convert mesh to
polyhedra (optional, if
needed)
Transform mesh
(optional, if needed)
Scale, translate, rotate
Set units
Introduction
4

2016 ANSYS, Inc.

Solver
Setup basic options
Models
Setup Energy, Viscous
(turbulence),
Multiphase,
Materials
Create/Edit materials
and their properties
Zones
Cell zone and boundary
conditions

Overview

Fluent

Solving
Choose solution methods
and controls
Define reports for
convergence checking
Initialization
Run calculation

CFD-Post

Postprocessing
Graphics and Plots
Visualize solution data
Reports
Quantitative solution
analysis

Summary

April 12, 2016

Introduction
2016 ANSYS, Inc.

Part 1: Post-Processing in Fluent

Overview

Fluent

CFD-Post

Summary

April 12, 2016

Postprocessing in Fluent
The tools built into Fluent have
the advantage of letting you
quickly review your simulation.
Since all the data is still in
memory for the solver, you can
readily stop your simulation,
interrogate the results, and
then modify / continue with
the calculations without
waiting for the file write / read
needed to use another
application

Introduction
6

2016 ANSYS, Inc.

Overview

Fluent

CFD-Post

Summary

April 12, 2016

Postprocessing in Fluent
The results can be reported / plotted either on existing surfaces present in the model, or
on new surfaces.
Commonly used options are:

A planar or cylindrical surface cutting through


the model (use Iso-Surface, based on constant
mesh value, of x-coordinate, or radial coordinate)
An Iso-surface to create a 3D surface showing where
a given value exists (temperature, concentration)

A Line surface (used for XY plots)


A Point surface (used as a sampling probe to
show values at a particular point)
Introduction
2016 ANSYS, Inc.

Overview

Fluent

CFD-Post

Summary

April 12, 2016

Postprocessing Rendering Options


The rendering options in Fluent allow control of
the look-and-feel of the post-processing plots,
including:

Views and display options


Colormaps for contour/vector plots
Shading on surfaces using lights
Annotation of plots
Surface manipulation
Scene composition using plot
overlays, different colors,
shading, transparency

Scene animation (fly-throughs)

Introduction
8

2016 ANSYS, Inc.

Overview

Example of scene composition:


Overlay of contour and vector plot
with transparent walls to show
internal details.
Fluent

CFD-Post

Summary

April 12, 2016

Transient Animations
Fluent can create animations of transient solutions
in 2 ways
Create an Animation Sequence
Save static images through out simulation
Use external software to create animation from image files

Both the above approaches require the animation to


be set up before calculating the solution
All display options such as contour ranges and views
have to be correct before starting the run

If a mistake is made, the solution needs to be re-run


Introduction
2016 ANSYS, Inc.

Overview

Fluent

CFD-Post

Summary

April 12, 2016

Plots
Fluent provides tools to generate data plots of the solution:

XY plots of solution variables


Histograms to illustrate frequency of distribution
Fast Fourier Transforms (FFT)

Other data files (experimental, computational) can also be read in to compare results

Introduction
10

2016 ANSYS, Inc.

Overview

Fluent

CFD-Post

Summary

April 12, 2016

11

Reports
The tools in Fluent can also provide numerical
data for analysis. For example:
Flux Reports - these show the total mass or
energy flow through a boundary (a useful
assessment of convergence)
Surface Integrals these can show the total,
average or max/min values of any quantity
on any surface

Volume Integrals show the sum, max/min


or average values in a cell zone

Introduction
2016 ANSYS, Inc.

Overview

Fluent

CFD-Post

Summary

April 12, 2016

Part 2: Post-Processing in CFD-Post

Introduction
12

2016 ANSYS, Inc.

Overview

Fluent

CFD-Post

Summary

April 12, 2016

13

Starting CFD-Post
Within ANSYS Workbench:
If a Fluent Analysis System was used,
double click in the Results cell in the
Project Schematic after the solution has
been calculated
If a Fluent Component System was used,
Drag the CFD-Post icon (Results) in the
Component Systems list to the project
schematic.
Outside of Workbench:
Start > Programs >
ANSYS XX.X > Fluid Dynamics >
CFD-Post
XX.X = current version number, e.g. 15.0, 16.0, 17.0,
Introduction
2016 ANSYS, Inc.

Overview

Fluent

CFD-Post

Summary

April 12, 2016

Viewer Right-click Menus


Right-clicking in the Viewer provides a
context-sensitive menu
Right-clicking on an object (e.g.
Wireframe, Plane) shows options for
that object
Can also insert new objects based on
the current location (such as a vector
plot on a plane, contour plot on a
surface, etc.)
Right-clicking in empty space shows
options for the current View
Click on the axes to orient the view
Introduction
14

2016 ANSYS, Inc.

Overview

Fluent

CFD-Post

Summary

April 12, 2016

15

3D Viewer Files
Save Picture in the CFX Viewer
State (3D) file format (.cvf file)
Can then use the stand-alone
Viewer to view the file, rotate,
pan, zoom, etc
Unlicensed and free to distribute to
your customers
Can embed 3D Viewer files in
PowerPoints and HTML files
Download from the ANSYS Website
(search for CFD Viewer)

Type ? in viewer to
see all hotkeys

3D FSI Results (Courtesy of CADFEM Gmbh)


Introduction
2016 ANSYS, Inc.

Overview

Fluent

CFD-Post

Summary

April 12, 2016

CFD-Post General Workflow


1. Prepare Locations where data will be
extracted from or plots generated
2. Create variables/expressions which will
be used to extract data (if necessary)
3. Generate data at Locations
i. Qualitative data
ii. Quantitative data
4. Generate Reports
Introduction
16

2016 ANSYS, Inc.

Overview

Fluent

CFD-Post

Summary

April 12, 2016

17

Creating Locations
Locations are created from the Insert menu or from
the toolbar
Many different types available (list appears in figure) and details
of each type in the appendix

Once created, all Locations appear as entries in the


Outline tree
Use the check boxes next to each object in
the Outline tree to quickly control visibility
Double-click objects in the Outline tree to
edit
Right-click objects in the Outline tree to
Duplicate or Delete
Introduction
2016 ANSYS, Inc.

Overview

Fluent

CFD-Post

Summary

April 12, 2016

Other Graphics Objects


Vector Plot
Can plot any vector variable; usually
velocity
Streamlines
Can proceed forwards and/or backwards
from a seeding location
Vectors, streamlines and contours can use any
existing object as a base
Volume Rendering
Shades every grid cell with an opacity based
on the magnitude of a variable
So for example, opacity could be based on
smoke concentration. The result will give
an idea of visibility though the smoke.
Introduction
18

2016 ANSYS, Inc.

Overview

Fluent

CFD-Post

Summary

April 12, 2016

19

Variables Tab: User Defined Variables


User defined variables can be used to form new variables
which are functions of the basic solver variables such as
pressure, temperature, velocity, mass flow rate, wall shear, ...
Create new variables by Right-click > New in the top half of
the Variables tab
There are 3 methods for User Defined variables:
The Expression method defines a variable via an expression, which can be a
function of any other variable
Usually create the expression first on the
Expressions tab (Example in Appendix)
Frozen Copy has been superseded by Case Comparison
The Gradient method calculates the gradient of any existing scalar variable
Produces a new vector variable
Introduction
2016 ANSYS, Inc.

Overview

Fluent

CFD-Post

Summary

April 12, 2016

Tables
Select Insert > Table or use the
toolbar icon to create a new table

1. Create Table

3D Viewer will switch over to the Table Viewer

Tables allow you to display data and


expressions in a tabular view
Tables are automatically added to the
Report

2. Create Text Cells

Cells can contain expressions or text

3. Create Expression Cells

Begin with = to distinguish


Expressions are evaluated and updated when
variables and/or locations they depend on change

4. Use drop-down menus to


assist expression creation

This is not a spreadsheet


Cannot reference other cells
Introduction
20

2016 ANSYS, Inc.

Overview

Fluent

CFD-Post

Summary

April 12, 2016

21

Charts
1. Create Lines
2. Create Chart

3. Select Chart Type

4. Create Data Series


(Lines)

5. Select X and Y
Axis variables

Introduction
2016 ANSYS, Inc.

Overview

Fluent

CFD-Post

Summary

April 12, 2016

Reports
CFD-Post has report generation tools which allow for
rapid creation of customized reports
To view the report, click the Report Viewer tab
Use the check boxes to control what is included in the report

Reports are template based


Publish writes out an HTML or Text copy of the report

Introduction
22

2016 ANSYS, Inc.

Overview

Fluent

CFD-Post

Summary

April 12, 2016

23

Case Comparison
CFD-Post allows multiple cases to
be loaded simultaneously
When multiple files are loaded
you can select Case Comparison
from the Outline tree
Automatically generates contour plots of
the difference between the two cases for
any variable
The displayed views can be synchronized
between the two cases

SST

k-H

Expression syntax for Case Comparison:


function()@CASE:#.Location
E.g: areaAve(Pressure)@CASE:1.Inlet
See Appendix for details of
Expression usage
Introduction
2016 ANSYS, Inc.

Overview

Fluent

Difference Plot
CFD-Post

Summary

April 12, 2016

State File
CFD-Post State File (.cst) stores post-processing operations

Locations
Plots
Tables
Charts
Views
Report Format
..

Reading a state file into CFD-Post automates this post-processing


Workbench automatically saves and loads the state file

Manual saving and loading needed in standalone mode


Automated standard post-processing can be used for common applications
Introduction
24

2016 ANSYS, Inc.

Overview

Fluent

CFD-Post

Summary

April 12, 2016

25

Transient Data and Animations


To create animations:
Load a transient data set
Collection of data files saved at regular intervals
in a transient simulation
Either regular .dat files from autosaving or .cdat
files from automatic export
.cdat files allow choice of what variables to
saved, reducing i/o time and file size

Create objects such as vectors or contours


Select the Timestep icon in the toolbar
In Timestep Selector, select the Animation icon
Opens the Animation panel
Click the play button
All visible objects will be animated
Introduction
2016 ANSYS, Inc.

Overview

Fluent

CFD-Post

Summary

April 12, 2016

Summary and Conclusions


Summary:
Post-processing can be performed using either Fluent or CFD-Post
Many basic operations such as contour plots, vector plots and streamlines can be
performed in both
Fluent may be more convenient when only basic operations are required because
the post-processing is performed in the solver not necessary to write files and
start a separate program
CFD-Post contains many powerful, sophisticated post-processing capabilities
including 3D-viewer files, user variables, automatic html report generation and case
comparison
What Next:
Post-processing is best learned in a hands-on manner. Details of the operations
described in the lecture will be covered during the completion of Workshop 3
Introduction
26

2016 ANSYS, Inc.

Overview

Fluent

CFD-Post

Summary

April 12, 2016

27

2016 ANSYS, Inc.

Appendix

April 12, 2016

Mouse Functionality
Mouse button functionality depends on the chosen solver (2D / 3D) and
can be configured in the solver.

Default settings

Display

Mouse Buttons

2D Solver
Left button translates/pans (dolly)
Middle button zooms
Right button selects/probes
3D Solver
Left button rotates about 2 axes
Middle button zooms
Middle click on point in screen centers point
in window
Right button selects/probes

Retrieve detailed flow field information at point with Probe enabled.


Right-click on the graphics display.

User can choose between classic Fluent settings, or for mouse


behavior consistent with Workbench.

28

2016 ANSYS, Inc.

April 12, 2016

29

Post-Processing in Fluent: Node Values


Fluent calculates field variable data at
cell centers

Node values are either:

calculated as the average of neighboring cell data


away from boundaries

defined explicitly on boundaries with boundary


condition data (when available)

Node values on surfaces are interpolated


from grid node data
Data files store:

data at cell centers


node value data for primitive variables at boundary
nodes

Enable Node Values to interpolate field


data to nodes
2016 ANSYS, Inc.

April 12, 2016

Custom Field Functions in Fluent


In addition to the basic field
variables provided by Fluent, it is
possible to define custom field
functions for use with the postprocessing tools

In the menu bar Define > Custom Field Functions,


to open the Custom Field Function Calculator
panel

Use the menus and calculator


buttons to form expressions from
the basic field variables
Custom Field Function variables
will appear in post-processing
menus
Custom field function definitions
are saved in the case file and can
be transferred to other case files
30

2016 ANSYS, Inc.

April 12, 2016

31

Limitations of CFD-Post
Polyhedral mesh case

All mesh types supported

Polyhedral, non-conformal, adapted, ...


2D Fluent meshes are extruded to thin 3D domains
2D axisymmetric meshes are converted to 3D wedges
Some data may not be in the standard .dat file

Export through the Data File Quantities or the Export to


CFD-Post panels

Note that for particle tracks this must be done (example in


DPM Workshop)
2D to Thin 3D

Model set-up information is not available in CFD-Post


CFD-Post is serial, not parallel

2016 ANSYS, Inc.

April 12, 2016

Other Graphics Objects


Insert from the toolbar or the Viewer right-click menus

Vector Contour Streamline Particle Track

Vectors, Contour and Streamlines use existing Locations


as a base
Vector Plot

Can plot any vector variable


usually velocity

Can project vectors Normal or Tangential to the base object


Streamlines

Can proceed forwards and/or backwards from a seeding


location

Use the Surface Streamline option to visualise velocity on


walls

32

2016 ANSYS, Inc.

April 12, 2016

Other Graphics Objects


Text: add your own labels to the Viewer

Auto-text allows you to show time step/values, expressions,


filenames and dates that change automatically

Text

Coord Frame

Coord
Frame

Legend

Instance
Transform

Clip
Plane

Color
Map

Insert a new local coordinate frame, useful for generating


plots relative to features in the model

Legend

Create additional legends that are tied to a specific plot (the


default legend changes automatically with the active plot)

Instance Transform

Create patterns and duplicates of the geometry

Usually used to re-create full plots from symmetric/periodic


solution data

33

2016 ANSYS, Inc.

April 12, 2016

Creating Locations
Domain, Subdomain, Boundary and Mesh Regions are
always available

Boundary and Mesh Regions can be edited and coloured by


any variable
Mesh Regions provide all available interior/exterior 2D/3D
regions from the mesh
All Locations you create are listed under User Locations
and Plots
All items contained in the Report are listed here
34

2016 ANSYS, Inc.

April 12, 2016

Location Types
Planes

XY Plane, Point and Normal, etc.


Can define a circle or rectangle to bound the plane, otherwise its
bounded only by the solution domain(s)

Point

XYZ: At coordinates. Can pick from Viewer


Node Number: Some solver error messages give a node number
Variable Max / Min: Useful to locate where max / min values occur
Point Cloud

Create multiple points


Usually used as seeds to streamlines, vectors
35

2016 ANSYS, Inc.

April 12, 2016

Location Types
Lines

Straight line between two points


Usually used as the basis for an XY Chart
Polylines

Also used for Charts


Read points from a file
Use the line of intersection
between a boundary and
another Location
Extract a line from a
contour plot

36

2016 ANSYS, Inc.

April 12, 2016

Location Types
Isosurfaces

Surface of a variable at a specified value


Isosurface of pressure
behind a flap valve

Iso Clip

An Iso Clip takes a copy of any existing Location and then


clips it using one or more criteria
E.g. the velocity contour plot on the outlet boundary is then
clipped by Velocity >= 10 [m/s] and Velocity <= 20 [m/s]

Can clip using any variable, including geometric variables

37

2016 ANSYS, Inc.

April 12, 2016

Location Types
Volumes

Mesh elements are either in or out of the volume


Volumes will not be displayed as perfect shapes (for
example a perfect sphere) because the volume cannot cut
through mesh elements

From Surface Location


A volume is formed from all elements touching (or above /
below) the selected Location
Can be useful for mesh checking

Isovolume
Base on a variable at, above or below a given value, or
between two values

38

2016 ANSYS, Inc.

April 12, 2016

Location Types
Vortex Core Region

Used to automatically identify vortex regions


Best method is case dependent
See documentation for details on the different
methods
Surface of Revolution

Predefined options for Cylinder, Cone, Disc and


Sphere
From Line is much more general
Any line (existing Line, Polyline, Streamline, Particle
Track) is rotated about an axis

39

2016 ANSYS, Inc.

April 12, 2016

Location Types
User Surface

Provides a number of additional surface creation options including:


From File: reads point data from a text file; usually export this file from a
different case
From Contour: extract a contour level
Transformed Surface: rotate, translate or scale an existing surface
Offset From Surface: offset an existing surface in either the Normal direction
or by Translating
User Surface: From Contour
Method
(Note: Its generally easier to
use Iso Clips instead)

40

2016 ANSYS, Inc.

April 12, 2016

Color, Render and View

41

All Locations have similar Color, Render


and View settings
Color
Select the variable with which to color the Location
Set the Range (Global, Local, User Specified)
Pick a Color Map
Render
Draw Faces: shows solid surface
Draw Lines: shows mesh edges or intersecting lines between mesh
edges and the plot
Transparency, Lighting, Texture
View
Apply Rotation, Translations, Reflection, Scaling
Pick a different Instance Transform
2016 ANSYS, Inc.

April 12, 2016

User Defined Variables Example


Goal: Plot an isosurface at VelRatio = 0.7
where

VelRatio

Vel local
Vel
VelRatio

42

0.7

On the Variables tab create a new variable


named VelRatio using Method = Expression

2.

On the Expressions tab create the expression for Velocity Ratio:

1.

2016 ANSYS, Inc.

April 12, 2016

43

User Defined Variables Example


3.

Create an Isosurface using the variable VelRatio at a value of 0.7

VelRatio

2016 ANSYS, Inc.

0.7

April 12, 2016

CEL
CEL - CFX Expression Language

Allows the user to create equations (can be functions of solution/system variables) that can
be used in CFX-Pre and CFD-Post
Expressions can be:

- algebraic
Velocity u * X
tan(X/Z)
log(T/T0)
- or integral
massFlowAve(Total Pressure)@inlet
massFlow()@inlet
44

2016 ANSYS, Inc.

April 12, 2016

45

CEL Rules
The syntax rules are the same as those for conventional arithmetic
Operators are written as:
+ (addition) - (subtraction) * (multiplication)
/ (division) ^ (exponentiation)

Variables and expressions are case sensitive (example: t vs. T)


Mixed units are allowed in expressions as long as the dimension makes sense

Cannot add 1.0 [mm] + 3.6 [kg] in an Expression

Expressions must be dimensionally consistent for addition and subtraction operations


(example: 1.0 [mm] + 0.45 [yds] is OK)

You cannot add values with inconsistent dimensions


2016 ANSYS, Inc.

April 12, 2016

CEL Rules
Fractional and decimal powers are allowed (example: a^(1/2) + 1.0^0.5)

Units of expressions are not declared they are the result of units in the expression
(example: a [kg m^-3] * b [m s^-1] has units of [kg m^-2 s^-1]

Some constants are also available in CEL for use in expressions:

46

e
g
pi
R

Constant: 2.7182818
Acceleration due to gravity: 9.806 [m s^-2]
Constant: 3.1415927
Universal Gas Constant: 8314.5 [m^2 s^-2 K^-1]

2016 ANSYS, Inc.

April 12, 2016

47

Built In Functions
Numerical functions and operators are also available in CEL

Right-click when creating expressions for a complete list


Custom functions with User Fortran can also be created
Function
sin(x)
cos(x)
tan(x) ***
asin(x)
acos(x)
atan(x)
exp(x)
loge(x)
log10(x)
abs(x)
sqrt(x)
if(test, res1, res2)*
min(x,y) ****
max(x,y) ****
step(x) **

Operands Dimensions [x]


Angle
Angle
Angle
Dimensionless
Dimensionless
Dimensionless
Dimensionless
Dimensionless
Dimensionless
Any
Any
Any
Any
Any
Dimensionless

Operands Values
Any
Any
Any

-1 dx d1
-1 dx d1

Any

Results Dimensions
Dimensionless
Dimensionless
Dimensionless
Angle
Angle
Angle

Any
0<x
0<x
Any
0 dx

Dimensionless
Dimensionless
Dimensionless
[x]
[x]^0.5

Any
Any
Any

Any (res1 and res2 must have the same dimensions)


[x]
[x]

Any

Dimensionless

*if functions contain a test, and two result outcomes. The first outcome, res1 will be returned if test evaluates to true. If test evaluates to false, res2 is returned. Consider the following
example, where we wish to set volume fraction to 1 when X is greater than 1 [m], and 0 if X is less than 1 [m]:
if (x>1[m], 1, 0)
In this case, if the result is precisely equal to 1[m], the result is (res1+res2)/2
**step(x) is 0 for negative x, 1 for positive x and 0.5 for x=0.
*** note that tan(x) is undefined for nS/2 where n=1, 3, 5 .. .
**** both x and y must have the same dimensions.
2016 ANSYS, Inc.

April 12, 2016

Solver Variables
Solver variables are available for use in any expression

Below is a partial list of the available system variables:

When creating expressions, right-click to access a full list


x
y
z
r
theta
t
u
v
w
p
ke
ed
T
sstrnr
density
rNoDim
viscosity
Cp
cond
AV name
mf
48

2016 ANSYS, Inc.

Direction 1 in Reference Coordinate Frame


Direction 2 in Reference Coordinate Frame
Direction 3 in Reference Coordinate Frame
Radial spatial location, r = (x^2+y^2)^0.5
Angle, arctan(y/x)
Time
Velocity in the x coordinate direction
Velocity in the y coordinate direction
Velocity in the z coordinate direction
(absolute) Pressure
Turbulent kinetic energy
Turbulent eddy dissipation
Temperature
Shear strain rate
Density
Non-dimensional radius (rotating frame only)
Dynamic Viscosity
Specific Heat Capacity at Constant Pressure
Thermal Conductivity
Additional Variable name
Mass Fraction

Depending on your physics, some


variables will not be valid e.g. you
need to solve heat transfer to use T

April 12, 2016

49

Variables Tab
The Variables Tab shows information about all available variables

Derived variables

Calculated by CFD-Post they are not contained in the results file


Geometric variables

X, Y, Z, Normals , mesh quality data


Solution variables

From the results file


User Defined variables

Create new derived variables


Turbo variables

Additional variables automatically created for turbomachinery cases


2016 ANSYS, Inc.

April 12, 2016

Variables Tab
The Details pane shows information for the selected variable

Different options for User Defined variables

You can replace any variable with an expression

New values are stored in the results file, so you can close CFD-Post
and the data is retained

Old values can be restored at any time


Example: modifying results for an initial guess
Switch between Hybrid and Conservative variable definitions

Only applicable to CFX results


By default CFD-Post uses Conservative values for all calculations
and Hybrid values for all graphics; more details next

Can also switch between Hybrid and Conservative on the Colour


tab for each plot
50

2016 ANSYS, Inc.

April 12, 2016

51

Hybrid vs. Conservative


The finite volumes used by the CFX-Solver are constructed
from the mesh, but are not equal to the mesh elements

Mesh nodes lie at the centre of control volumes

Values are stored in the results file at nodes and represent


average control volume values
Next to wall boundaries you have a half control volume with
some representative non-zero velocity

This non-zero velocity is stored at the wall node


But we know that the velocity on a wall is zero

Conservative values = control volume values


Hybrid values = specified boundary condition values
2016 ANSYS, Inc.

= Wall
= Mesh Element

= Control Volume Boundary


= Half Control Volume
Adjacent To Wall
= Velocity Profile

April 12, 2016

Hybrid vs. Conservative

Hybrid

For visualization purposes, ANSYS CFD-Post uses hybrid values


by default, because you usually dont want to see non-zero
wall velocities
For calculation purposes conservative values are used by
default

This is good! For example mass flow is calculated correctly a velocity


of zero would produce zero mass flow through the wall adjacent
control volume which is clearly wrong

Conservative

So in most cases you dont need to worry about Hybrid vs


Conservative since CFD-Post does the right thing

User Defined variables will be derived from conservative values by


default

Take care when interpreting plots! The range will be different for
hybrid and conservative values
52

2016 ANSYS, Inc.

April 12, 2016

Expressions Tab

The Expressions tab shows all existing expressions and allows you to
create new expressions

Right-click in the top area > New

Enter the new expressions on the Definition tab in the Details view

Right-click to view Functions, Variables etc. that can be used to build your
expression

Use the Plot tab to view an XY plot of the expression

Must enter a range for one of the variables and fixed values for the others

53

2016 ANSYS, Inc.

April 12, 2016

Calculators Tab
Function Calculator

Extract engineering data from the results


Many functions, see doc to understand how they operate
Same function used as when creating expressions
Macro Calculator

Run predefined Macros


Write your own Macros and have them appear here
More in Scripting lecture
Mesh Calculator

Mesh quality metrics and stats


Field variables exist for all the metric and can be plotted
54

2016 ANSYS, Inc.

April 12, 2016

55

Turbo Post-Processing
The Turbo tab contains tools for post-processing turbomachinery cases.

Specialized turbo charts are


generated automatically
2016 ANSYS, Inc.

Blade loading chart

April 12, 2016

Charts: Type
Charts can be one of three types:

XY
Standard XY plots based on line locators

XY Transient or Sequence
Plots an expression (usually Time) versus a variable at a point locator
Typically used to show the transient variation of a variable at a point
Data files for multiple time steps must available

Histogram
Can be based on any locator that contains multiple data locations
lines, surfaces, planes, domains (but not points)
Plots a variable divided into discrete bands on the X Axis versus the
frequency of occurrence on the Y Axis

56

2016 ANSYS, Inc.

April 12, 2016

57

Charts: Data Series and Axes


Each data series corresponds to a location (line, point,
etc.) which corresponds to a curve on the chart
Use the X and Y Axis tabs to set the variables on the axes
The remaining tabs are for various display options

Add new data


series

The Export button allows the generated plot


data to be written to a .csv or .txt file for use
in Excel, Matlab or other plotting programs
2016 ANSYS, Inc.

April 12, 2016

Fast Fourier Transform


FFT can be applied to signals to extract frequency data

Original Signal
FFT of Signal Showing
Dominant Frequency
58

2016 ANSYS, Inc.

April 12, 2016

59

Reports
CFD-Post has report generation tools which allow for
rapid creation of customized reports

To view the report, click the Report Viewer tab


Use the check boxes to control what is included in the report
Reports are template based

Depending on the information contained in a results file, a


report template will be selected automatically
Right-click on Report to select a different template
You can create your own custom templates or modify existing
templates
E.g. add you company logo, add Charts, Tables, Plots etc

2016 ANSYS, Inc.

April 12, 2016

Reports
Use the check boxes to control what is
included in the report
Double-click items to edit

For example, editing the Mesh Report shows that


additional items can be included

Tables and Charts are automatically added to


the report. Other items that can be added are
Comments and Figures.

Right-click > Insert to add new items

Can also right-click on each item to move it up


or down in the report
60

2016 ANSYS, Inc.

April 12, 2016

61

Reports: Figures
When you add a new Figure it will be listed in the
drop-down menu in the top corner of the Viewer
Figures are not static, you can change them after
they have been created

If you do not want to change a Figure, make sure one of


View 1 View 4 is selected from the drop down menu

To change the camera position for a figure (i.e.


rotate / pan / zoom) select the figure from the
Viewer drop down menu and move as necessary

All changes are automatically saved to the Figure


2016 ANSYS, Inc.

April 12, 2016

Reports: Figures
When you create a Figure, you have the
option to Make copies of objects

If you disable this only the camera and object


visibility is stored with the figure
So changing global objects will always cause the Figure
to change
Good if you want the Figure to update automatically

If you enable this a local copy of all the current


objects is created and shown in the Outline tree
Changing global object will not change the Figure, you
must edit the local objects

In both cases the camera position and object


visibility can only be changed when the Figure is
active
62

2016 ANSYS, Inc.

April 12, 2016

63

Other Tools
Timestep Selector

Transient results are post-processed by loading in the final data

file, then selecting different timesteps from the Timestep Selector

Animation

Animate objects, create MPEGs


More on next slide

Timestep
Selector

Animation

Quick
Editor

Probe

Quick Editor

Provides a very quick way to change the primary value


associated with each object

Probe

Pick a point from the Viewer and probe a variable value at that
point

2016 ANSYS, Inc.

April 12, 2016

Multi File Mode


To post-process multiple files simultaneously
you can:

Multi-select files when loading


Or load additional results and enable the Keep current
cases loaded toggle

Each file is shown separately in the Outline tree and


the Viewer

Sync cameras
All Views move the
same

Sync objects
The visibility of all User
Locations and Plots is
the same

64

2016 ANSYS, Inc.

April 12, 2016

65

Files
CFD-Post can interact with a number of different files including:

Results Files

CFX .res, ANSYS .rst, Fluent.dat

Mesh Files

CFX .def., ANSYS .cmdb, Fluent .cas,

Import

Polyline .csv, User Surface .csv, ANSYS surface .cdb

Export

Profile Data .csv, General Formatted Results .csv,

Recorded Session Files (.cse)


State Files (.cst)
Macros (.cse)
2016 ANSYS, Inc.

ANSYS load file .csv

April 12, 2016

Files
Results

ANSYS

CFD-Post is able to read ANSYS results for temperature, velocity,


acceleration, magnetic forces, stress, strain, and mesh deformation

Import

Locations: .csv files which contain point data which defines a


polyline or surface

ANSYS Surface Mesh (.cdb): To allow for export of data on a


surface for use as a boundary condition in ANSYS

Export

Profile Boundary Data: for use in CFX-Pre


General formatted results data
ANSYS Load Data: Written onto an imported ANSYS .cdb file
66

2016 ANSYS, Inc.

April 12, 2016

Files
Session
Session files can be used to quickly reproduce all the actions
performed in a previous CFD-Post session

Session recording in CFX Command Language (CCL)


State

Saves a snap-shot of all objects


Excludes actions (e.g. file output)

Macro

More later in Scripting and Automation lecture

2016 ANSYS, Inc.

2016 ANSYS, Inc.

67

April 12, 2016

17.0 Release

Module 5: Solving
Introduction to ANSYS Fluent

April 12, 2016

Introduction
Lecture Theme:
A Fluent simulation begins with initialization and proceeds, over a number of
iterations, to convergence. Inputs that control this process are called solver settings.
Convergence is a critical concept in simulation, so while default settings can be used in
most cases, a basic understanding of the role of the most important settings can help
to ensure optimal convergence.
Learning Aims:
You will learn:
How to specify the solver and choose solution methods and controls
How to initialize the solution
How to use report definitions to monitor and judge convergence
Learning Objectives:
You will be able to choose appropriate methods and controls for your Fluent
simulation and be able to monitor and judge solution convergence
Introduction

Solution Methods and Controls

2016 ANSYS, Inc.

Initializing and Calculating

Convergence

Summary

April 12, 2016

ANSYS Fluent Workflow


Ribbon Guides Basic Workflow

Setting Up Domain

Setting Up Physics

Read and check mesh


Check mesh quality
Define mesh interfaces (if
needed)
See Module 3
Convert mesh to
polyhedra (optional, if
needed)
Transform mesh
(optional, if needed)
Scale, translate, rotate
Set units
Introduction
3

Solver
Setup basic options
Models
Setup Energy, Viscous
(turbulence),
Multiphase,
Materials
Create/Edit materials
and their properties
Zones
Cell zone and boundary
conditions

Solution Methods and Controls

2016 ANSYS, Inc.

Postprocessing

Solving
Choose solution methods
and controls
Define reports for
convergence checking
Initialization
Run calculation

Initializing and Calculating

Convergence

Graphics and Plots


Visualize solution data
Reports
Quantitative solution
analysis

Summary

April 12, 2016

Solving Overview
The sketch to the right shows the basic
workflow for any simulation once the
domain and physics have been set up
Most items in the chart will be covered
here

Solution Methods and Controls

Set the solution parameters


Initialize the solution
Enable the report definitions of interest

Solution parameters
Choosing the solver
Solution methods
Initialization
Yes
Calculate the solution and monitor convergence
Monitoring convergence
Stability
Setting controls
Yes
Accelerating convergence
Accuracy
(Discussed in Module 09, "Best Practices for CFD")
Introduction
2016 ANSYS, Inc.

Calculate a solution

Modify solution
parameters or grid

Check for convergence

No

Check for accuracy

No

Stop

Initializing and Calculating

Convergence

Summary

April 12, 2016

Solver Types

Recall from Module 3 that Fluent has two


types of solver, pressure-based and
density-based
Pressure-Based is the default and should
be used for most problems
Handles the range of Mach numbers
from 0 to ~2-3
Density-Based is normally only used for
higher Mach numbers, or for specialized
cases such as capturing interacting shock
waves
Available methods and controls will vary
depending on solver type

Introduction
5

Solution Methods and Controls

2016 ANSYS, Inc.

Initializing and Calculating

Convergence

Summary

April 12, 2016

Methods for the Pressure-Based Solver


Choose Methods in the Solution group to open the
Solution Methods Task Page
Pressure-Velocity Coupling needed by Pressure-Based
Solver
Default is SIMPLE
Good for majority of routine incompressible flow
applications
For compressible flows choose Coupled
Enabling pressure-based coupled
Often referred to as pressure-based coupled solver, solver (PBCS)
or PBCS
Also preferred for incompressible flow cases
involving buoyancy or rotation
Use in place of SIMPLE for any case that has
convergence problems
The other selections are only used in specific situations
PISO is normally only used for transient calculations
(Module 09)
SIMPLEC is primarily of academic interest
Introduction
2016 ANSYS, Inc.

Solution Methods and Controls

Initializing and Calculating

Convergence

Summary

April 12, 2016

Under-relaxation Factors
Implicit under-relaxation factors are
used for SIMPLE, SIMPLEC, PISO

The under-relaxation factor, , is


included to stabilize the iterative process
for the pressure-based solver
The final, converged solution is
independent
of the under-relaxation factor
Only the number of iterations
required
for convergence is dependent

The default settings are suitable for a


wide range of problems
You can reduce the values when necessary
Appropriate settings are best learned
from experience!

Introduction
7

Solution Methods and Controls

2016 ANSYS, Inc.

Initializing and Calculating

Convergence

Summary

April 12, 2016

Pressure-Based Coupled Solver Controls


Two methods are available to control the solution when
using the pressure-based coupled solver
Courant number: default =200
Can be reduced to 10-50 for problems that are difficult to converge or
for complex physics such as multiphase and combustion
In general, lower Courant number values make the solution more stable,
while higher values allow the solution to converge faster
If the value used is too high, the solution will probably diverge

As with under-relaxation factors, optimal values can be somewhat


problem dependent and are best learned from experience
Pseudo-transient (next slide)

Introduction

Solution Methods and Controls

2016 ANSYS, Inc.

Initializing and Calculating

Convergence

Summary

April 12, 2016

Pseudo Transient Settings


Using the Pseudo Transient option with the
pressure-based coupled solver can lead to better
convergence for meshes with high aspect ratio
cells
Select in Solution Methods task page after
choosing Coupled
This option requires inputs for the calculation of
the pseudo time step
Accessed from Advanced option in the Run
Calculation group
For internal flows, the default settings of
Automatic and Length Scale Method =
Conservative work well in the majority of cases
For external flows, use Automatic with UserSpecified length scale equal to a characteristic
length of the geometry, e.g. airfoil chord length
More details can be found in the Appendix
Introduction
9

Solution Methods and Controls

2016 ANSYS, Inc.

Initializing and Calculating

Convergence

Summary

April 12, 2016

10

Spatial Discretization Settings


Use of the default settings for spatial
discretization is recommended for most cases
For natural convection problems, where gravity has been
activated, the pressure discretization must be changed to
PRESTO! or Body-Force Weighted

Introduction
2016 ANSYS, Inc.

Solution Methods and Controls

Initializing and Calculating

Convergence

Summary

April 12, 2016

Initialization
Fluent requires that all solution variables be initialized before starting iterations
Basically this means that in every individual cell in the mesh a value must be assigned for every solution
variable to serve as an initial guess for the solution
A realistic initial guess improves solution stability and accelerates convergence
In some cases a poor initial guess may cause the solver to fail during the first few iterations

5 initialization methods are available **


Hybrid initialization (default)
Use this for most cases
FMG initialization
Provides a more realistic initial guess, but the initialization process takes much longer than other
methods
Can be especially beneficial for compressible flows and rotating machinery

Standard initialization
Patch values
Starting from a previous solution
Introduction
11

Solution Methods and Controls

2016 ANSYS, Inc.

**

Specific details of each method can be found in Appendix

Initializing and Calculating

Convergence

Summary

April 12, 2016

Comparison of Initialization Methods

Initial mesh before


solving

Standard Initialization: Hybrid Initialization:

All cells have the same Slightly more realistic


value
non-uniform initial
guess

FMG Initialization:

Final converged
solution

Much more realistic


non-uniform initial
guess, however takes
longer to generate

In general, the closer the initial guess is to the final solution,


the fewer iterations will be needed to reach convergence.
Introduction
12

2016 ANSYS, Inc.

Solution Methods and Controls

Initializing and Calculating

Convergence

Summary

April 12, 2016

Run Calculation
Steady State

Enter the number of iterations to be performed


Fluent will continue from the current solution
If no iterations have been performed previously, it
starts from the initialized solution

The solution will stop sooner if convergence monitor


checks are met

Transient
Enter the time step size and the number of time
steps for the solution to run

Continues from the current solution


Additional options for both steady state and
transient can be accessed from the task page,
which opens after selecting Advanced
Introduction
13

Solution Methods and Controls

2016 ANSYS, Inc.

Initializing and Calculating

Convergence

Summary

April 12, 2016

14

Convergence
The solver must perform enough
iterations to achieve a converged solution
At convergence, the following should be
satisfied:
All discrete conservation equations (momentum,
energy, etc.) are obeyed in all cells to a specified
tolerance (Residual).
The residual measures the imbalance of the current
numerical solution and is related to but NOT EQUAL
to the numerical error.
Overall mass, momentum, energy, and scalar balances
are achieved
Target quantities reach constant values
Integral: e.g. Pressure drop
Local: e.g. Velocity at specified position
Introduction

Solution Methods and Controls

2016 ANSYS, Inc.

Residuals

Iteration Number
Isentropic Efficiency

Iteration Number

Initializing and Calculating

Convergence

Summary

April 12, 2016

Convergence
Monitoring convergence using residual history
Generally, a decrease in residuals by three orders of magnitude can be a sign of convergence
Scaled energy residual should decrease to 10-6 (for the pressure-based solver)
Scaled species residual may need to decrease to 10-5 to achieve species balance

Best practice is to also monitor quantitative variables to decide


convergence
Ensure that overall mass/heat/species conservation is satisfied
Monitor other relevant key variables/physical quantities for confirmation
Report Definitions are used for this purpose
It is strongly recommended to use one or more report definitions for all simulations

Introduction
15

Solution Methods and Controls

2016 ANSYS, Inc.

Initializing and Calculating

Convergence

Summary

April 12, 2016

16

Convergence Monitors Residuals


Residual plots show when the residual values
have reached the specified tolerance
It is possible to modify or disable the default checking criterion
for convergence
Prevents calculation being stopped prematurely

All equations
converged
10-3

10-6

Introduction
2016 ANSYS, Inc.

Solution Methods and Controls

Initializing and Calculating

Convergence

Summary

April 12, 2016

Checking Overall Flux Conservation


The net flux imbalance (shown in the GUI as Net Results) should be less
than 1% of the smallest flux through the domain boundary

Introduction
17

2016 ANSYS, Inc.

Solution Methods and Controls

Initializing and Calculating

Convergence

Summary

April 12, 2016

18

Report Definitions

A flexible approach to monitoring target


quantities
Surface, Volume, Force and Flux reports
Relevant variables or functions (e.g. surface integrals) at a
boundary or any defined surface
Write to file, plot in graphics window, print to console

These additional monitored quantities are


important convergence indicators

The use of one or more of this type of solution monitor is


strongly recommended for all calculations
Introduction
2016 ANSYS, Inc.

Solution Methods and Controls

Initializing and Calculating

Convergence

Summary

April 12, 2016

Convergence Difficulties
Numerical instabilities can arise with an ill-posed problem, poor-quality mesh and/or
inappropriate solver settings
Exhibited as increasing (diverging) or stuck residuals
Diverging residuals imply increasing imbalance in conservation equations
Unconverged results are very misleading!

Continuity equation convergence


trouble affects convergence of
all equations.

Troubleshooting

Ensure that the problem is well-posed


Compute an initial solution using a
first-order discretization scheme
For the pressure-based solver, decrease
underrelaxation factors for equations
having convergence problems
For the density-based solver, reduce
the Courant number
Remesh or refine cells which have large
aspect ratio or large skewness.
Remember that you cannot improve
cell skewness by using mesh adaption!

Introduction
19

Solution Methods and Controls

2016 ANSYS, Inc.

Initializing and Calculating

Convergence

Summary

April 12, 2016

20

Accelerating Convergence
Convergence can be accelerated by:
Supplying better initial conditions
Starting from a previous solution (using file/interpolation when necessary)
Gradually increasing under-relaxation factors or Courant number
Excessively high values can lead to solution instability and convergence problems
You should always save case and data files before continuing iterations
Starting with a good quality mesh with appropriate mesh resolution
The orthogonal quality reported in Mesh > Info > Quality should have a minimum value of 0.1
and an average value that is much higher

Introduction
2016 ANSYS, Inc.

Solution Methods and Controls

Initializing and Calculating

Convergence

Summary

April 12, 2016

Convergence vs Accuracy
A converged solution is not necessarily an accurate solution

Accuracy depends on :
Order of the discretization schemes (2nd order schemes are recommended)
Mesh resolution
Boundary Conditions
Model limitations
Geometry simplifications
Precision of the solver (2d/3d or 2ddp/3ddp)

Introduction
21

2016 ANSYS, Inc.

Solution Methods and Controls

Initializing and Calculating

Convergence

Summary

April 12, 2016

Summary
All CFD simulations utilize the same basic solution procedure

Choose the solver & solution parameters


Define solution monitors for important "target quantities" such as mass flow rate, drag, pressure drop, heat flux, .
Initialize the solution
Calculate until you get a converged solution

Use solution monitors for judging convergence


Residual monitors are also useful
Be sure to check flux reports for mass and energy

Introduction

The imbalance should be less than 1% of the throughput

Solution Methods and Controls

2016 ANSYS, Inc.

23

2016 ANSYS, Inc.

22

Initializing and Calculating

Convergence

Summary

April 12, 2016

Appendix

April 12, 2016

24

Available Solvers
There are two kinds of solvers available in Fluent
Pressure based
Density based

Pressure-Based
Segregated

Coupled

Density-Based
Coupled Implicit

Coupled-Explicit

Solve U-Momentum
Solve V-Momentum
Solve W-Momentum

Solve Mass
& Momentum

Solve Continuity;
Update Velocity

Solve Mass,
Momentum,
Energy,
Species

Solve Mass,
Momentum,
Energy,
Species

Solve Energy
Solve Species
Solve Turbulence Equation(s)
Solve Other Transport Equations as required

2016 ANSYS, Inc.

April 12, 2016

Pressure-based Solver (PBS)


The pressure-based solvers

Pressure-Based
Coupled

Segregated

Solve Turbulence Equation(s)

Additional scalar equations are also solved in a segregated


(sequential) fashion

Solve Species

Energy equation (where appropriate) is solved sequentially

Solve Energy

Solve V-Momentum

Mass conservation (continuity) is achieved by solving a


pressure correction equation
Pressure-velocity coupling algorithms are derived by
reformatting the continuity equation
The pressure equation is derived in such a way that the
velocity field, corrected by the pressure, satisfies
continuity

Solve U-Momentum

Velocity field is obtained from the momentum equation

Solve Mass
& Momentum

Solve W-Momentum

Solve Continuity;
Update Velocity

Solve Other Transport Equations as required

25

2016 ANSYS, Inc.

April 12, 2016

Density-based Solver (DBS)


Density-based Solver (DBS)
The governing equations of continuity, momentum, and
(where appropriate) energy and species transport are
solved simultaneously (i.e., coupled together)
Additional scalar equations are solved in a segregated
fashion

Density-Based

Solve Mass,
Momentum,
Energy,
Species

Solve Mass,
Momentum,
Energy,
Species

Coupled-Explicit

Coupled Implicit

The density-based solver can be run implicit or explicit

Solve Turbulence Equation(s)


Solve Other Transport Equations as required

26

2016 ANSYS, Inc.

April 12, 2016

Using the Pseudo-transient Solution Method


Solution Method panel
Select Pseudo Transient

Run Calculation panel


Select Time step method
Automatic (default)
User Specified

For Automatic
Select Length Scale Method (time=length/velocity)
Aggressive :
Conservative :
User Specified

Max( Lext , LVol )

Min( Lext , LVol )

Internal Flow

Lext

Internal Flow

Lvol

External Flow
Conservative setting is the default
Specify Time Step Scaling factor: additional user control to scale automatic
method

27

2016 ANSYS, Inc.

Vol

External Flow
L

April 12, 2016

28

Pressure-Based Coupled Solver: Convergence


Pressure based coupled solver with default settings
Rotating propeller 1500 rpm

SIMPLE: ~2250 iterations

Coupled: ~120 iterations

Approximately 2250 iterations of SIMPLE (default) in 3.5 hours


Approximately 120 iterations of coupled 13 minutes

2016 ANSYS, Inc.

April 12, 2016

Choosing a Solver Density Based


The density-based solver is applicable when there is a strong coupling, or
interdependence, between density, energy, momentum, and/or species
Density-based Coupled Implicit
The implicit option is generally preferred over explicit since explicit has a very strict limit on time scale size
(CFL constraint) as implicit does not have
Examples: High speed compressible flow with combustion, hypersonic flows, shock interactions

Density-based Coupled Explicit


The explicit approach is used for cases where the characteristic time scale of the flow is on the same order as
the acoustic time scale
Example: propagation of high-Mach shock waves, shock tube problem

29

2016 ANSYS, Inc.

April 12, 2016

DBS Iterative Procedure Courant Number


A pseudo-transient term is included in the density-based solver even for steady state problems
The Courant number (CFL) defines the
time scale size
The pseudo-transient option is available for

DBS as well as PBS.

For density-based explicit solver:


Stability constraints impose a maximum limit

on the Courant number (<2)

For density-based implicit solver:


The Courant number is theoretically not limited
by stability constraints
Default value is 5
(can be reduced for start up to 0.1-2)
Values of 100 1000 are common in external aero

Solution steering can be used to automatically adjust the Courant number as the solution iterates such that it has an optimal
value at all stages of the calculation
See Workshop 04 Fluid flow around the NACA0012 Airfoil.

30

2016 ANSYS, Inc.

April 12, 2016

PBS - Interpolation Methods for Pressure


Interpolation is required for calculating cell-face pressures in order to compute pressure gradient (Gauss
method):
Value (e.g. Pressure) computed here

face

&
A face

Area
Vector

face

Vol cell

But solver must estimate the value at each face in


order to compute pressure gradient (Gauss method)

Standard The default scheme; reduced accuracy for flows exhibiting large surfacenormal pressure gradients near boundaries (but should not be used when steep pressure
changes are present in the flow PRESTO! scheme should be used instead)
PRESTO! Use for highly swirling flows, flows involving steep pressure gradients (porous
media, fan model, etc.), or in strongly curved domains
Linear Use when other options result in convergence difficulties or unphysical behavior
Second-Order Use for compressible flows; not to be used with porous media, jump, fans,
etc. or VOF/Mixture multiphase models
Body Force Weighted Use when body forces are large, e.g., high Ra natural convection
or highly swirling flows
31

2016 ANSYS, Inc.

April 12, 2016

32

Discretization (Interpolation Methods)


Field variables (stored at cell centers) must be interpolated to the faces of the control volumes

Interpolation schemes for the convection term:


First-Order Upwind Easiest to converge, only first-order accurate
Power Law More accurate than first-order for flows when Recell < 5 (typ. low Re flows)
Second-Order Upwind Uses larger stencils for 2nd order accuracy, essential with tri/tet mesh or
when flow is not aligned with grid; convergence may be slower
Monotone Upstream-Centered Schemes for Conservation Laws (MUSCL) Locally 3rd order
convection discretization scheme for unstructured meshes; more accurate in predicting secondary
flows, vortices, forces, etc.
Quadratic Upwind Interpolation (QUICK) Applies to quad/hex and hybrid meshes, useful for
rotating/swirling flows, 3rd-order accurate on uniform Quad mesh
2016 ANSYS, Inc.

April 12, 2016

Effects of Discretization
Flow is misaligned with mesh

IC 0

If
dr 0

IC1

C0

Theory

RG

I  E I x dr
C0

0
1st-Order Upwind
Scheme, E = 0

If E = 0 we get the 1st-Order-Upwind convection scheme,


i.e. no correction

2nd-Order
Scheme,
E=1.00

This is robust but only first order accurate


Sometimes useful for initial runs

If E = 1 we get the 2nd-Order-Upwind Scheme


Additional Limiters must be added to guarantee the solution to be bounded
(IC0<If<IC1)

The QUICK scheme maximizes E throughout the flow


domain while keeping the solution bounded
33

2016 ANSYS, Inc.

QUICK
Scheme

April 12, 2016

34

Discretization (Interpolation Methods)


Interpolation schemes for the diffusive term:

Always central-differenced & 2nd order accuracy

2016 ANSYS, Inc.

April 12, 2016

Interpolation Methods (Gradients)


Gradients of solution variables are required in order to evaluate diffusive
fluxes, velocity derivatives, and for higher-order discretization schemes.

If

Cell based/ Least-Squares

RG

IC 0  E IC 0 x dr0

The gradients of solution variables at cell centers can be determined using


three approaches:
Green-Gauss Cell-Based Good, but solution may have false diffusion (smearing
of the solution fields)
Green-Gauss Node-Based More accurate; minimizes false diffusion; (strongly
recommended for tri/tet and hybrid meshes)
Least-Squares Cell-Based The default method. Less expensive to compute than
Node-Based gradients. Slightly more expensive than Cell-Based gradients.
However, exactly reconstruct linear field on highly skewed or distorted meshes.
(appropriate for any kind of meshes)

35

2016 ANSYS, Inc.

Node-Based

April 12, 2016

36

Case Check
Case Check is a utility in Fluent
which searches for common setup
errors and inconsistencies
Provides guidance in selecting
case parameters and models

Tabbed sections contain


recommendations which the
user can apply or ignore

2016 ANSYS, Inc.

April 12, 2016

DBS Iterative Procedure Solution Steering


Objective:
Provide an expert system that will navigate the
solution from the difficult initial starting solution
to a converged solution with minimum user
intervention and tweaking
Particularly useful for high speed
compressible flows

Activating Solution Steering:

2016 ANSYS, Inc.

Blending Factor - Stage-1


If

I0  (1  D ) E (I x dr )

CFL=200

CFL Update Stage 2

CFL

Set up your case the normal way


Perform initialization (i.e. typically from flow
inlets)
Activate Solution Steering
Select type of flow that best characterizes the
problem
incompressible, subsonic, transonic,
supersonic , hypersonic flows
Start iterating

CFL=5
0

100

200

300

400

Stage-1
Stage-2

CFL update Termination level

37

100

200

300

400

April 12, 2016

38

Standard Initialization and Patch Values


Standard Initialization
Generally the user selects an inlet boundary under
Compute from to automatically fill the initialization
values with the values that are specified at the inlet
boundary

Patch values for individual

variables in certain regions

Free jet flows (high velocity for jet)


Combustion problems (high temperature
region to initialize reaction)
Cell registers (created by marking the
cells in the Adaption panel) can be used
for patching values into various regions
of the domain.

Multiphase flows (patch different phase volume


fractions in one or more regions)

2016 ANSYS, Inc.

April 12, 2016

Hybrid Initialization
The default initialization method

This provides a quick approximation of the


flow field, by a collection of methods.
It solves Laplace's equation to determine the
velocity and pressure fields.
All other variables, such as temperature,
turbulence, species mass fractions, volume
fractions, etc., will be automatically patched
based on domain averaged values or a
particular interpolation method.

39

2016 ANSYS, Inc.

April 12, 2016

FMG Initialization
Full Multigrid (FMG) Initialization
Can be used to create a better initialization of the flow field
FMG Initialization is useful for complex flow problems involving large pressure and velocity gradients on large
meshes
FMG uses the Full Approximation Storage (FAS) Multigrid method to solve the flow problem on a sequence of
coarser meshes
Euler equations are solved with first-order accuracy on the coarse-level meshes

To enable FMG initialization, execute the TUI command


/solve/init/fmg-initialization
Settings can be accessed by the TUI command
/solve/init/set-fmg-initialization

40

2016 ANSYS, Inc.

April 12, 2016

Starting from a Previous Solution


A previously calculated solution can be
used as an initial condition when
changes are made to the case setup
Use solution interpolation to initialize a run
(especially useful for starting fine-mesh cases when
coarse-mesh solutions are available)
Once the solution is initialized, additional iterations
always use the current data set as the starting point

Sometimes solving a simplified version


of the problem first will provide a good
initial guess for the real problem

41

2016 ANSYS, Inc.

Inviscid (Euler) solution

Turbulence

Cold flow (no combustion)

Combustion / reacting flow

Low Rayleigh number

Natural convection

Isothermal

Heat Transfer

Initial Condition

Actual Problem

April 12, 2016

42

2016 ANSYS, Inc.

Monitors as Convergence Criteria


Use monitors to determine solution convergence

Lift and drag monitors, for example


Use with or without residual monitors

Stop criterion based on solution monitor residual, which is


defined as

Res-m(1)=abs[m(n)-m(n-1)]/m(n)
where m(n) = monitor value at iteration number n

Solution will be stopped when residual is less than the stop


criterion over specified number of previous iterations

April 12, 2016

Tightening the Convergence Tolerance


If solution monitors indicate that the solution
is converged, but the solution is still changing
or has a large mass/heat imbalance, this
clearly indicates the solution is not yet
converged
In such a case, you need to:
Reduce values of Convergence Criteria or disable Check
Convergence in the Residual Monitors panel
Continue iterations until the solution converges

Selecting None under Convergence Criterion


disables convergence checking for all
equations

43

2016 ANSYS, Inc.

April 12, 2016

44

Autosave
The solution can be saved at regular intervals during the
calculation using the Autosave menu, which is accessed
through the Calculation Activities menu panel
This can be helpful in situations where convergence difficulties are
encountered, because it makes it possible to return to an earlier point in the
calculation
Keeping a large number of Autosave files can use a large amount of disk space,
therefore in most cases, it is recommended to use the option to retain only the
most recent files

2016 ANSYS, Inc.

April 12, 2016

Grid Adaption
Grid adaption adds more cells where needed to
resolve the flow field without the pre-processor
Adaption proceeds in three steps:
Mark cells satisfying the adaption criteria and store them in a
register
Display and modify the register
Click on Adapt to adapt the cells listed in the register

Registers can be defined based on:

Gradients or iso-values of all variables


All cells on a boundary
All cells in a region with a defined shape
Cell volumes or volume changes
y+ in cells adjacent to walls

To assist adaption process, you can:

45

Combine adaption registers


Draw contours of adaption function
Display cells marked for adaption
Limit adaption based on cell size
and number of cells

2016 ANSYS, Inc.

Refine Threshold should be set to 10% of


the value reported in the Max field.

Always save case


and data files
prior to adapting
the mesh!

April 12, 2016

46

Adaption Example 2D Planar Shell


Adapt grid in regions of large pressure gradient to better resolve the
sudden pressure rise across the shock
Large pressure gradient indicating a
shock (poor resolution on coarse mesh)

Initial Mesh
2016 ANSYS, Inc.

Pressure Contours on Initial Mesh

April 12, 2016

2D Planar Shell Solution on Adapted Mesh


Solution-based mesh adaption allows better resolution of the bow shock
and expansion wave.
Adapted cells in locations of
large pressure gradients

Mesh adaption yields much-improved


resolution of the bow shock.

Pressure Contours on Adapted Mesh

Adapted Mesh
47

2016 ANSYS, Inc.

April 12, 2016

48

Running Simulations in Parallel


Serial

Local Parallel
Shared Memory

Distributed Parallel
Distributed Memory

Different communication methods are available (MPICH2, HP MPI,


I PVM)
PVM
P
VM
V
M)
M
See documentation When To Use MPI or PVM for more details, but HP MPI is recommended in most cases
ases
2016 ANSYS, Inc.

April 12, 2016

Running Simulations in Parallel


In the Fluent Launcher you can choose Parallel
and set the Parameter
If you choose Distributed Memory, you have to
specify the names of the computers which you
want to connect
You can specify the names directly
You can specify a file which contains the names

For further information see Chapter 34 in User's


Guide

49

2016 ANSYS, Inc.

April 12, 2016

2016 ANSYS, Inc.

17.0 Release

Module 6: Parameters and Design Points


Introduction to ANSYS Fluent

April 12, 2016

Introduction
Lecture Theme:
In ANSYS applications, key simulation properties can be defined as parameters.
Parameters can be used to define Design Points in Workbench, which enables
the study of what-if scenarios and optimization. Both input and output
parameters can be defined in Fluent.
Learning Aims:
You will learn:
How to define input and output parameters in Fluent
How to manipulate parameters in Workbench
How to define Design Points in Workbench
Learning Objectives:
You will be able to define input and output parameters and perform design
point studies in Workbench
Introduction
2

2016 ANSYS, Inc.

Parameters

Design Points

Example

Summary

April 12, 2016

Overview
In ANSYS applications, key simulation
properties can be defined as parameters
In Fluent, input and output parameters can be
defined
The values of input parameters can be modified
either at the project level or from within the
application (application level)
The values of output parameters are determined by
the application, based on simulation results

Parameters can be used to create a set of


Design Points in tabular form and run them
automatically to perform optimization and
what-if studies
Introduction
2016 ANSYS, Inc.

Parameters

Design Points

Example

Summary

April 12, 2016

Parameters in Fluent
Parameters can be defined in all ANSYS applications you would typically use for
CFD simulation
SpaceClaim, DesignModeler, Meshing, Fluent, CFD-Post,
This module covers Fluent only see relevant training courses or documentation for other
applications

Parameters in Fluent can be one of two types


Input
Drive key simulation inputs such as boundary condition values, material properties
Can be modified at application level (Fluent) or project level (Workbench)

Almost all numeric settings in cell zone and boundary conditions panels are available as input parameters

Output
Can be used to define key simulation results
Single values generated by existing reports or monitors
Fluxes, forces, surface integrals, volume integrals, (see documentation for complete list)
Introduction
4

2016 ANSYS, Inc.

Parameters

Design Points

Example

Summary

April 12, 2016

Defining Input Parameters


Numeric inputs in cell zone and boundary
conditions panels can be defined by selecting
New Input Parameter from the drop-down list
Enter a name and value for the parameter
The same parameter can be used for any other setting
requiring the same units

For settings which do not have drop down


arrows, look for the parameter icon, a small box
with a P next to the value field

Introduction
2016 ANSYS, Inc.

Parameters

Design Points

Example

Summary

April 12, 2016

Defining Output Parameters


Choose Save Output Parameter in any report panel
Or open the Parameters panel
Use the User-Defined tab in the ribbon
Or the Workbench Toolbar above the ribbon tabs

or

Introduction
6

2016 ANSYS, Inc.

Parameters

Design Points

Example

Summary

April 12, 2016

Parameters in Standalone Fluent


Parameters are most powerful when running Fluent in Workbench
Make full use of Design Points
Drive parametric and what-if studies from the project level
Parameters can also be useful in standalone Fluent if you want a
single parameter to control a setting for multiple boundaries

Or to conveniently write a number of predefined results to a file

Introduction
2016 ANSYS, Inc.

Parameters

Design Points

Example

Summary

April 12, 2016

Parameter Management
When running Fluent in Workbench, parameters can be managed either
from the Parameters panel, or from the Parameter Set tab in Workbench
When any parameter has been defined in Fluent, the Parameter Set bar
appears in the Workbench Project Schematic window
Double click this to open the Parameter Set Tab

Introduction
8

2016 ANSYS, Inc.

Parameters

Design Points

Example

Summary

April 12, 2016

Using the Parameter Set tab


To modify input parameter values, click in the cell and enter the new value
New parameters can be added

Set up Design Points


Add new Design Points or remove old ones
See all results in tabular format when
multiple Design Points have been defined

Tabular view of all output parameters


Allows results to be seen even if Fluent is not running
Introduction
2016 ANSYS, Inc.

Parameters

Design Points

Example

Summary

April 12, 2016

Design Points
A Design Point is a set of parameters representing one design alternative
Can include multiple input and multiple output parameters as needed
Parameters can come from more than one application
In Workbench, Design Points enable the study of what-if scenarios
Multiple parameters can be varied, alone or together
For large models, calculation time can be high so use HPC and choose wisely to use no
more points than you need
Can also be used together with Design Explorer to perform design of experiment (DOE)
and optimization studies (not covered in this training)
Design Points are enabled when any parameter is defined in any application
within a project
Accessed through the Parameter Set tab
Introduction
10

2016 ANSYS, Inc.

Parameters

Design Points

Example

Summary

April 12, 2016

11

Working with Design Points


Create new Design Points by clicking in any input parameter in the
row below the last defined Design Point
Hint: If the parameter values are in a
spreadsheet, select and copy the cells in
Excel, then paste into the Design Point
table

Enter new value and press return

Introduction
2016 ANSYS, Inc.

Parameters

Design Points

Example

Summary

April 12, 2016

Design Point Options: Update


Upon definition of new Design Points,
the Update icon appears in the output
parameter fields
Right click on a row and choose Update
Selected Design Points

Or choose Update All Design Points in


the Workbench tool bar to
simultaneously update all

Introduction
12

2016 ANSYS, Inc.

Parameters

Design Points

Example

Summary

April 12, 2016

13

Design Point Options: Retain


By default, when Design Points are updated, Workbench
keeps only the values of the output parameters in each
To keep the simulation files too, check the Retain box
Files stored in sub-folders under the project directory
For retained Design Points, right click on any row to make it
the current Design Point

Current Design Point output


parameter values are displayed in
the Outline of All Parameters table
Introduction
2016 ANSYS, Inc.

Parameters

Design Points

Example

Summary

April 12, 2016

Design Point Options: Initialization


By default, each Design Point is
initialized using the method defined
in the Setup cell
For certain problems, the solution
of the next Design Point might
converge in fewer iterations if it
started with the solution from the
previous Design Point.
This is possible by changing the
Design Point Initiation property in
the Parameter Set properties table
Introduction
14

2016 ANSYS, Inc.

Parameters

Design Points

1. Right click Parameter Set and choose Properties


2. Use drop-down arrow in row 4 to select From
Previous Updated

Example

Summary

April 12, 2016

15

Example: Valve Minor Loss Coefficient


This example uses design points to perform a parametric study to determine the
minor loss coefficient, K, for a butterfly valve when opened to a specific angle
The minor head loss, in meters or feet, is defined as
hl = K (V2/2) g
Bernoullis equation can be rearranged to show that
'P) is
the relationship between K and pressure drop ('
given by
'P = K (UV2/2)

Independent Variable (V): Input parameter


Dependent Variable: Output parameter
Introduction
2016 ANSYS, Inc.

Parameters

Design Points

Example

Summary

April 12, 2016

Example:Define Input and Output Parameters


Make the inlet velocity an input
parameter

Open the Parameters panel and


create an output parameter from
Surface integrals
Inlet pressure can be used as 'p because
outlet pressure is zero

Select Save Output Parameter in the


Surface Integrals panel

Introduction
16

2016 ANSYS, Inc.

Parameters

Design Points

Example

Summary

April 12, 2016

17

Example: Set Design Points


Double click the Parameter Set bar in the Project Schematic
The first design point, dp0, contains the input parameter
from the Setup cell

Click in cell B and enter the next value


Repeat until all values have been input
Select Retain for all design points where it is desired to
save the simulation results files as part of the project
This is a simple case with one parameter from a single
application. In general, there could be multiple input and
output parameters taken from multiple applications.
Introduction
2016 ANSYS, Inc.

Parameters

Design Points

Example

Summary

April 12, 2016

Example: Design Point Update


Update all design points

On completion, the Design Points table will show the values of the
output parameters for all points

Right click in the table and select Export Data to create a .csv file for further
processing in Excel

Introduction
18

2016 ANSYS, Inc.

Parameters

Design Points

Example

Summary

April 12, 2016

19

Example: Design Point Chart


Results can be plotted in the Parameters Set tab
Double click Parameters Chart
Select axis display options
Chart appears in lower right corner

Introduction
2016 ANSYS, Inc.

Parameters

Design Points

Example

Summary

April 12, 2016

Example: Loss Coefficient Calculation


Loss coefficient found from data exported into Excel

The cells highlighted in gray contain


the information that was in the
original .csv file exported by
Workbench.
Additional cells were created to
produce the chart and determine K

Introduction
20

2016 ANSYS, Inc.

Parameters

Design Points

Example

Summary

April 12, 2016

Summary
Parameters and Design Points in Workbench make it easy to define
and execute parametric studies and what-if scenarios
From the project level, with automatic execution
Parameters represent key simulation properties
A design point is a set of parameters representing one design
alternative
Fluent allows both input and output parameters to be defined
Can be used as inputs for parametric studies
Can also be used to view key results without having to open Fluent
Output parameter values displayed in Workbench
Can also be used to help manage inputs in cases with large numbers of
boundaries
Introduction

2016 ANSYS, Inc.

2016 ANSYS, Inc.

21

Parameters

Design Points

Example

Summary

April 12, 2016

17.0 Release

Module 07: Turbulence


Introduction to ANSYS Fluent

April 12, 2016

Introduction
Lecture Theme:
The majority of engineering flows are turbulent. Simulating turbulent flows in Fluent requires
activating a turbulence model, selecting a near-wall modeling approach and providing inlet
boundary conditions for the turbulence model.

Learning Aims:
You will learn:
How to use the Reynolds number to determine whether the flow is turbulent
How to select a turbulence model
How to choose which approach to use for modeling flow near walls
How to specify turbulence boundary conditions at inlets
Learning Objectives:
You will be able to determine whether a flow is turbulent and be able to set up and solve
turbulent flow problems.
Introduction

Reynolds Number

2016 ANSYS, Inc.

Models

Near-Wall Treatments

Inlet BCs

Summary

April 12, 2016

Observation by Osborne Reynolds


Flows can be classified as either :

Laminar
(Low Reynolds Number)

Transitional
(Increasing Reynolds Number)

Turbulent
(Higher Reynolds Number)
Introduction
3

Reynolds Number

2016 ANSYS, Inc.

Models

Near-Wall Treatments

Inlet BCs

Summary

April 12, 2016

Reynolds Number
The Reynolds number is the criterion used to determine whether the flow is
laminar or turbulent
U .U .L

Re L

The Reynolds number is based on the length scale of the flow:

x, d, d hyd, etc.

Transition to turbulence varies depending on the type of flow:


External flow
along a surface
: ReX > 500 000
around on obstacle : ReL > 20 000
: ReD > 2 300
Internal flow
Introduction

Reynolds Number

2016 ANSYS, Inc.

Models

Near-Wall Treatments

Inlet BCs

Summary

April 12, 2016

Overview of Computational Approaches


Three basic approaches can be used to calculate a turbulent flow
(Large Eddy Simulation)

(Direct Numerical Simulation)

LES

DNS

Numerically solving the full unsteady


Navier-Stokes equations
Resolves the whole spectrum of
scales
No modeling is required
But the cost is too prohibitive!
Not practical for industrial flows!
Introduction
5

Reynolds Number

2016 ANSYS, Inc.

RANS
(Reynolds Averaged NavierStokes Simulation)

All turbulent motion is modeled

Some turbulence is directly resolved

Solve time-averaged N-S equations

Solves the filtered N-S equations

Less expensive than DNS, but the


For most problems the time-averaged flow
efforts and computational resources
(and level of turbulence) are all that is
needed are still too large for most
needed
practical applications
Many different models are available
Available in Fluent but not discussed in
This is the most widely used approach for
Introductory Training
industrial flows
Models

Near-Wall Treatments

Inlet BCs

Summary

April 12, 2016

Turbulence Models Available in Fluent

RANS based
models

One-Equation Model
Spalart-Allmaras
Two-Equation Models
k family (Standard, RNG, Realizable*)
k family (Standard, BSL, SST*)
Reynolds Stress Models

Increase in
Computational
Cost
Per Iteration

Transition Models
kkl, Transition SST and Intermittency Models
Detached Eddy Simulation
* SST k-Z and Realizable k-H are
recommended choices for standard cases
Large Eddy Simulation
Introduction
2016 ANSYS, Inc.

Reynolds Number

Models

Near-Wall Treatments

Inlet BCs

Summary

April 12, 2016

Turbulence Model Selection: A Practical Approach


Fluent offers the choice of many turbulence models

Some are used only for very specific applications


Consider advanced training to learn more about the details of
each model

For getting started


The Realizable k-HH or SST k-Z models are recommended choices for
standard cases
Where highly accurate resolution of boundary layers is critical, such
as applications involving flow separation or finely resolved heat
transfer profiles, SST k-Z is preferred
If only a crude estimate of turbulence is required, the standard k-H
model can be used
This might occur in problems where the solution depends more
strongly on other physical models or modeling assumptions than
on the turbulence model
Introduction
7

2016 ANSYS, Inc.

Reynolds Number

Models

Near-Wall Treatments

Inlet BCs

Summary

April 12, 2016

Turbulent Boundary Layer Profiles


Near to a wall, in the boundary layer, the velocity changes rapidly.
Velocity, U
Distance from Wall, y

If we plot the same graph again, where:


Log scale axes are used
The velocity is made dimensionless, from U/UW where

The wall distance is made dimensionless:


Then we arrive at the graph on the next page. The shape of this is
generally the same for all flows:
Introduction
2016 ANSYS, Inc.

Reynolds Number

Models

Near-Wall Treatments

Inlet BCs

Summary

April 12, 2016

Dimensionless Boundary Layer Profiles


By scaling the variables near the wall the velocity profile data takes on a
predictable form
Using the non-dimensional
velocity and non-dimensional
distance from the wall results
in a predictable boundary
layer profile for a wide range
of flows

Introduction
9

2016 ANSYS, Inc.

Reynolds Number

Lin
Linear,
u + = y+
Logarithmic, u+ = 2.5 ln(y+) + 5.45
Log
As the system Reynolds number
increases, the logarithmic region
extends to higher values of y+

Models

Near-Wall Treatments

Inlet BCs

Summary

April 12, 2016

10

Turbulent Boundary Layer Regions


Looking more closely at the plot from the
previous slide, distinct regions can be identified
based on the form of the dimensionless
velocity profile (e.g. linear or logarithmic)
For CFD, the most important are the viscous
sublayer, immediately adjacent to the wall and
the log-layer, slightly further away from the
wall
Different turbulence models require different
inputs depending on whether the simulation
needs to resolve the viscous sublayer with the
mesh

u+ = 2.5 ln(y+) + 5.45

u+ = y +

This is an important consideration in turbulent flow


simulation
Introduction
2016 ANSYS, Inc.

Reynolds Number

Models

Near-Wall Treatments

Inlet BCs

Summary

April 12, 2016

Wall Modeling Strategies


In the near-wall region, the solution gradients are very high, but accurate calculations in
the near-wall region are paramount to the success of the simulation. The choice is
between:
A) Using Wall Functions
B) Resolving the Viscous Sublayer

(details on next slide)

Introduction
11

2016 ANSYS, Inc.

Reynolds Number

Models

Near-Wall Treatments

Inlet BCs

Summary

April 12, 2016

12

Wall Modeling Strategies: Using Wall Functions


Using Wall Functions
Wall functions utilize the predictable dimensionless boundary layer profile shown on slides 9 & 10 to determine
conditions at the wall (e.g. shear stress) from conditions (velocity, wall distance) at the centroid of the wall
adjacent mesh cell
This means the cell should be located in the log-layer
To locate the first cell in the log-layer, it should typically have a y+ value such that
30 < y+ < 300
This is a very general guideline, not an absolute rule

for very high Re, y+ can be higher if still in log layer and for very low (but still turbulent) Re, the log-layer may not extend
far enough away from the wall for the use of wall functions to be valid
Wall functions should never be used if y+ < 30

Generally speaking, this is the approach if you are more interested in the mixing in the middle of the domain,
rather than the forces on the wall

Introduction
2016 ANSYS, Inc.

Reynolds Number

Models

Near-Wall Treatments

Inlet BCs

Summary

April 12, 2016

Wall Modeling Strategies: Resolving the Viscous Sublayer


Resolving the Viscous Sublayer

First grid cell needs to be at about y+ 1 and a prism layer mesh with growth rate no higher than 1.2
should be used
These are not magic numbers this guideline ensures the mesh will be able to adequately resolve
gradients in the sublayer
This will add significantly to the mesh count (see next slide)
Generally speaking, if the forces or heat transfer on the wall are key to your simulation (aerodynamic
drag, turbomachinery blade performance, heat transfer) this is the approach you will take and the
recommended turbulence model for most cases is SST k-Z

Introduction
13

2016 ANSYS, Inc.

Reynolds Number

Models

Near-Wall Treatments

Inlet BCs

Summary

April 12, 2016

14

Mesh Resolution Near the Wall


Fewer nodes are needed normal to the wall when logarithmic-based wall functions are
used (compared to resolving the viscous sublayer with the mesh)
y

Logarithmic-based Wall functions


used to resolve boundary layer

Viscous sublayer resolving approach


used to resolve boundary layer

Boundary layer First node wall distance is reflected by y+ value


Introduction

Reynolds Number

2016 ANSYS, Inc.

Models

Near-Wall Treatments

Inlet BCs

Summary

April 12, 2016

Example in Predicting Near-wall Cell Size


During the pre-processing stage, you will need to know a suitable size for the first layer of grid cells
(inflation layer) so that Y+ is in the desired range

The actual flow-field will not be known until you have computed the solution (and indeed it is
sometimes unavoidable to have to go back and remesh your model on account of the computed Y+
values)
To reduce the risk of needing to remesh, you may want to try and predict the cell size by
performing a hand calculation at the start, for example:
Air at 20 m/s

The question is what height (y)


should the first row of grid cells be.
We will use SWF, and are aiming for
Y+ | 50

U = 1.225 kg/m3
P = 1.8x10-5 kg/ms

Flat plate, 1m long

For a flat plate, Reynolds number ( Rel

UVL
)
P

gives Rel = 1.4x106

Recall from earlier slide, flow over a surface is turbulent when ReL > 5x105
Introduction
15

Reynolds Number

2016 ANSYS, Inc.

Models

Near-Wall Treatments

Inlet BCs

Summary

April 12, 2016

Calculating Wall Distance for a Given y+


Begin with the definition of y+ and rearrange:

U UW y
yP
y
y
P
UW U
The target y+ value and fluid properties are known,
so we need UW, which is defined as:

UW

Re is known, so use the definitions to


calculate the first cell height
C f 0.058 Rel0.2 .0034

Ww

Ww
U

The wall shear stress ,Ww ,can be found from the skin
friction coefficient, Cf:

UW

1
2

C f UU f2

Ww
U

0.83 kg/ m s 2

0.82 m/s

We know we are aiming for y+ of 50, hence:

2
W w 1 C f UU f
2
A literature
search suggests a formula for the skin
friction on a plate1 thus:

1 An

yP
UW U

9x10 -4 m

our first cell height y should be


approximately 1 mm.

C f 0.058 Rel0.2
equivalent formula for internal flows, with Reynolds number based on the pipe diameter is Cf = 0.079 Red-0.25
Introduction

16

2016 ANSYS, Inc.

Reynolds Number

Models

Near-Wall Treatments

Inlet BCs

Summary

April 12, 2016

Limitations of Wall Functions


In some situations, such as boundary layer separation, logarithmic-based wall functions do
not correctly predict the boundary layer profile

Wall functions applicable

Wall functions not applicable


Non-equilibrium wall functions have been developed in Fluent to
address this situation but they are very empirical. Resolving the
viscous sublayer with the mesh is recommended if affordable

In these cases logarithmic-based wall functions should not be used


Instead, directly resolving the viscous sublayer with the mesh can provide accurate results
Introduction
17

2016 ANSYS, Inc.

Reynolds Number

Models

Near-Wall Treatments

Inlet BCs

Summary

April 12, 2016

18

Turbulence Settings for Near Wall Modeling


If the viscous sublayer is being resolved
Use k-Z models or k-H models with Enhanced Wall Treatment
(EWT)
No separate input is needed for k-Z models

If wall functions are used


Use k-H models with wall functions
EWT can also be used because it is a y+ insensitive method
and will act like a wall function if the first grid point is in
the log-layer
For k-Z models
The k-Z models utilize a y+ insensitive wall treatment and
will act like a wall function if the first grid point is in the log
layer
However, the advantages of these models may be lost
when a coarse near-wall mesh is used
Introduction
2016 ANSYS, Inc.

Reynolds Number

Models

Near-Wall Treatments

Inlet BCs

Summary

April 12, 2016

Inlet Boundary Conditions


When turbulent flow enters a domain at inlets or outlets (backflow), boundary conditions
must be given for the turbulence model variables
Four methods for specifying turbulence boundary conditions:
1) Turbulent intensity and viscosity ratio (default)
Default values of turbulent intensity = 5% and turbulent viscosity ratio = 10 are reasonable
for cases where you have no information about turbulence at an inlet
2) Turbulent intensity and length scale
Length scale is related to size of large eddies that contain most of energy
For boundary layer flows: l | 0.499
For flows downstream of grid: l | opening size
3) Turbulent intensity and hydraulic diameter (primarily for internal flows)
4) Explicitly input k, , , or Reynolds stress components (this is the only method that
allows for profile definition)
Introduction
19

2016 ANSYS, Inc.

Reynolds Number

Models

Near-Wall Treatments

Inlet BCs

Summary

April 12, 2016

20

Guidelines for Inlet Turbulence Conditions


If you have absolutely no idea of the turbulence levels in your simulation, you could use
following values of turbulence intensities and viscosity ratios:
Normal turbulent intensities range from 1% to 5%
The default turbulent intensity value 5% is sufficient for nominal turbulence through a
circular inlet, and is a good estimate in the absence of experimental data
For external flows, turbulent viscosity ratio of 1-10 is typically a good value
For internal flows, turbulent viscosity ratio of 10-100 it typically a good value
For fully developed pipe flow at Re = 50,000, the turbulent viscosity ratio is around
100

Introduction
2016 ANSYS, Inc.

Reynolds Number

Models

Near-Wall Treatments

Inlet BCs

Summary

April 12, 2016

Summary Turbulence Modeling Guidelines


To perform a turbulent flow calculation in Fluent
Calculate the Reynolds number and determine whether flow is turbulent.
Decide on a near-wall modeling strategy
The choices are A) Resolve the viscous sublayer or B) Use wall functions
Create the mesh with y+ suitable for the selected approach
Choose turbulence model and near wall treatment (if necessary) in the Viscous Models panel
Realizable k-H or SST k-Z are recommended choices for standard cases
SST k-Zis preferred for cases where the viscous sublayer needs to be resolved (flow separation,
detailed heat transfer)

Set reasonable boundary conditions for the turbulence model variables

Introduction
21

2016 ANSYS, Inc.

Reynolds Number

Models

Near-Wall Treatments

Inlet BCs

Summary

April 12, 2016

22

2016 ANSYS, Inc.

Appendix

April 12, 2016

RANS Turbulence Model Descriptions

Reynolds stresses are solved directly using transport equations, avoiding isotropic viscosity assumption of other models. Use for highly swirling
flows. Quadratic pressure-strain option improves performance for many basic shear flows.

RSM

A variant of the standard k model. Combines the original Wilcox model for use near walls and the standard k model away from walls using a
blending function. Also limits turbulent viscosity to guarantee that T ~ k.

SST k

A two-transport-equation model solving for k and , the specific dissipation rate ( / k) based on Wilcox (1998). This is the default k model.
Demonstrates superior performance to k models for wall-bounded and low Reynolds number flows. Options account for low Reynolds number
effects, free shear, and compressible flows.

Standard k

A variant of the standard k model. Its realizability stems from changes that allow certain mathematical constraints to be obeyed which
ultimately improves the performance of this model.

Realizable k

A variant of the standard k model. Equations and coefficients are analytically derived. Significant changes in the equation improves the
ability to model highly strained flows. Additional options aid in predicting swirling and low Reynolds number flows.

RNG k

The baseline two-transport-equation model solving for k and . This is the default k model. Coefficients are empirically derived; valid for fully
turbulent flows only. Options to account for viscous heating, buoyancy, and compressibility are shared with other k models.

Standard k

A single transport equation model solving directly for a modified turbulent viscosity. Designed specifically for aerospace applications involving
wall-bounded flows on a fine near-wall mesh. Fluents implementation allows the use of coarser meshes. Option to include the strain rate in the
production term improves predictions of vortical flows.

Spalart
Allmaras

Description

Model

* Realizable k-H or SST k-Z are the recommended choice for standard cases
23

2016 ANSYS, Inc.

April 12, 2016

24

RANS Turbulence Model Usage

Physically the most sound RANS model. Avoids isotropic eddy viscosity assumption. More CPU time and memory required. Tougher to
converge due to close coupling of equations. Suitable for complex 3D flows with strong streamline curvature, strong swirl/rotation (e.g.
curved duct, rotating flow passages, swirl combustors with very large inlet swirl, cyclones).

RSM

Similar to SST k-Z. Good for some complex flows if SST model is overpredicting flow separation

BSL k

Offers similar benefits as standard k. Not overly sensitive to inlet boundary conditions like the standard k. Provides more accurate
prediction of flow separation than other RANS models.

SST k*

Superior performance for wall-bounded boundary layer, free shear, and low Reynolds number flows compared to models from the k-H
family. Suitable for complex boundary layer flows under adverse pressure gradient and separation (external aerodynamics and
turbomachinery). Separation can be predicted to be excessive and early.

Standard k

Offers largely the same benefits and has similar applications as Realizable. Possibly harder to converge than Realizable.

RNG k

Suitable for complex shear flows involving rapid strain, moderate swirl, vortices, and locally transitional flows (e.g. boundary layer
separation, massive separation, and vortex shedding behind bluff bodies, stall in wide-angle diffusers, room ventilation).

Realizable k*

Robust. Widely used despite the known limitations of the model. Performs poorly for complex flows involving severe pressure gradient,
separation, strong streamline curvature. Suitable for initial iterations, initial screening of alternative designs, and parametric studies.

Standard k

Economical for large meshes. Good for mildly complex (quasi-2D) external/internal flows and boundary layer flows under pressure
gradient (e.g. airfoils, wings, airplane fuselages, missiles, ship hulls). Performs poorly for 3D flows, free shear flows, flows with strong
separation.

Spalart-Allmaras

Behavior and Usage

Model

* Realizable k-H or SST k-Z are the recommended choice for standard cases
2016 ANSYS, Inc.

April 12, 2016

Example #1 Turbulent Flow Past a Blunt Flat Plate


Turbulent flow past a blunt flat plate was simulated using four different
turbulence models.
8,700 cell quad mesh, graded near leading edge and reattachment location.
Non-equilibrium boundary layer treatment
xR

U0

ReD

50,000

Reattachment point

Recirculation zone

N. Djilali and I. S. Gartshore (1991), Turbulent Flow Around a Bluff Rectangular Plate, Part
I: Experimental Investigation, JFE, Vol. 113, pp. 5159.
25

2016 ANSYS, Inc.

April 12, 2016

26

Example #1 Turbulent Flow Past a Blunt Flat Plate


0.70

Contours of Turbulent Kinetic Energy (m2/s2)

0.63
0.56

Standard k

RNG k

0.49
0.42
0.35
0.28
0.21
0.14

Realizable k

Reynolds Stress

0.07
0.00

The standard k-H model greatly overpredicts the production of turbulence at stagnation
points, which can lead to qualitatively inaccurate predictions, as seen on the next slide.
2016 ANSYS, Inc.

April 12, 2016

Example #1 Turbulent Flow Past a Blunt Flat Plate


Predicted separation bubble:
Skin
Friction
Coefficient
Cf 1000

Standard k (SKE)

Realizable k (RKE)
Distance Along Plate, x / D

SKE severely underpredicts the size of the


separation bubble, while RKE predicts the
size exactly.
27

2016 ANSYS, Inc.

Experimentally observed reattachment


point is at x / D = 4.7

April 12, 2016

28

Example #2 : Pipe Expansion with Heat Transfer


Reynolds Number ReD= 40750
Fully Developed Turbulent Flow at Inlet
Experiments by Baughn et al. (1984)

q"=const

q"=0
D
d

Inlet

Outlet

axis
40 x H

H
2016 ANSYS, Inc.

April 12, 2016

Example #2 : Pipe Expansion with Heat Transfer


Plot shows dimensionless distance versus Nusselt Number
Best agreement is with SST and k-omega models which do a better job of capturing flow
recirculation zones accurately

29

2016 ANSYS, Inc.

April 12, 2016

Example #3 Turbulent Flow in a Cyclone


40,000-cell hexahedral mesh

0.1 m

0.12 m

High-order upwind scheme was used.


Computed using SKE, RNG, RKE and RSM
(second moment closure) models with the
standard wall functions

Uin = 20 m/s

0.2 m
0.97 m

Represents highly swirling flows (Wmax = 1.8 Uin)

30

2016 ANSYS, Inc.

April 12, 2016

Example #3 Turbulent Flow in a Cyclone


Tangential velocity profile predictions at 0.41 m below the vortex finder
The cyclone is dominated by strongly
swirling flow. The Reynolds stresses
become anisotropic in swirling flows.
Two equation turbulence models such
as k-H and k-Z based models assume
that turbulence is always isotropic
and thus the accuracy of these
models suffers in swirling flows. The
Reynolds stress model makes no
assumption of isotropic behavior and
is thus better suited for applications
where swirl is the dominant flow
feature

31

2016 ANSYS, Inc.

April 12, 2016

32

Example 4: Diffuser
Shear Stress Transport (SST) Model
It accounts more accurately for the transport of the turbulent shear stress, which
improves predictions of the onset and the amount of flow separation compared to k-H
models
Standard k-H fails to predict separation

SST result and experiment

Experiment Gersten et al.

2016 ANSYS, Inc.

April 12, 2016

Turbulent Flow Characteristics


Turbulent flow characteristics :
Unsteady, three-dimensional, irregular, stochastic motion in which transported quantities (mass,
momentum, scalar species) fluctuate in time and space
Enhanced mixing of these quantities results from the fluctuations
Unpredictability in detail
Turbulent flows contain a wide range of eddy sizes
Large scale coherent structures are different in each flow, whereas small eddies are more
universal

33

2016 ANSYS, Inc.

April 12, 2016

Energy Cascade
Energy is transferred from larger eddies to smaller eddies
Larger eddies contain most of the energy
In the smallest eddies, turbulent energy is converted to internal energy by viscous
dissipation

Energy Cascade Richardson


(1922), Kolmogorov (1941)

34

2016 ANSYS, Inc.

April 12, 2016

Backward Facing Step


As engineers, in most cases we do not actually need to see an exact snapshot of the
velocity at a particular instant.
Instead for most problems, knowing the time-averaged velocity (and intensity of the
turbulent fluctuations) is all we need to know. This gives us a useful way to approach
modelling turbulence.
Instantaneous velocity contours

Time-averaged velocity contours

35

2016 ANSYS, Inc.

April 12, 2016

Mean and Instantaneous Velocities


If we recorded the velocity at a particular point in the real (turbulent) fluid flow,
the instantaneous velocity (U) would look like this:
u cFluctuating velocity
Velocity

U Time-average of velocity

U Instantaneous velocity

Time

At any point in time: U

U  uc

The time average of the fluctuating velocity must be zero: uc

BUT, the RMS of u c is not necessarily zero: uc 2 z 0


The turbulent energy, k, is given by the fluctuating velocity components as:k

36

2016 ANSYS, Inc.

1 2
uc  vc2  wc2
2

April 12, 2016

RANS Modeling : Averaging


After decomposing the velocity into mean and instantaneous parts and timeaveraging, the instantaneous Navier-Stokes equations may be rewritten as the
Reynolds-averaged Navier-Stokes (RANS) equations:
wu
wui
U i  u
k

wxk
wt

wp
w wui w Rij
 wx  wx P wx  wx
i
j
j
j

Rij

Uuicucj

(Reynolds stress tensor)

The Reynolds stresses are additional unknowns introduced by the averaging


procedure, hence they must be modeled (related to the averaged flow quantities) in
order to close the system of governing equations
6

37

2016 ANSYS, Inc.

unknowns

Rij

 U uicucj




U
u
'
U
u
'
v
'
U
u
'
w
'

 U u ' v '  U v '2  U v ' w '

 U u ' w '  U v ' w '  U w '2

April 12, 2016

RANS Modeling : The Closure Problem


The Reynolds Stress tensor Rij Uuicucj must be solved
The RANS equations can be closed in two ways:
Reynolds-Stress Models (RSM)
Eddy Viscosity Models
Rij is directly solved via transport equations
(modeling is still required for many terms in the
transport equations)

w
w
Uuicucj 
U uk uicucj
wt
wxk

Pij  Fij  DijT  ) ij  Hij

Boussinesq hypothesis
Reynolds stresses are modeled using an eddy (or
turbulent) viscosity, T

Rij

U uicucj

wu wu j 2 wu
2

PT i 
 P T k Gij  U k Gij

3
wx j wxi 3 wxk

RSM is advantageous in complex 3D turbulent flows with


The hypothesis is reasonable for simple turbulent shear flows:
large streamline curvature and swirl, but the model is more
boundary layers, round jets, mixing layers, channel flows, etc.
complex, computationally intensive, more difficult to
converge than eddy viscosity models
Note: All turbulence models contain empiricism
Equations cannot be derived from fundamental principles
Some calibrating to observed solutions and intelligent guessing is contained in the models
38

2016 ANSYS, Inc.

April 12, 2016

Two-Equation Models
Two transport equations are solved, giving two independent scales
for calculating Pt
Virtually all use the transport equation for the turbulent kinetic energy, k
w
wx j

Dk
U
Dt

P
P  t

Vk

wk

wx j

 P  UH ;

production

Pt S 2 ( ske)

2Sij Sij

dissipation

Several transport variables have been proposed, based on dimensional arguments, and used for
second equation. The eddy viscosity Pt is then formulated from the two transport variables.
Kolmogorov, Z:
Pt v Uk / Z, l v k1/2 / Zk v H / Z
Z is specific dissipation rate
defined in terms of large eddy scales that define supply rate of k
Chou, H:
P v Uk2 / H, l v k3/2 / H
t
Rotta, l:
Pt v Uk1/2l, H v k3/2 / l

39

2016 ANSYS, Inc.

April 12, 2016

40

Standard k-HH Model Equations


k-transport equation
kU

Dk
Dt

w
wx j

P
P  t

Vk

HH-transport
equation
DH
U
Dt

w
wx j

P
P  t

VH

coefficients
V k , V H , CiH , CH 2
turbulent viscosity

2016 ANSYS, Inc.

wk
2

 Pt S  UH ;

wx j
production

2 Sij Sij

dissipation

wH H

C1H P t S 2  UC2H H


k
wx j

inverse time scale


Empirical constants determined from benchmark
experiments of simple flows using air and water.0

Pt

U CP

k2

April 12, 2016

RANS : EVM :Standard k (SKE) Model


The Standard K-Epsilon model (SKE) is the most widely-used engineering turbulence
model for industrial applications
Model parameters are calibrated by using data from a number of benchmark
experiments such as pipe flow, flat plate, etc.
Robust and reasonably accurate for a wide range of applications
Contains submodels for compressibility, buoyancy, combustion, etc.
Known limitations of the SKE model:
Performs poorly for flows with larger pressure gradient, strong separation, high swirling
component and large streamline curvature.
Inaccurate prediction of the spreading rate of round jets.
Production of k is excessive (unphysical) in regions with large strain rate (for example,
near a stagnation point), resulting in very inaccurate model predictions.

41

2016 ANSYS, Inc.

April 12, 2016

42

RANS : EVM: Realizable k-epsilon


Realizable k (RKE) model (Shih):
Dissipation rate () equation is derived from the mean-square vorticity fluctuation, which is
fundamentally different from the SKE.
Several realizability conditions are enforced for Reynolds stresses.
Benefits:
Accurately predicts the spreading rate of both planar and round jets
Also likely to provide superior performance for flows involving rotation, boundary layers
under strong adverse pressure gradients, separation, and recirculation

OFTEN PREFERRED TO STANDARD K-EPSILON.

2016 ANSYS, Inc.

April 12, 2016

RANS : EVM : Spalart-Allmaras (S-A) Model


Spalart-Allmaras is a low-cost RANS model solving a single transport equation for a
modified eddy viscosity
Designed specifically for aerospace applications involving wall-bounded flows
Has been shown to give good results for boundary layers subjected to adverse pressure gradients.
Used mainly for aerospace and turbomachinery applications

Limitations:
The model was designed for wall bounded flows and flows with mild separation and recirculation.
No claim is made regarding its applicability to all types of complex engineering flows.

43

2016 ANSYS, Inc.

April 12, 2016

44

k-omega Models
In k-Z
Z models, the transport equation for the turbulent dissipation rate, H, is replaced
with an equation for the specific dissipation rate, Z
The turbulent kinetic energy transport equation is still solved

k-Z models have gained popularity in recent years mainly because:


Much better performance than k-H models for boundary layer flows
For separation, transition, low Re effects, and impingement, k-Z models are more accurate than k-H models

Accurate and robust for a wide range of boundary layer flows with pressure gradient

Two variations of the k-Z model are available in Fluent


Standard k-Z model (Wilcox, 1998)
SST k-Z model (Menter)

2016 ANSYS, Inc.

April 12, 2016

k-omega Model
k-Z
Z models are RANS two-equations based models
D U

Pt

U uicucj

Rij

DZ
Dt

Dk
Dt

wu
wu j
i
PT


wxi
wx j

 2 P T wuk Gij  2 U k Gij

wxk
3
3

wui
Pt wk
w




W ij
U
E
Z
P
f
k

E
wx j
wx j
V k wx j

wui
Pt wZ
w
Z
2



U
E
P
f

E Z 
wx j
wx j
V Z wx j

= specific dissipation rate

Z|

W ij

H
1
v
k
W

One of the advantages of the k-Z formulation is the near wall treatment for lowReynolds number computations
designed to predict correct behavior when integrated to the wall
the k-Z
k Z models switches between a viscous sublayer formulation (i.e. direct resolution of the boundary layer) at low y+ values and
ka wall function approach at higher y+ values

while k-H model variations require Enhanced Wall Treatment to capture correct viscous sublayer behavior

45

2016 ANSYS, Inc.

April 12, 2016

46

SST Model
Shear Stress Transport (SST) Model

The SST model is a hybrid two-equation model that combines the advantages of both k-H and
k-Z models

The k-Z model performs much better than k-H models for boundary layer flows
Wilcox original k-Z model is overly sensitive to the freestream value (BC) of Z, while the k-H model is not prone to
such problems

k-H
k-Z
Wall

The k-H and k-Z models are blended such that the SST model functions like the k-Z close to the wall and the k-H model in
the freestream

SST is a good compromise between k-HH and k-Z models


2016 ANSYS, Inc.

April 12, 2016

RANS: Other Models in Fluent


RNG k-HH model
Model constants are derived from renormalization group (RNG) theory instead of empiricism
Advantages over the standard k-H model are very similar to those of the RKE model

Reynolds Stress model (RSM)


Instead of using eddy viscosity to close the RANS equations, RSM solves transport equations for the individual
Reynolds stresses
7 additional equations in 3D, compared to 2 additional equations with EVM.
Much more computationally expensive than EVM and generally very difficult to converge
As a result, RSM is used primarily in flows where eddy viscosity models are known to fail
These are mainly flows where strong swirl is the predominant flow feature, for instance a cyclone

47

2016 ANSYS, Inc.

April 12, 2016

48

Enhanced Wall Treatment (EWT)


Need for y+ insensitive wall treatment

EWT smoothly varies from low-Re to


wall function with mesh resolution
EWT available for k-H and RSM models
Similar approach implemented for k-Z
equation based models, and for the
Spalart-Allmaras model
The term "y+ insensitive wall treatment" does not mean the results will be identical
no matter what the value of y+ is at the wall-adjacent cell. It means that as you
refine the mesh, the solution will tend gradually towards grid independence. This is
in contrast to wall functions, where the solution can be extremely sensitive to y+
values and grid independent solutions can be difficult to achieve.
2016 ANSYS, Inc.

April 12, 2016

y+ for the SST and k-omega Models


The SST and k-Z
Z models were formulated to be near-wall resolving models
where the viscous sublayer is resolved by the mesh
To take full advantage of this formulation, y+ should be 1
This is necessary for accurate prediction of flow separation
These models can still be used with a coarser near-wall mesh and produce
valid results, within the limitations of logarithmic wall functions
The first grid point should still be in the logarithmic layer (y+ < 300 for most
flows)
Many advantages of these models may be lost when a coarse near-wall
mesh is used
49

2016 ANSYS, Inc.

April 12, 2016

Turbulent Scales Related to k and H


Characteristics of the Turbulent Structures:
Length scale : l [m]
Velocity scale :
Time scale

k [m/s]
l
k

[s]

- Turbulent kinetic energy :

1 2
u '  v '2  w '2
2

- Turbulent kinetic energy dissipation :

[m2/s3]

- Turbulent Reynolds : Ret = k1/2l/Q ~ k2/QH


- Turbulent Intensity :

2016 ANSYS, Inc.

2016 ANSYS, Inc.

50

uc 1 2 k
|
U U 3

ui x, t

U i x, t  uic x, t

Instantaneous Time-average
component
component

Fluctuating
component

[m2/s2]

~ k3/2/l (dimensional analysis)

[-]
[-]

April 12, 2016

17.0 Release

Module 08: Heat Transfer


Introduction to ANSYS Fluent

April 12, 2016

Introduction
Lecture Theme:
Heat transfer has broad applications across all industries. All modes of heat transfer
(conduction, convection forced and natural, radiation) can be modeled in Fluent and solution
data can be used as input for one-way thermal FSI simulations.

Learning Aims:
You will learn:
How to treat conduction, convection (forced and natural) and radiation heat transfer in
Fluent
How to set wall thermal boundary conditions
How to export solution data for use in a thermal stress analysis (one-way FSI)
Learning Objectives:
You will be familiar with Fluents heat transfer modeling capabilities and be able to set up and
solve problems involving all modes of heat transfer
Introduction
2016 ANSYS, Inc.

Overview

Wall BCs

Applications

1-way Thermal FSI

Summary

April 12, 2016

Heat Transfer Modeling in Fluent


All modes of heat transfer can be taken into account with
CFD simulation :
Conduction
Convection (forced and natural)
Radiation

Numerous processes can be included as appropriate

Interphase energy source (phase change)


Fluid-solid conjugate heat transfer
Viscous dissipation
Species diffusion

To model heat transfer, activate the energy equation


Select Energy in the Models group of the Setting Up Physics tab

Introduction
3

2016 ANSYS, Inc.

Overview

Wall BCs

Applications

1-way Thermal FSI

Summary

April 12, 2016

Convection Heat Transfer


As a fluid moves, it carries heat with it this is called convection
Thus, heat transfer is coupled to the fluid flow solution
Energy + Fluid flow equations activated means Convection is computed
Conduction also solved in fluid when Energy activated
Additionally:
The rate of heat transfer depends
strongly on the fluid velocity
Fluid properties may vary significantly
with temperature (e.g., air)
At walls, the heat transfer coefficient is
computed by the turbulent thermal wall
functions
Introduction
2016 ANSYS, Inc.

Overview

Wall BCs

Tf

Tbody

h
Applications

h (Tbody  Tf )

h 'T

average heat transfer coefficient (W/m2-K)


1-way Thermal FSI

Summary

April 12, 2016

Conduction Heat Transfer


Conduction heat transfer is governed by Fouriers Law
Fluent computes conduction in all fluid and solid zones when the energy
equation is activated

Fouriers law states that the heat transfer rate is directly


proportional to the gradient of temperature

Mathematically, qconduction

k T

The constant of proportionality is the thermal


conductivity (k)
k may be a function of temperature, space, etc.
for isotropic materials, k is a constant value
for anisotropic materials, k is a matrix
Introduction
5

2016 ANSYS, Inc.

Overview

Wall BCs

Applications

1-way Thermal FSI

Summary

April 12, 2016

Thermal Wall Boundary Conditions


Thermal conditions at Walls:
Constant Heat Flux or Temperature
Convection, Radiation, Mixed Simulates an external
environment that is not modeled using user-prescribed
heat transfer coefficient and/or external emissivity
and radiation temperature

qconv

hext (Text  Tw )

hext (Text  Tw )  H ext V (Tf4  Tw4 )

qmixed

H ext V (Tf4  Tw4 )

qrad

Via System Coupling Can be used when Fluent is coupled


with another system in Workbench using System Couplings
Via System Coupling Used with certain kinds of
non-conformal interfaces
Introduction
2016 ANSYS, Inc.

Overview

Wall BCs

Applications

1-way Thermal FSI

Summary

April 12, 2016

Modeling Heat Transfer in Walls


It is often important to model the thermal effects of the wall bounding the fluid but it may
not be necessary to mesh it.
Option 1
Mesh the wall in the pre-processor
Assign it as a solid cell zone
This is the most thorough approach

Fluid

Solid
Heat can flow in all directions

Option 2:
Just mesh the fluid region
Specify a wall thickness
Wall conduction will be accounted for

Fluid

Solid
Heat transfer normal to wall

Option 3:
As option 2, but enable Shell Conduction
1 or more layers of virtual cells will be created

Introduction
7

2016 ANSYS, Inc.

Overview

Wall BCs

Applications

Fluid
Solid
Heat can flow in all directions
1-way Thermal FSI

Summary

April 12, 2016

Managing Shell Conduction Walls

From Shell Conduction Manager, all


shell conduction boundaries can be
managed in one panel
It is still possible to define shell conduction in the
boundary conditions panel for individual walls

Select more than one zone in Shell


Conduction Zones to efficiently apply
identical settings to different walls
Also possible to read and write shell conduction
settings in .csv format
Especially useful for models with a large number
of shell conduction walls
Introduction
2016 ANSYS, Inc.

Overview

Wall BCs

Applications

1-way Thermal FSI

Summary

April 12, 2016

Conjugate Heat Transfer (CHT)


At a wall between a fluid and a solid zone or a wall with fluid on both sides, a wall /
wall_shadow is created automatically by Fluent while reading the mesh file
By default, the Coupled boundary condition automatically balances energy on the two sides of the walls
Possible, but uncommon, to uncouple and to specify different thermal conditions on each side

Coolant Flow Past Heated Rods


Grid

Velocity Vectors

Temperature Contours
Introduction
9

2016 ANSYS, Inc.

Overview

Wall BCs

Applications

1-way Thermal FSI

Summary

April 12, 2016

10

Natural Convection
Natural convection occurs when fluid density is
temperature dependent and heat is added to fluid
Flow is induced by gravitational force acting on density
differences
When gravity is activated in Fluent, the pressure gradient
and body force terms in the momentum equation are
rewritten as
with
The transformation avoids roundoff error when gravity is enabled
Important for Fluent because p' is used for boundary conditions and results
Introduction
2016 ANSYS, Inc.

Overview

Wall BCs

Applications

1-way Thermal FSI

Summary

April 12, 2016

User Inputs for Natural Convection


Define Gravity in the Operating Conditions panel

Choose a temperature dependent density model in the


Materials panel
Most common are Boussinesq (valid for small 'T, see Appendix) and
incompressible ideal gas (any 'T)
For liquids with large 'T, use piecewise linear or polynomial

If using Boussinesq, set the operating temperature


Operating density is ignored

If using any other density model, set the operating


density
Operating temperature is ignored
Strongly recommended to explicitly specify the density at ambient
temperature (see Appendix)
Introduction
11

2016 ANSYS, Inc.

Overview

Wall BCs

Applications

1-way Thermal FSI

Summary

April 12, 2016

Radiation
Radiative heat transfer is a mode of energy transfer where the energy is transported via
electromagnetic waves
Thermal radiation covers the portion of the electromagnetic spectrum from 0.1 to 100 Pm
Visible
Ultraviolet

Infrared

Thermal Radiation

X rays
J rays

-5

-4

Microwaves

-3

-2

-1

log10 (Wavelength), Pm

Solar load (HVAC)

Headlight

Glass furnace

For semi-transparent bodies (e.g., glass, combustion product gases), radiation is a volumetric phenomenon
since emissions can escape from within bodies
For opaque bodies, radiation is essentially a surface phenomena since nearly all internal emissions are
absorbed within the body
Introduction
12

Overview

2016 ANSYS, Inc.

Wall BCs

Applications

1-way Thermal FSI

Summary

April 12, 2016

When to Include Radiation?


Radiation should be included in a simulation if
4
4

V H Tmax
 Tmin

qrad

Stefan-Boltzmann constant
5.670410-8 W/(m2K4)

is of the same order or magnitude than the convective and


conductive heat transfer rates. This is usually true at high
temperatures but can also be true at lower temperatures, depending
on the application
Estimate the magnitude of conduction or convection heat transfer in
the system as

h Twall  Tbulk

qconv

Compare qrad with qconv


Introduction
13

Overview

2016 ANSYS, Inc.

Wall BCs

Applications

1-way Thermal FSI

Summary

April 12, 2016

14

Optical Thickness and Radiation Modeling


The optical thickness should be determined
before choosing a radiation model
Optical Thickness { (a+Vs)L
a= absorption coefficient
Vs=scattering coefficient (often=0)
L= mean beam length
a: absorption coefficient (m-1)
(Note: Absorptivity of a Surface)
L: mean beam length (m)
(a typical distance between 2 opposing walls)

Optically thin means that the fluid is transparent to the


radiation at wavelengths where the heat transfer occurs
The radiation only interacts with the boundaries of the domain

Optically thick/dense means that the fluid absorbs and re-emits the
radiation
Introduction
2016 ANSYS, Inc.

Overview

Wall BCs

Applications

1-way Thermal FSI

Summary

April 12, 2016

Choosing a Radiation Model


The radiation model selected must be appropriate for the optical thickness of
the system being simulated
Model

Optical Thickness

Surface to surface model (S2S)


Solar load model

Computational Expense
When optical thickness = 0, S2S has comparable accuracy
with DO at less computational expense

0
0 (except window panes)

All

Discrete Transfer Method (DTRM)

All

Discrete ordinates model (DO)

>1

P-1

>5

Rosseland

Very low computational expense for solar radiation


problems compared to the DO model
Very inexpensive but very limited in applicability
Reasonable accuracy for moderate cost
The most computationally expensive model but also the
most comprehensive and accurate
Cheaper than DO but not available in parallel so rarely used

In terms of accuracy, DO and DTRM are most accurate (S2S is accurate for optical thickness = 0)
Introduction
15

Overview

2016 ANSYS, Inc.

Wall BCs

Applications

1-way Thermal FSI

Summary

April 12, 2016

Phase Change
Heat released or absorbed when matter changes state

There are many different forms of phase change

Condensation
Evaporation
Boiling
Melting/Solidification

Tracks from evaporating liquid pentane


droplets and temperature contours for
pentane combustion with the nonpremixed combustion model

Multiphase models and/or UDFs are needed to properly


model these phenomena
Contours of vapor volume fraction
for boiling in a nuclear fuel
assembly calculated with the
Eulerian multiphase model
Introduction
16

Overview

2016 ANSYS, Inc.

Wall BCs

Applications

1-way Thermal FSI

Summary

April 12, 2016

Post-Processing Heat Transfer


Heat flux reporting:
Total Heat Transfer Rate : both convective and radiative flux are computed
Net heat balance should be 0 once converged
or opposite to all the external energy sources (UDF or constant sources, DPM)
Radiation Heat Transfer Rate , only radiative net flux is computed
The sum of this flux is generally not 0. It can represent the amount of energy that is absorbed by the media

Introduction
17

Overview

2016 ANSYS, Inc.

Wall BCs

Applications

1-way Thermal FSI

Summary

April 12, 2016

18

Performing a 1-way Thermal FSI Simulation


The results of the Fluent
model can be transferred to
another FE code for further
analysis (for example to
compute thermal stresses)
Using Workbench, it is very
easy to map the Fluent data
over to an ANSYS
Mechanical simulation
Just right click on the
Solution cell, then
Transfer Data To
New Static Structural
Introduction
2016 ANSYS, Inc.

Overview

Wall BCs

Applications

1-way Thermal FSI

Summary

April 12, 2016

Performing a 1-way Thermal FSI Simulation


Within the ANSYS Mechanical application
(see image), the solution data from Fluent
is available as an Imported Load
Volumetric temperature quantities can be
transferred

Courtesy of CADFEM Gmbh


Introduction
19

2016 ANSYS, Inc.

Overview

Wall BCs

Applications

1-way Thermal FSI

Summary

April 12, 2016

Summary
After activating heat transfer, you must provide :
Thermal conditions at walls and flow boundaries
Fluid properties for energy equation

Available heat transfer modeling options include :

Convection
Conduction
Conjugate heat transfer
Natural convection
Radiation
Phase Change

Double precision solver usually needed to achieve a good energy


balance over the entire domain
Introduction

2016 ANSYS, Inc.

21

2016 ANSYS, Inc.

20

Overview

Wall BCs

Applications

1-way Thermal FSI

Summary

April 12, 2016

Appendix

April 12, 2016

22

Forced Convection
Forced convection results often depend on accurate resolution of turbulence
Example: Baughns Pipe Expansion ReD= 40,750
Dittus-Boelter correlation for a straight pipe
Nu DB 0.023 Re0.8 Pr 0.4

K-omega SST with y+=1


Nu/NuDB

2016 ANSYS, Inc.

April 12, 2016

Energy Equation Introduction


Energy transport equation:

Unsteady

Convection

Conduction

Energy
gy E per
p unit mass is defined as:

Species
Diffusion

Viscous
Dissipation

Enthalpy
Source/Sink

Pressure workk and kinetic energy are always accounted for with compressible flows
or when using the density-based solvers. For the pressure-based solver, they are
omitted and can be added through a text command:
The TUI command define/models/energy? will give more options when
enabling the energy equation
23

2016 ANSYS, Inc.

April 12, 2016

24

Governing Equation : Viscous Dissipation


Energy source due to viscous
dissipation:
Also called viscous heating
Often negligible, especially in incompressible
flow
Important when viscous shear in fluid is large (e.g.,
lubrication) and/or in high-velocity, compressible
flows
Important when Brinkman number approaches or
exceeds unity:

Br

PU e2
k'T

2016 ANSYS, Inc.

April 12, 2016

Convection
Convection heat transfer results from
fluid motion
The heat transfer rate is coupled to the fluid
flow solution

The rate of heat transfer is strongly dependent


on fluid velocity and fluid properties

Fluid properties may vary significantly with


temperature

There are three types of convection


Natural convection: fluid moves due to
buoyancy effects

Boiling convection: body is hot enough to cause


fluid phase change

Example: When cold air flows


past a warm body, it draws away
warm air near the body and
replaces it with cold air

Forced convection: flow is induced by some


external means

25

2016 ANSYS, Inc.

April 12, 2016

26

Heat Transfer Coefficient


Different ranges of values for the heat transfer
coefficient are observed for different convection modes

Typical values of h
(W/m2K)

Natural Convection Fluid moves due to buoyancy


Thot

Forced Convection Flow is induced external means

Tcold

4 4,000

Tcold

10 75,000

Thot

Boiling Convection Body is hot enough to cause fluid phase change

Tcold

300 900,000

Thot
2016 ANSYS, Inc.

April 12, 2016

Natural Convection: Gravity-Reference Density

Momentum equation along the direction of gravity (z in


this case)

wP
w U W
 U U W P 2W  abs  U g
wt
wz

In Fluent, a variable change is done for the pressure field


as soon as gravity is enabled

Pc

abs

 Poperating  U0 g z
Pgauge

Hydrostatic reference pressure head and operating pressure are


removed from pressure field

Momentum equation becomes

w U W
wPc
 U U W P 2W 
 U  U 0 g
wt
wz

27

where P' is the static gauge pressure used by Fluent for


boundary conditions and post-processing
This pressure transformation avoids round off error and
simplifies the setup of pressure boundary conditions

2016 ANSYS, Inc.

April 12, 2016

28

Natural Convection in an Open Domain (1/2)


Many heat transfer problems (especially for ventilation problems) include the effects of natural
convection

As the fluid warms, some regions become warmer than others, and therefore rise through the
action of buoyancy
This example shows a generic LNG liquefaction site, several hundred metres across. Large
amounts of waste heat are dissipated by the air coolers (rows of blue circles). The aim of the CFD
simulation is to assess whether this hot air rises cleanly away from the site
Hot discharges

Note transparent regions.


These contain objects too
fine to mesh, so a porous
cell zone condition is used

2016 ANSYS, Inc.

Ambient
Wind

Red surface shows where air


is more than 5C above
ambient temperature

Problem areas
where hot cloud
fails to clear site

April 12, 2016

Natural Convection in an Open Domain (2/2)


The underlying term for the buoyant force in the momentum equations is

U  U0 g

where U is the local density and Uo a reference density


The reference density, Uo is set on the Operating Conditions panel.
Strongly recommended: Uo = Ambient density

The pressure profile on boundaries is dependent on the value of Uo, because the value entered in
the boundary conditions panel corresponds to the modified pressure, P (= P Uo g z)
If the computational domain contains pressure inlets and outlets connected to the same external
environment, Uo should be set equal to the ambient density and a constant pressure of 0 Pa
specified for inlets and outlets
29

2016 ANSYS, Inc.

April 12, 2016

30

Selecting the Reference Density


Example Door and roof vents on a building with heated wall
The roof static pressure is set to 0 while the door static pressure must be given a hydrostatic head profile based on
the height of the building

Roof Outlet
Pressure outlet Pgauge = 0 Pbuoy = o g H

g
Heated
wall

Door Inlet
Pressure inlet
Pbuoy = o g y
Pgauge = amb g (y-H)
2016 ANSYS, Inc.

Note that g is in the y


direction, which means overall
this has a positive value

So, the correct pressure BCs are :


Psc top 0  U 0 g H e.g. P = Pgauge - Pbuoy
Psc bot U amb g y  H  U 0 g y
Or, equivalently, adding UogH to both
Psc top 0
Psc bot U amb  U o g y  H
Note: In this case, if you can set the
reference density equal to the
external ambient density then the
hydrostatic component can be
ignored

April 12, 2016

Natural Convection in a Cavity


The choice of Uo can be arbitrary in a cavity but has an impact on convergence

Well posed simulation


Uo set to a value in the middle of the cavity
Near the hot wall, the buoyant force term will be upwards, whilst at the
cold wall this term will be downwards
This will encourage the correct flow field from the start, and should
converge easily

flow

flow
Hot wall

Cold
wall

Badly posed simulation


Uo set too high (equivalent to a temperature colder than at the cold wall)
The source terms therefore produce:
A very high upwards force at the hot wall
A lesser, but still upwards, force at the cold wall
When converged (if it ever does!) the flow field should be the same as the top
case, but convergence will be difficult

flow

flow

31

2016 ANSYS, Inc.

April 12, 2016

Natural Convection the Boussinesq Model


A simplification can be made in some cases where the variation in
density is small

Recall the solver must compute velocity, temperature, and pressure


Rather than introducing another variable, density, which adds an
extra unknown, thus intensifying computational effort, instead for
fluid density select Boussinesq
Remember to enter correct value for density, do not leave as 0
Scroll to bottom of property list and enter the value for the thermal expansion
coefficient E
Do not leave this value as 0 either
Values can be found in standard engineering texts

Buoyant force is computed from

The value for the operating temperature To is set in the Operating


Conditions panel

32

This value is only used if "boussinesq" is selected for density

2016 ANSYS, Inc.

April 12, 2016

Natural Convection- Tips and Tricks


Beware of the operating density:
Average density for a cavity (To= median temperature for Boussinesq model)
Ambient density for problems with pressure inlets and outlets (Tref= ambient temperature for Boussinesq model)

Use PRESTO and Body Force Weighted discretization for pressure

Requirement: Y+=1 for turbulent natural convection boundary layer


Use pressure based pseudo transient approach for High Rayleigh number (turbulent flow)

't |

L
gE 'T

Use k-epsilon for buoyant stratified flows

33

2016 ANSYS, Inc.

April 12, 2016

34

Modeling Wall Thickness


For Option 2 on the earlier slide in the main lecture (in which it is not necessary to mesh the
solid in the pre-processor), the setup panel looks like this:
Option 2:
Just conduction normal to the solid

Fluid

Heat transfer normal to wall

Solid

Enter non-zero wall thickness and


select material

2016 ANSYS, Inc.

April 12, 2016

Modeling Wall Thickness with Shell Conduction


For Option 3 on the earlier slide in the main lecture (in which it is not necessary to mesh the
solid in the pre-processor), the setup panel looks like this:
Option 3:
Shell conduction enabled

Fluid
Heat can flow in all
directions

Solid

Select Shell Conduction, click Define, and enter


the number of layers, as well as the material
and thickness of each layer

35

2016 ANSYS, Inc.

April 12, 2016

36

Post-Processing Heat Transfer


Surface Heat Transfer Coefficient, hf

This report is computed by using the Reference Temperature: Tref


specified by the User in the Reference Values panel

hf

qw
(Twall  Tref )

Wall-function-based Heat Transfer Coefficient, heff

This report is computed by using the solution of the Turbulent


Boundary Layer

Available only when the flow is turbulent and Energy equation is enabled
Alternative for cases with adiabatic walls
Be very careful the value returned by Wall-function Heat Transfer Coefficient can
be highly dependent on the distance from the cell centroid to the wall and there can
be very large differences between this value and the value you would get using the
definition of heat transfer coefficient from a text book
In the limiting case as the mesh is refined (to get accurate calculations) such
that it intrudes into the viscous sublayer, the value returned will vary in a
linear manner according to the wall distance and thermal conductivity

2016 ANSYS, Inc.

or

eff

qw
(Twall  Tcell center )

April 12, 2016

Radiation
To account for radiation, Radiative Intensity Transport Equations (RTEs) are solved
Local absorption by fluid and at boundaries couples these RTEs with the energy equation

Radiation intensity is directionally and spatially dependent


Transport mechanisms for radiation intensity along one given direction:
Local Absorption

Outscattering (scattering away from the direction)

 a.I ds

dI
I  ds
ds

Resulting radiation
ds

Incident radiation

Gas Emission

VT 4
ds
S

In-scattering (scattering addition from other rays into the path)


Scattering often occurs when particles and droplets are present within the fluid and is often neglected
37

2016 ANSYS, Inc.

April 12, 2016

Choosing a Radiation Model


For optically thick media the P1 model is a good choice
Many combustion simulations fall into this category since combustion gases tend to absorb radiation
The P1 models gives reasonable accuracy without too much computational effort

For optically thin media the DOM or DTM models may be used

38

DTM can be less accurate in models with long/thin geometries


DOM uses the most computational resources,
Both models can be used in optically thick media, but the P1 model uses far less computational resources
S2S is only for non-participating media such as air (Optical Thickness = 0)

2016 ANSYS, Inc.

April 12, 2016

Which Model is Best for My Application?


Application

Model/Method

Solar load model , DOM, S2S

HVAC

DOM

UV Disinfection (water treatment)

DOM

Greenhouse effect

Rosseland, P1, DOM (non-gray)

Glass applications

DOM, DTM (WSGGM)

Combustion

DOM, DTM, P1 (WSGGM)

Combustion in large boilers charged with particles

DOM (non-gray)

Headlamp

S2S (DOM if symmetry)

Underhood

39

2016 ANSYS, Inc.

April 12, 2016

40

Additional Factors in Radiation Modeling


Additional guidelines for radiation model
selection:

Scattering
Scattering is accounted for only with P1
and DO
Particulate effects
P1 and DO account for radiation
exchange between gas and particulates
Localized heat sources
S2S is the best
DTRM/DO with a sufficiently large
number of rays/ ordinates is most
appropriate for domain with absorbing
media
2016 ANSYS, Inc.

April 12, 2016

Natural Convection
Natural convection has to be considered when :
Richardson number : Ri = Natural convection / Forced convection

Ri = 1
Ri  1
Ri >> 1

Ri

g.E .'T .L
U02

Free and Forced convection effects must be considered


Free convection effects may be neglected
Forced convection effects may be neglected

Rayleigh number : Ra = Buoyancy force / Losses due to viscosity and thermal


diffusion

Ra x

g.E .'T .x3


Q .a

Transition Laminar Turbulent :


It has been shown that in forced convection, the flow becomes turbulent when a critical value for
Rayleigh number is reached
Rac is around 10e9
but the transition zone is quite large as it varies from 10e6 <Ra < 10e10
41

2016 ANSYS, Inc.

April 12, 2016

42

Solution Convergence
When solving heat transfer problems, the double
precision solver is usually needed

1e-03

Make sure that you have allowed sufficient


solution iterations for the heat imbalances to
become very small, particularly when solid zones
are included
Sometimes residuals reach the convergence
criteria before global imbalances trend towards
zero
Check the imbalance and continue iterating if it is too large

2016 ANSYS, Inc.

April 12, 2016

Non Conformal Fluid/Solid Domain Interfaces


Non-conformal mesh can be used at a fluid/solid domain interface:
In some cases it may be useful to use a fine mesh on the fluid zone and coarser mesh on the solid zone

Note: You can use /display/zone-grid ID


to display the shadow walls
43

2016 ANSYS, Inc.

April 12, 2016

Exporting Data from Fluent


Fluent solution data can
also be exported in many
other formats for use in
applications outside of the
Workbench environment

These are available in the


File > Export menu in
Fluent
Note that in this case, the
data is exported at the
same grid locations as the
Fluent mesh
44

2016 ANSYS, Inc.

April 12, 2016

Exporting Data from Fluent [2]


Fluent also includes an FSI
Mapping tool.

Using this tool (unlike the export


option on last slide) enables CFD
results from Fluent to be
interpolated on to a different FEA
mesh.
First obtain the Fluent result, then
generate the FEA mesh (ABAQUS,
I-deas, ANSYS, NASTRAN, PATRAN)
Read the FEA mesh into Fluents
FSI Mapping Tool
Fluent will then map the CFD
results and save the interpolated
results in a format the FEA code
can read in.
45

2016 ANSYS, Inc.

April 12, 2016

2016 ANSYS, Inc.

17.0 Release

Module 09: Best Practice Guidelines


Introduction to ANSYS Fluent

April 12, 2016

Introduction
Lecture Theme:
The accuracy of CFD results can be affected by different types of errors. By understanding the
cause of each different error type, best practices can be developed to minimize them. Meshing
plays a significant role in the effort to minimize errors.

Learning Aims:
You will learn:
Four different types of errors
Strategies for minimizing error
Issues to consider during mesh creation such as quality and cell type
Best practices for mesh creation
Learning Objectives:
You will understand the causes of error in the solution and how to build the mesh and perform
the simulation in a manner that will minimize errors.
Introduction
2

2016 ANSYS, Inc.

Error Types

Best Practices for Meshing

Summary

April 12, 2016

Motivation for Quality


CFD-Results are used for many different stages of the design process:
Design & optimization of components and machines
Safety analyses
Virtual prototypes

When undertaking a CFD model, consideration should be given to the purpose of the work:
What will the results be used for?
What level of accuracy will be needed?

Introduction
2016 ANSYS, Inc.

Error Types

Best Practices for Meshing

Summary

April 12, 2016

Different Sources of Error


There are several different factors that combine to affect the overall solution
accuracy. In order of magnitude:
Round-off errors

Computer is working to a certain numerical precision

Iteration errors

Difference between converged solution and solution at iteration n


Solution errors
Difference between converged solution on current grid and exact solution of model equations
Exact solution Solution on infinitely fine grid
Model errors
Difference between exact solution of model equations and reality (data or analytic solution)

Introduction
4

2016 ANSYS, Inc.

Error Types

Best Practices for Meshing

Summary

April 12, 2016

Round-Off Error
Inaccuracies caused by machine round-off:
High grid aspect ratios
Large differences in length scales
Large variable range

Tip: Look for "dp" in the title bar of the Fluent to check if
your current session is using double precision

How to identify if round-off error is a problem:


Calculate with double precision if your case meets the above criteria

Compare results with a solution that has been calculated with single precision
If important quantities (target variables) are different, double precision should
be used for subsequent calculations
Introduction
2016 ANSYS, Inc.

Error Types

Best Practices for Meshing

Summary

April 12, 2016

Iteration Error - Best Practice


Define quantity or quantities of interest for your simulation (target variables):

Head rise
Efficiency
Mass flow rate

Select convergence criterion for the residuals


Plot the value of the quantities of interest as the solution iterates
Select a tighter convergence criterion and continue iterating and plotting
Repeat until the values of the quantities of interest no longer change
This will identify what residual level it is necessary to achieve in order to ensure the solution is free from iteration error

Monotonic convergence of residuals (next slide) is desirable, although not always


possible

Report mass and energy fluxes to ensure these are being conserved
Introduction
6

2016 ANSYS, Inc.

Error Types

Best Practices for Meshing

Summary

April 12, 2016

Iteration Error Example: 2D Compressor Cascade


Relative error:

(Residual)

Isentropic Efficiency

0.18% 0.01%

Iteration errors:
Difference between
converged solution and
solution at iteration n

Convergence
criterion
Rmax=10-2 Rmax=10-3
Iteration 35 Iteration 59

Check for monotonic convergence

Rmax=10-4
Iteration 132

Iteration Number
Introduction
7

2016 ANSYS, Inc.

Error Types

Best Practices for Meshing

Summary

April 12, 2016

Discretization Error
All discrete methods have solution errors:

Finite volume methods


Finite element methods
Finite difference methods
...

The difference between the solution on a given grid and exact solution on an infinitely
fine grid is called discretization error
Exact solution not available Discretization error estimation

Introduction
8

2016 ANSYS, Inc.

Error Types

Best Practices for Meshing

Summary

April 12, 2016

Discretization Error Estimation


Impinging jet flow with heat transfer
D

D= 26.5mm or 101.6mm

2-D, axisymmetric
H

Compared solutions computed on a series of grids:

50 u 50 800 u 800
SST turbulence model

Discretization schemes:

1st order Upwind


2nd order Upwind
Introduction
2016 ANSYS, Inc.

Error Types

Target quantities:
Heat transfer
Maximum Nusselt number
Best Practices for Meshing

Summary

April 12, 2016

Discretization Error Estimation


1st order

2nd order

200

The plot shows

190

Nu_max

180
170

If the grid is fine enough, 1st


and 2nd order solutions are
the same
On coarser meshes, the 2nd
order solution is closer to the
final solution

Practical alternatives for


industrial cases are:

160

Compare solutions from

150
-3.47E-17

different order schemes

0.005

0.01

0.015

0.02

Compare solutions on locally


or regionally refined meshes

1/N_Cells
Introduction
10

Error Types

2016 ANSYS, Inc.

Best Practices for Meshing

Summary

April 12, 2016

11

Model Errors
Inadequacies of (empirical) mathematical models:

Base equations (Euler vs. RANS, steady-state vs. unsteady-state, )


Turbulence models
Combustion models
Multiphase flow models

Due to model errors, discrepancies between data and calculations can remain,
even after all numerical errors have become insignificant!
Introduction
2016 ANSYS, Inc.

Error Types

Best Practices for Meshing

Summary

April 12, 2016

Model Error: Impinging Jet


SKE

RNG

KW
TKE Contours

Nu*

Results: H/D=2, RE=23 000


SKE
RNG
KW

Model error

Note how the predictions differ


depending on which turbulence model is
used
Z model (KW) performs better than
The k-Z
the standard (SKE) or RNG k-H models in
this case
The k-H based models overestimate the
production of turbulence at the stagnation
point, causing the predicted Nusselt number
to be too high

Introduction
12

Error Types

2016 ANSYS, Inc.

Best Practices for Meshing

Summary

April 12, 2016

13

Systematic Errors
Discrepancies that remain

Even if numerical and model errors are insignificant

Systematic errors:

Can result from approximations of:


Geometry
Component vs. machine
Boundary conditions
Fluid and material properties,

Try to understand application and physics

Document and defend assumptions !


Perform uncertainty analysis
Introduction
2016 ANSYS, Inc.

Error Types

Best Practices for Meshing

Summary

April 12, 2016

Meshing Best Practice Guidelines


Choosing your mesh strategy
depends on

Desired cell count


- Low cell count for resolving
overall flow features vs High
cell count for greater details

Desired mesh quality


What is the maximum
skewness and aspect ratio
you can tolerate?

2. EFFICIENCY

1.ACCURACY

3. EASINESS TO GENERATE
Time available
- Faster Tet-dominant mesh vs
crafted Hex/hybrid mesh with
lower cell count

Goal: Find the best compromise between accuracy, efficiency and


easiness to generate
Introduction
14

2016 ANSYS, Inc.

Error Types

Best Practices for Meshing

Summary

April 12, 2016

15

Meshing: Capture Flow Physics


Grid must be able to capture
important physics:
Boundary layers
Heat transfer
Wakes, shock
Flow gradients

Recommended meshing guidelines for


boundary layers
Both the velocity and thermal boundary
layers must be resolved
There should be a minimum of 10-15
elements across the boundary layer
thickness
The mesh expansion ratio in the wall
normal direction should be moderate:
d 1.2 1.3

y+ | 1 for heat transfer and transition


modeling
Introduction
2016 ANSYS, Inc.

Error Types

Best Practices for Meshing

Summary

April 12, 2016

Meshing: Capture Flow Physics


Example: Velocity profiles at airfoil

Bad

Introduction
16

2016 ANSYS, Inc.

Good

Error Types

Best Practices for Meshing

Summary

April 12, 2016

17

Mesh Quality
A good mesh depends on :

Good

Not Good

Cell not too distorted


Cell not too stretched
Smooth Cells transition

Introduction
2016 ANSYS, Inc.

Error Types

Best Practices for Meshing

Summary

April 12, 2016

Mesh Quality
Grid generation:

Scalable grids
Skewness < 0.95 (accuracy, convergence)
also worst Orthogonal Quality > .01 and average value
much higher
Aspect ratios < 100
Expansion ratios < 1.5 2
Capture physics based on experience (shear layers,
shocks)
Angle between grid face & flow vector
Concrete, quantitative recommendations for these
factors presented in the Introduction to ANSYS Meshing
course are included in the appendix of this presentation

Bad cells

No Bad cells

Grid refinement:

Manual, based on error estimate


Automatic adaptive based on error sensor
Introduction
18

2016 ANSYS, Inc.

Error Types

Adaption
Best Practices for Meshing

Summary

April 12, 2016

19

Mesh Quality
Avoid sudden changes in mesh density

Not good
Introduction

Error Types

2016 ANSYS, Inc.

Best Practices for Meshing

Good
Summary

April 12, 2016

Hex vs Tet Mesh : Accuracy Comparison


Direction of the flow well known
Quad/Hex aligned with the flow are more accurate than Tri with the same interval size

U=0.1

Hex
mesh

Tri
mesh

U=1.0
Contours of axial velocity magnitude for an inviscid co-flow jet
Introduction
20

Error Types

2016 ANSYS, Inc.

Best Practices for Meshing

Summary

April 12, 2016

21

Hex vs Tet Mesh : Accuracy comparison


For complex flows without dominant flow direction, Quad and Hex meshes
lose their advantage
Equivalent results on quad & tri meshes

U = V = 1.0 , T = 1

quad
q
u ad

U = V = 1.0 ,

U = V = 1.0 ,T = 1

tri

U = V = 1.0 , T = 0

T=0

Contours of temperature for inviscid flow


Introduction
2016 ANSYS, Inc.

Error Types

Best Practices for Meshing

Summary

April 12, 2016

Summary
Try to understand application and physics of the application

Distinguish between numerical, model and other errors


Document and defend assumptions

Geometry
Boundary conditions
Flow regime (laminar, turbulent, steady-state, unsteady-state, )
Model selection (turbulence, )

Sources of systematic error


Approximations
Data

Accuracy expectations vs. assumptions?


Introduction
22

2016 ANSYS, Inc.

Error Types

Best Practices for Meshing

Summary

April 12, 2016

Resources
ERCOFTAC SIG: Quantification of Uncertainty in CFD
Roache, P.J., Verification and Validation in Computational Science and
Engineering, Hermosa Publishers, 1998

On the ANSYS customer portal, search for "best practice"

2016 ANSYS, Inc.

24

2016 ANSYS, Inc.

23

April 12, 2016

Appendix

April 12, 2016

25

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

2016 ANSYS, Inc.

April 12, 2016

Impact of the Mesh Quality on the Solution


Diffusion example

Mesh 1
Large cell size
change

26

2016 ANSYS, Inc.

(max,avg)CSKEW =(0.912,0.291)
(max,avg)CAR=(62.731,7.402)

VzMIN-90ft/min
VzMAX600ft/min
(max,avg)CSKEW =(0.801,0.287)
(max,avg)CAR=(8.153,1.298)

Mesh 2

VzMIN-100ft/min
VzMAX400ft/min

April 12, 2016

27

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
For Multi-Body Parts, go to corresponding body in Tree Outline
Orthogonal Quality
to get its separate mesh statistics per part/body
2016 ANSYS, Inc.

April 12, 2016

Mesh Quality Metrics


Orthogonal Quality (OQ)

On cell

On face

Derived directly from


Fluent solver discretization

A
c1

For a cell it is the minimum of:

Ai fi
| Ai || f i |

Ai ci
| Ai || ci |

c3

f1

f3

f2

c2

A1
e1
e2
e3

A2

A2

A3

A3

computed for each face i


For the face it is computed as the minimum of

Ai ei
computed for each edge I
| Ai || ei |

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
28

2016 ANSYS, Inc.

0
Worst

1
Perfect

April 12, 2016

29

Mesh Quality Metrics


Skewness

Optimal (equilateral) cell

Two methods for determining skewness:

1. Equilateral Volume deviation:


Skewness = optimal cell size  cell size
optimal cell size

Applies only for triangles and tetrahedrons

2. Normalized Angle deviation:


T max  Te Te  T min
Skewness =
max
,

Te
180  Te

T max

Actual cell

Circumsphere

T min

Where T e is the equiangular face/cell (60 for tets and


tris, and 90 for quads and hexas)
Applies to all cell and face shapes
Used for hexa, prisms and pyramids
2016 ANSYS, Inc.

0
Perfect

1
Worst

April 12, 2016

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

Orthogonal Quality mesh metrics spectrum

30

2016 ANSYS, Inc.

April 12, 2016

31

Aspect Ratio
2-D:

Length / height ratio: x/y


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 ...)

2016 ANSYS, Inc.

April 12, 2016

Smoothness
Checked in solver
Recommendation:

Volume Change in Fluent

Good: 1.0 < < 1.5


Fair: 1.5 < < 2.5
Poor: > 5 20

Available in Adapt/Volume
3D : i = Vi / Vnb

Expansion Factor in CFX


Checked during mesh import
Ratio of largest to smallest element volumes
surrounding a node

32

2016 ANSYS, Inc.

April 12, 2016

34

Elements: Hex
Pro:

Good shear layer element


Best element wrt. memory & calculation
time per element
Con:

Degree of automation for grid generation

2016 ANSYS, Inc.

April 12, 2016

Elements: Tet
Pro:

High degree of automation for grid


generation
Con:

Memory & calculation time per node 1.5


u hex
Poor shear layer element
No streamline orientation
Quantity must (and can) make up for
quality
35

2016 ANSYS, Inc.

April 12, 2016

36

Elements: Prism
Pro:

Better shear layer resolution than tet


High degree of automation
Tet/prism combination
Con:

Less efficient than hex


Topological difficulties (corners, ) poor
grid quality (angles, )
Manual repair

2016 ANSYS, Inc.

April 12, 2016

Elements: Pyramid
Use in hybrid grids
Transition element between hex and
tet

Polyhedral grids

ANSYS Fluent:
Generate base types
Convert

ANSYS CFX builds polyhedrals around


vertices
37

2016 ANSYS, Inc.

April 12, 2016

38

Recommendations
1st Option Hex grid

Best accuracy and numerical efficiency


Time and effort manageable?
2nd Option Tet/hex/pyramid grid

Hex near walls & shear layers


Developing technology
3rd Option Tet/prism grid

High degree of automation


Quality (prism/tet transition, )
4th Option Tet grid

Shear layer resolution?


2016 ANSYS, Inc.

April 12, 2016

Grid Optimization
Truncation errors source of discretisation errors
Minimize truncation errors minimize discretisation errors
Truncation error Difference between analog and discrete representation

wf

wx i

f  f
i

1
i

1
+W i
2h

h2 w3 f


6 wx 3 i

h
i-2

39

2016 ANSYS, Inc.

i-1

h
i

i+1

x
i+2

April 12, 2016

40

Iteration Error Example


Check for monotonic convergence
(Residual)
2016 ANSYS, Inc.

April 12, 2016

Iteration Error Example


Effect of different residual limits during convergence:
2D Compressor cascade
2nd order

Rmax = 1 u 10-3

Rmax = 1 u 10-4

Rmax = 1 u 10-5

Change of Pressure Distribution


41

2016 ANSYS, Inc.

April 12, 2016

42

Iteration Error Example


Relative error:
Isentropic Efficiency

0.18%

0.01%

Iteration errors:
Difference between
converged solution and
solution at iteration n

Convergence criterion

Iteration 59

Iteration 35

Rmax=10-3

Rmax=10-2

Rmax=10-4

Iteration 132

Iteration Number
2016 ANSYS, Inc.

April 12, 2016

Iteration Error Example


Max. Res. = 1e-3

Isentropic Mach Number

0.1

Max. Res. = 1e-4


Max. Res. = 1e-5

April 12, 2016

2016 ANSYS, Inc.

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

Xs / L
43

Discretization Error Estimation


Nu

Error

Grid

155.751

fuf

157.808

800 u 800

159.646

400 u 400

162.664

200 u 200

170.230

100 u 100

176.981

190.175

50 u 50

2nd order

1st order

2016 ANSYS, Inc.

2016 ANSYS, Inc.

44

163.793
159.761
158.296
157.168

1st order

2nd order

22.1 %

13.6 %

9.3 %

5.1 %

4.4 %

2.6 %

2.3 %

1.4 %

1.1%

0.7 %

155.777

April 12, 2016

17.0 Release

Module 10: Transient Flow Modeling


Introduction to ANSYS Fluent

April 12, 2016

Introduction
Lecture Theme:
Performing a transient calculation is in some was similar to performing a steady state
calculation, but there are additional considerations. More data is generated and extra inputs
are required. This lecture will explain these inputs and describe transient data postprocessing

Learning Aims:
You will learn:
How to set up and run transient calculations in Fluent
How to choose the appropriate time step size for your calculation
How to postprocess transient data and make animations
Learning Objectives:
Transient flow calculations are becoming increasingly common due to advances in high
performance computing (HPC) and reductions in hardware costs. You will understand what
transient calculations involve and be able to perform them with confidence.
Introduction
2016 ANSYS, Inc.

Unsteady Flow

Time Step

Setup

Summary

April 12, 2016

Motivation
Nearly all flows in nature are unsteady!

Steady-state assumption is possible if we:


Ignore unsteady fluctuations
Employ ensemble/time-averaging to remove unsteadiness
this is what is done in modeling RANS turbulence

In CFD, steady-state methods are preferred


Lower computational cost
Easier to post-process and analyze

Many applications require resolution of unsteady flow:

Aerodynamics (aircraft, land vehicles, etc.) vortex shedding


Rotating Machinery rotor/stator interaction, stall, surge
Multiphase Flows free surfaces, bubble dynamics
Deforming Domains in-cylinder combustion, store separation
Unsteady Heat Transfer transient heating and cooling
Many more
Introduction

2016 ANSYS, Inc.

Unsteady Flow

Time Step

Setup

Summary

April 12, 2016

Origins of Unsteady Flow


Natural unsteadiness
Unsteady flow due to growth of instabilities within the fluid or a non-equilibrium initial fluid state
Examples: natural convection flows, turbulent eddies of all scales, fluid waves (gravity waves,
shock waves)
Forced unsteadiness
Time-dependent boundary conditions, source terms drive the unsteady flow field
Examples: pulsing flow in a nozzle, rotor-stator interaction in a turbine stage

Kelvin-Helmholtz
Cloud Instability
Introduction
2016 ANSYS, Inc.

Unsteady Flow

Rotor-Stator Interaction
in an Axial Compressor
Time Step

Setup

Summary

April 12, 2016

Unsteady CFD Analysis


Simulate a transient flow field over a specified time period
Solution may approach:
Steady-state solution Flow variables stop changing with time
Time-periodic solution Flow variables fluctuate with repeating pattern
Your goal may also be simply to analyze the flow over a prescribed time interval
Free surface flows,
Moving shock waves,

Extract quantities of interest

Natural frequencies (e.g. Strouhal Number)


Time-averaged and/or RMS values
Time-related parameters (e.g. time required to cool a hot solid, residence time of a pollutant)
Spectral data Fourier Transform (FT)
Introduction

2016 ANSYS, Inc.

Unsteady Flow

Time Step

Setup

Summary

April 12, 2016

Unsteady CFD Analysis


Transient simulations are solved by computing
a solution for many discrete points in time
At each time point we must iterate to the
solution

Time steps = 2 s
Initial Time = 0 s
Total Time = 20 s

Residual
2

6 8 10 12 14 16 18 20

Time (seconds)
Introduction

Unsteady Flow

2016 ANSYS, Inc.

Time Step

Several iterations per time step


Setup

Summary

April 12, 2016

Selecting the Transient Time Step Size


The time step size is an important parameter in transient simulations
't must be small enough to resolve time-dependent features
Time step too large to resolve transient changes

True solution

- Note the solution points generally will not lie on the true
solution because the true behaviour has not been resolved

Variable of
interest

't
Time
Variable of
interest

A smaller time step can


resolve the true solution

- At least, 10-20 't per period

't

Time
Introduction
7

Unsteady Flow

2016 ANSYS, Inc.

Time Step

Setup

Summary

April 12, 2016

Convergence Behavior
Residual plots for transient simulations are
not always indicative of a converged
solution
You should select the time step size such
that the residuals reduce by around three
orders of magnitude within one time step
This will ensure accurate resolution of
transient behavior
For smaller time steps, residuals may only
drop by 1-2 orders of magnitude - look for a
monotonic decrease throughout the time
step
Introduction
2016 ANSYS, Inc.

Unsteady Flow

Time Step

Typical residual plot for a simple


transient calculation
Setup

Summary

April 12, 2016

Selecting the Transient Time Step Size


and it must be small enough to maintain solver stability

The quantity of interest may be changing very slowly (e.g. temperature in a solid),
but you may not be able to use a large time step if other quantities (e.g. velocity)
have smaller timescales
The Courant Number is often used to estimate a time step:

Courant Number

Characteristic flow velocity u 't


Typical Cell Size

This gives the number of mesh elements the fluid passes through in one time step
Typical values are 1 10, but in some cases higher values are acceptable

Introduction
9

2016 ANSYS, Inc.

Unsteady Flow

Time Step

Setup

Summary

April 12, 2016

10

Selecting the Transient Time Step Size


Tips & Tricks for the estimation of the time step:
Usual Case :

't

1 L
.
3 V

restrictive but safe for convergence with L=cell characteristic size

't

Conduction in solids :

L
(g. E . 'T.L)1/2

't

Natural Convection :

1 Number of Blades
.
10 Rotational Velocity

't

Turbomachinery :

L = Characteristic length
V = Characteristic velocity

L2
O

U .Cp

A smaller time step will typically improve convergence


Introduction
2016 ANSYS, Inc.

Unsteady Flow

Time Step

Setup

Summary

April 12, 2016

Transient Flow Modeling Workflow


Similar set-up as steady-state simulation, then:

Run the calculations (Iterate)

8.

Prescribe the number of time steps

7.

Select time step and max iterations per time step

6.

Configure animations and data output/sampling options

5.

Assign solver settings and configure solution monitors

4.

Prescribe initial conditions


Best to use a physically realistic initial condition, such as a steady solution

3.

Set up physical models and boundary conditions as usual


Transient boundary conditions are possible you can use either a UDF or profile to
accomplish this

2.

Enable the unsteady solver

1.

Introduction
11

2016 ANSYS, Inc.

Unsteady Flow

Time Step

Setup

Summary

April 12, 2016

12

Enabling the Transient Solver


To enable the unsteady solver, choose Transient in the Solver group of the
Setting Up Physics tab in the ribbon

Introduction
2016 ANSYS, Inc.

Unsteady Flow

Time Step

Setup

Summary

April 12, 2016

Set Up Time Step Size

Set the time step size in Run Calculation

This controls the spacing in time between the solution points

Set the number of time steps in Run Calculation


This controls the spacing in time between the solution points

Click Advanced to open the Run Calculation task


page and choose additional options such as number
of iterations per time step

Introduction
13

2016 ANSYS, Inc.

Unsteady Flow

Time Step

Setup

Summary

April 12, 2016

14

Solution Methods for Transient Simulation

"Transient Formulation" defines the


numerical algorithm for the transient
term
First Order Implicit is the default because it is more
stable
For problems with higher accuracy requirements, it
is recommended to change this setting to Bounded
Second Order Implicit

Introduction
2016 ANSYS, Inc.

Unsteady Flow

Time Step

Setup

Summary

April 12, 2016

Initialization
Physically realistic initial conditions should be
used
A converged steady state solution is often used as the
starting point
If a transient simulation is started from an
approximate initial guess, the initial transient
results will not be accurate

Residuals

The first few time steps may not converge


A smaller time step may be needed initially to maintain
solver stability
For cyclic behavior the first few cycles can be ignored
until a repeatable pattern is obtained

6 8 10 12 14 16

Time (seconds)
Introduction
15

2016 ANSYS, Inc.

Unsteady Flow

Time Step

Setup

Summary

April 12, 2016

16

Tips for Success in Transient Flow Modeling


With the pressure-based solver, use PISO scheme for PressureVelocity Coupling this scheme provides faster convergence for
unsteady flows than the standard SIMPLE approach
Select the number of iterations per time step to be around 20
it is usually better to reduce the time step size than to do too many iterations per
time step

Remember that accurate initial conditions are as important as


boundary conditions for unsteady problems
initial conditions should always be physically realistic!

To iterate without advancing in time, specify zero time steps


This will instruct the solver to converge the current time step only
Introduction
2016 ANSYS, Inc.

Unsteady Flow

Time Step

Setup

Summary

April 12, 2016

Summary
When solving any unsteady flow problem in Fluent
The time step size will be determined by the minimum of
The value at which the solution will converge
The value needed to resolve mean flow physical time scales (e.g. vortex shedding frequency given by
Strouhal number) and/or turbulent eddies (Courant number <= 1)
The solution must converge at every time step
Non-convergence within the very first steps may be acceptable when there is a non-physical initial
condition
If the solution is not converging, it is almost always more efficient to reduce the time step size
Solution monitors are an important tool for ensuring the solution is correct
Watch out for physically unrealistic behavior of monitored variables
The Bounded Second Order transient formulation is almost always preferred

Introduction
17

2016 ANSYS, Inc.

Unsteady Flow

Time Step

Setup

Summary

April 12, 2016

18

2016 ANSYS, Inc.

Appendix

April 12, 2016

Non-iterative Time Advancement


Non-iterative Time Advancement
(NITA) is available for faster
computation time
NITA runs about 2x to 10x as fast as ITA scheme

Limitations: Available with the


pressure-based solver only
NITA schemes are not available for radiation
models (except S2S), mixture multiphase model,
DPM, UDS transport, porous jump boundary
condition, etc.

Consult the Fluent Documentation for


additional details
19

2016 ANSYS, Inc.

April 12, 2016

20

Non-iterative Time Advancement


- NITA scheme reduce the splitting error to O(t2) by
using sub-iterations per time step
Overall timediscretization error for
2nd-order scheme:
O('t2)

Truncation
error: O('t2)

Splitting error
(due to eqn
segregation):
O('tn)

- Two flavors of NITA schemes available

- PISO (NITA/PISO)
- Fractional-step method (NITA/FSM)
About 20% cheaper than NITA/PISO on a per time-step
basis

ITA
2016 ANSYS, Inc.

NITA

April 12, 2016

Unsteady Flow Modeling Options


Adaptive Time Stepping
Automatically adjusts time-step size
based on local truncation error analysis
Customization possible via UDF

Extrapolate Variables
Speed up the transient solution by reducing required sub-iteration
Using Taylor series expansion solution will be extrapolated to the next
time level to improve the predicted initial value

Data Sampling for Time Statistics


Particularly useful for LES turbulence calculations

21

2016 ANSYS, Inc.

April 12, 2016

Unsteady Flow Modeling Animations


Another method in Fluent is available
which makes use of the Execute
Commands feature
Text commands or macros can be defined
which are executed by the solver at
prescribed iteration or time step intervals
This approach is very useful in creating
high-quality animations of CFD results
A command is defined which generates an animation
frame (contour plot, vector plot, etc.) and then writes
that frame to a hard copy file.
Third-party software can then be used to link the hard
copy files into an animation file (AVI, MPG, GIF, etc.)

22

2016 ANSYS, Inc.

April 12, 2016

CFD-Post: Dynamic Text Objects

23

2016 ANSYS, Inc.

April 12, 2016

CFD-Post: Typical Keyframe Animation Procedure

Select the first Keyframe and set the # of Frames

7.

Create the second Keyframe

6.

If necessary change the plots and the view

5.

Load the last time step

4.

Create the first Keyframe

3.

Create necessary plots and position the view

2.

Timestep Selector load the first time step

1.

This is the # of Frames in between the first and second


Keyframes
If we have a total of 100 time steps, then setting # of
Frames to 98 will produce a total of 100 frames (98
plus first, plus last) and therefore 1 frame per time
step

Rewind to the first Keyframe and click Play

9.

Set the Movie options

8.

24

2016 ANSYS, Inc.

In this example the first and second Keyframes used a


different view position and the Transparency of the
Plane was changed from 0 to 1. The changes between
Keyframes are interpolated gradually over each
animation frame

April 12, 2016

CFD-Post: Transient Charts


XY Transient or Sequence
Plots an expression (usually Time) versus a
variable at a point locator
Typically used to show the transient
variation of a variable at a point
Unless the data from every time step is
saved and loaded into CFD-Post, create
a point surface in Fluent and write the
data at every time step
If desired, the data in the Fluent
monitor output file can be plotted
in a CFD-Post chart

25

2016 ANSYS, Inc.

April 12, 2016

26

CFD-Post: Fourier Transform


FT can be applied to signals to extract frequency data
FT of Signal Showing
Dominant Frequency

Original Signal

2016 ANSYS, Inc.

April 12, 2016

Unsteady Flow Modeling Animations


You must set up any animations BEFORE performing iterations

Animation frames are written/stored on-the-fly during calculations

27

2016 ANSYS, Inc.

April 12, 2016

28

CFD-Post: Timestep Selector


Transient results can also be postprocessed in CFD-Post.
You need to instruct Fluent when to export data
(every n time steps)
Otherwise, by default, Fluent does not write any data
to disk during the solution, and interim results will be
forgotten.
So in Fluent, under Calculation Activities, select
Autosave
In CFD Post, select the last results file, then tick Load
Complete History as a Single Case
The clock icon will open up a window from where you
can select the desired time step

2016 ANSYS, Inc.

April 12, 2016

Transient Animations in CFD-Post


To create animations:
Load a transient data set
Collection of data files saved at regular intervals
in a transient simulation
Either regular .dat files from autosaving or .cdat
files from automatic export
.cdat files allow choice of what variables to
saved, reducing i/o time and file size

29

Create objects such as vectors or contours


Select the Timestep icon in the toolbar
In Timestep Selector, select the Animation icon
Opens the Animation panel
Click the play button
All visible objects will be animated

2016 ANSYS, Inc.

April 12, 2016

Вам также может понравиться