You are on page 1of 95

Tips and Tricks for faster

simulation convergence

Dr. Valry Morgenthaler


ANSYS France

March 2014
1

2011 ANSYS, Inc.

April 17, 2014

Presentation Plan
Introduction
High Performance Computing
Mesh Quality
ANSYS Solvers

Numerical Schemes
High order terms relaxation
Reduced Rank Extrapolation
Pseudo Transient Method
PBNS Solver settings for external aerodynamics
Special settings for thermal applications
Convergence Acceleration for stretched mesh

Conclusion
2

2011 ANSYS, Inc.

April 17, 2014

Introduction

2011 ANSYS, Inc.

April 17, 2014

Introduction
ANSYS Solver is committed to deliver the best-in-class solvers
These solvers rely on 3 technologies :
Hardware
Numerical schemes
Physical models

Time to result can be reduced


Considering a change in physical model is an option
In this presentation we will only talk about how to make the
best use of the numerical schemes and hardware

2011 ANSYS, Inc.

April 17, 2014

High Performance Computing

2011 ANSYS, Inc.

April 17, 2014

Parallel/HPC in ANSYS Fluids


Every year parallel HPC has always been a major focus on
enhanced simulation throughput
The cluster usage increases
number
cores/cluster

% of GPU

14000

12000

18

16

14

10000

12

8000

10

6000

4000
2000
0
2009

2010

2011

2012

2013

GPU usage begins


6

number
cores/processor

2011 ANSYS, Inc.

April 17, 2014

0
2009

2010

2011

2012

2013

0
2009

2010

2011

2012

2013

TOP500.Org

Parallel Scalability for large cases


CFX

Fluent

Up to 90% efficiency over 2048 cores

Up to 86% efficiency over 10240 cores


96 Million cells

150 Million cells


900

2048

1536

700

15.0

600

14.5

Rating

Wall Clock Speedup

800
ideal

1024

500
400

300

512

R15.0

200

Ideal

100
0
0

512

1024
Number of Cores

1536

2048

0
0

2048 4096 6144 8192 10240 12288

Number of Cores

Rating is defined as the number of benchmarks that can be run on a given machine (in
sequence) in a 24 hour period. It is computed by dividing the number of seconds in a day by the
number of seconds required to run the benchmark. A higher rating means faster performance.
7

2011 ANSYS, Inc.

April 17, 2014

Parallel Scalability for small cases


Processor multicore architecture is also accounted for
enabling also a higher parallel scalability for small cases
SEDAN_4M Cells

Fluent

25000
12.0.19

Performance Rating

20000

13.0.1

15000

10000

5000

0
0

64

128

192

256

320

Num Cores

2011 ANSYS, Inc.

April 17, 2014

384

448

512

Partitioning continuing progress


Partitioning strategies and efficiency is reviewed at each
ANSYS release
CFX
P4

P6

P2

P7

P1

P8
P3

P5

P1

P3

P2

P7

P5

P6

P4

P8

Compute Node 1

2011 ANSYS, Inc.

Partitioning step finds


adjacency amongst
partitions; partitions
with max adjacency
are grouped on same
compute nodes

April 17, 2014

Compute Node 2

Discrete Phase Particle tracking


More scalable discrete phase particle tracking
Over 2x for 512-way parallel
246,000 cells, 1 million particles
7000
6000

Rating

5000
4000
MPI
Hybrid
2Domain

3000
2000
1000
0
16

10

2011 ANSYS, Inc.

April 17, 2014

32

64

128

256

384

512

Viewfactor calculation speedup


CFX

Fluent

Cluster-to-cluster view factor file


writing optimization

GPU usage to reduce cluster-tocluster view factor calculation

1.1 million
surface clusters

0.4 million
surface clusters

11

2011 ANSYS, Inc.

April 17, 2014

R13
R14

Parallel File I/O and Startup


The bottleneck of File IO can be
leverage using a Parallel File
Systems :

Case read time reduced


significantly at high core counts
Start-up time for 8192-way parallel
reduced from 30 minutes
to 30 seconds
12

2011 ANSYS, Inc.

April 17, 2014

14.5.0
15.0.0

6000
5000
Time in seconds

PVFS2 (NASA Goddard)


Lustre (Linux Cluster)
GFS (Google File Sytem)

150M cell case read time


7000

4000
3000
2000
1000

0
1024

2048

4096

6144

8192

9216 10240

Other Parallel Enhancements


GPUs make their way into the
solver :

NVIDIA Tesla 20-series cards


NVIDIA Quadro 6000 card
Faster solutions using GPUs
Accelerated AMG solver
performance for 3D coupled
pressure-based solver cases

13

2011 ANSYS, Inc.

April 17, 2014

Make new architectures available


Support of CRAY XE6
4000
3500
3000
2500
Rating

architecture
Support for Intel ManyIntegrated-Core
architecture

truck_111m CRAY XE6

13.0.0
14.0.0
15.0.0

2000
1500
1000
500

0
0

14

2011 ANSYS, Inc.

April 17, 2014

2048

4096

6144
NumCores

8192

10240

12288

Mesh quality

15

2011 ANSYS, Inc.

April 17, 2014

Meshing strategy

Accuracy

Efficiency

16

2011 ANSYS, Inc.

April 17, 2014

Simplicity

Meshing guidelines
Desired mesh quality
What is the maximum
skewness and aspect
ratio you can tolerate?

Desired cell count

Low cell count for


resolving overall flow
features vs High cell count
for greater details

Time available
Faster Tet-dominant mesh
vs crafted Hex/hybrid
mesh with lower cell
count

Use of non conformal interface !!!


17

2011 ANSYS, Inc.

April 17, 2014

Mesh quality
Good
Cell not too
distorted
Cell not too
stretched

Smooth
Cells
transition
18

2011 ANSYS, Inc.

April 17, 2014

Not Good

Capture flow physics


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

19

2011 ANSYS, Inc.

April 17, 2014

Boundary layers:

Velocity and temperature


10-15 elements
Expansion ratios 1.2 1.3
y+ 1 for heat transfer and
transition modeling

Accuracy comparison
Hex vs Tet mesh
Quad/Hex aligned with the flow are more accurate than Tri
Without dominant flow direction Quad & Tri equivalent
Contours of axial
velocity magnitude

U=0.1

U=1.0

U = V = 1.0 , T = 0
20

2011 ANSYS, Inc.

Tri mesh

U = V = 1.0, T = 1

qu
ad

U = V = 1.0,

T=1

Hex mesh

April 17, 2014

t
r
i
U = V = 1.0 , T = 0

Contours of temperature
for inviscid flow

ANSYS Solvers

21

2011 ANSYS, Inc.

April 17, 2014

ANSYS Solvers
All ANSYS solver have an all-Mach formulation.
Each of these solvers may be more effective on specific
problems
Choosing the right solver for the right application is the
first step to a fast simulation convergence
ANSYS solvers can be separated in two technologies
depending on which form the continuity equation is
solved :
Pressure based Navier-Stokes solvers (PBNS)
Density based Navier-Stokes solvers (DBNS)
Traditionnaly, PBNS is more suited for incompressible
flows and DBNS for compressible
22

2011 ANSYS, Inc.

April 17, 2014

ANSYS Solvers
Each of these technologies are also separated depending
on how equations are coupled together
Pressure Based
Fluent

Implicit Segregated

Fluent

CFX

All equations
are solved in a segrageted way
Fluent

Implicit Coupled

Fluent

Continuity, Momentum, Energy and Species


are solved in a coupled way

Density Based
23

2011 ANSYS, Inc.

April 17, 2014

Implicit Coupled
Continuity and Momentum
are solved in coupled way

Explicit Coupled
All equatiions
are solved in a coupled way

ANSYS Solvers
Each of these technologies are also separated depending
on how equations are coupled together
Pressure Based
Implicit Segregated

Fluent

Mach < 0.3


Combustion, LES
Implicit Coupled

Fluent

Fluent

CFX

Fluent

Density Based
2011 ANSYS, Inc.

April 17, 2014

Mach < 2
Most effective solver

Explicit Coupled
Mach > 2
Unsteady flows

Mach > 2
Most effective solver

24

Implicit Coupled

Pressure-based Solvers
(FLUENT & CFX)

Pressure-Based

Pressure is used as a primary variable

Velocity field is obtained from the


momentum equation
Mass conservation (continuity) is achieved
by solving a pressure correction equation
Pressure-velocity coupling algorithms are
derived by reformatting the continuity
equation

Energy equation (where appropriate) is


solved sequentially
Additional scalar equations are solved
in a segregated fashion
PBS solvers can be run implicit only
Explicit would be not efficient

25

2011 ANSYS, Inc.

April 17, 2014

Pressure-Based
(segregated)

Pressure-Based
(coupled)

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

Solve Mass
& Momentum

Solve Mass
Continuity;
Update Velocity
Solve Energy
Solve Species
Solve Turbulence Equation(s)
Solve Other Transport Equations as required

Density-based Solvers
(FLUENT)

Density-Based

Density is used as a primary variable


the governing equations of continuity,
momentum, and (where appropriate) energy
and species transport are solved simultaneously

Additional scalar equations are solved in


a segregated fashion

Density-Based
(coupled implicit)

Density-Based
(coupled explicit)

Solve Mass,
Momentum,
Energy,
Species

Solve Mass,
Momentum,
Energy,
Species

DBS solvers can be run implicit or explicit


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

26

2011 ANSYS, Inc.

April 17, 2014

Numerical Schemes

27

2011 ANSYS, Inc.

April 17, 2014

High Order Term Relaxation

28

2011 ANSYS, Inc.

April 17, 2014

Higher Order Term Relaxation


Only when high order spatial discretizations
are used (higher than first).
Improve calculation startup and behavior of
flow simulations
Prevent convergence from stalling in some
cases.
This is an effective alternative to starting the
solution first order, then switching to second
order spatial discretization at a later stage.
Not available with NITA

29

2011 ANSYS, Inc.

April 17, 2014

HOTR : Supersonic Jet Impingement


Density URF: 0.5
CFL: 2000
Default values for other Solution
Controls

With

No Impact on results

Without

30

2011 ANSYS, Inc.

April 17, 2014

HOTR : Supersonic Jet Impingement


With

Residuals stall at a higher value


without HOTR
Solution converged 2.5 times faster
with HOTR

31

2011 ANSYS, Inc.

April 17, 2014

Without

Reduced Rank Extrapolation

32

2011 ANSYS, Inc.

April 17, 2014

RRE
Reduced Rank Extrapolation should be
used to accelerate convergence of the
slowly converging cases
Available as a beta feature since 14.5
It is a vector extrapolation method using
the previous convergence steps
Inputs are :
The number of steps to use for extrapolation
(ie Subspace size)
The frequency of use of RRE

33

2011 ANSYS, Inc.

April 17, 2014

RRE : NACA 0012 airfoil


NACA 0012 at 0 angle of attack
High subsonic case at Mach 0.7
Realizable k-e
Implicit DBNS with CFL=25
RRE is used storing 25 previous
solutions

34

2011 ANSYS, Inc.

April 17, 2014

Pseudo Transient Method

35

2011 ANSYS, Inc.

April 17, 2014

Pseudo Time Step


Pseudo Time Step is an alternative to solution steering in DBNS
Traditional strategy for steady-state PBNS coupled solver.
1

a p pn1 pn a p pn1 aiin 1 S p

with

1
1

CFL

Pseudo transient method


adding a pseudo transient term to under-relax equation.
pVol p

n 1
p

pn

a
p

n 1
p

ai

n 1
i

Sp

with

length _ scale
velocity _ scale

This under-relaxation method depends on global scales rather


than local scales and therefore often converges better on
anisotropic meshes
36

2011 ANSYS, Inc.

April 17, 2014

Pseudo Timestep
The timestep is used to move the solution towards the final
answer
Relaxation of the equation non-linearities
Transient evolution of the flow from the initial guess to the
steady-state conditions
Converged solution is independent of the timestep used
Initial Guess
50 iterations
100 iterations

150 iterations
Final Solution
37

2011 ANSYS, Inc.

April 17, 2014

Automatic Setup of Pseudo Time Step

CFX

Fluent

Auto Timescale,

Automatic

Physical Timescale

User Defined

Local Timescale Factor (per zone)

38

2011 ANSYS, Inc.

April 17, 2014

Auto Timescale or Automatic


Length Scale
Timescale is automatically based on a length scale and a velocity scale
Three options are available to set this length scale :
Conservative
Aggressive
Specified or User defined
With the two first methods length scale is based on two easily available
length scale :
3

Volumetric length scale : =


Domain length scale : = max , ,

Conservative and Aggressive definition is the same in CFX and Fluent :


Conservative : m( , )
Aggressive : m( , )
39

2011 ANSYS, Inc.

April 17, 2014

Auto Timescale or Automatic


Velocity scale
There is 3 velocity scales which are calculated
Maximum velocity at boundary :
Maximum velocity in the flow field :
Pressure induced velocity : =

, ,

Moreover to identify specific physics more variables are computed :


For natural convection Flows : = ( )

For compressible flows : =

40

2011 ANSYS, Inc.

April 17, 2014

max( , , )

Auto Timescale or Automatic


Timescale

Timestep is calculated as : = min , , , , ,

0.3
max( , )

0.3

For solid zones : =

0.1

0.3
max( , , , )

where =

is the diffusity

Most of the time the Timestep provided is enough

41

2011 ANSYS, Inc.

April 17, 2014

User Timescale

Often faster convergence than Auto Timescale for appropriate


values

42

CFX

Fluent

Usually constant but expressions


possible, e.g dependent of
timestep number

Only constant values can be


applied

2011 ANSYS, Inc.

April 17, 2014

CFX and Local Timescale Factor (LTF)


Can accelerate convergence when vastly different local
velocity scales exist (e.g. jet entering a plenum)
Local Timescale Factor should be used carefully
Conservative value is less than 5
It should not exceed 10-20

Never use for fully converged solution; always finish off


with a constant timestep

43

2011 ANSYS, Inc.

April 17, 2014

Transient effect
Sometimes simulations which are run in steady state mode
will not converge even with good mesh quality and well
selected timestep.
If a steady state run shows oscillatory behavior of the
residual plots, a good test is to reduce or increase the
timestep by known factors.
If the period of oscillation of the residual plot changes by
changing the timestep, then the phenomenon is most likely
a numerical effect.
If the period stays the same, then it is probably a transient
effect.
In Fluent, switching back to a steady formulation might
reduce this problem
44

2011 ANSYS, Inc.

April 17, 2014

Pseudo Transient Method Efficiency


Reductions in the number of iterations required for
convergence of up to 90% were observed for some cases
CPU time savings are almost directly proportional to the
reduction in the number of iterations
Pseudo-transient relaxation
study Cases
Backward facing step
(turbulent: SST)
Film cooling benchmark
(turbulent: SA)
Flat plate, SST transition model
Rotor/Stator with the mixing
plane model
Centrifugal pump

Axial compressor stage


45

2011 ANSYS, Inc.

April 17, 2014

Courant number coupled: Pseudo-transient coupled:


# Iterations
# Iterations

750

75

2300

1350

1200

100

500

250

220
400

50
110

Pseudo Timestep per equation

Pseudo time step can be specified with reference to the


Navier-Stokes equation time scale : tScalar TSF tFlow

CFX

Fluent

pseudo transient can be switch Off


per equation under-relaxation
panel is then enabled
46

2011 ANSYS, Inc.

April 17, 2014

Pseudo Transient Method


Grid:
7138 quad zones
axisymmetric
Solver:
pressure based
coupled solver
Physical Models:
std k-e
standard wall functions
species transport
Premixed combustion
(propane + air)
Mesh at
inlet
47

2011 ANSYS, Inc.

April 17, 2014

Pseudo Transient Method

48

Case

PBCS
Pseudo Transient off

PBCS
Pseudo Transient on

PBCS
Pseudo Transient on
But off for Species & Energy

Iter.

244

125

66

2011 ANSYS, Inc.

April 17, 2014

Initialization

49

2011 ANSYS, Inc.

April 17, 2014

Four initialization methods

50

2011 ANSYS, Inc.

Standard

Hybrid

Full
MultiGrid

Previous
Calculation

April 17, 2014

Standard initialization
Initialization is done based on specific value
Boundary value can both be specified or calculated
from boundary conditions
Fluent

CFX

51

2011 ANSYS, Inc.

April 17, 2014

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

52

2011 ANSYS, Inc.

April 17, 2014

Fluent

Hybrid initialization (Fluent)


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.

This method is more suited with


low subsonic flows (Ma < 0.3)

All other variables, such as


temperature are automatically
patched based on domain
averaged values or a particular
interpolation method.
53

2011 ANSYS, Inc.

April 17, 2014

Hybrid initialization Example: Multiphase


Heat Exchanger
FLUENT
MFINLET(Auxiliary In)
MFR = 0.5; T0 = 388.7098 K

POUTLET(Auxiliary Out)
P = 0.0

POUTLET(Primary Out)
P = 0.0

MFINLET(Primary In)
MFR = 1.14; T0 = 322.04 K

WALL: Inviscid, Adiabatic

Case Setup :

54

PBNS, SIMPLE Scheme


Viscous Laminar,
Heat Exchanger - ON
LSQ Cell Based, First Order accurate

2011 ANSYS, Inc.

April 17, 2014

Initialization Fields

Hybrid initialization Example: Multiphase


Heat Exchanger
Std Init:
Iterations = 279
URF
Mom 0.7, Press 0.3, Den 1.0
Energy 0.99

55

2011 ANSYS, Inc.

April 17, 2014

Hybrid Init:
Iterations = 102
URF
Mom 0.7, Press 0.3, Den 1.0
Energy 1.0

Full MultiGrid initialization (Fluent)


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
56

2011 ANSYS, Inc.

April 17, 2014

FMG tips
Make sure before using FMG you have performed proper standard
or hybrid initialization (see previous slides)
Use the FMG verbosity, so you see convergence behavior
Examine the guessed solution from FMG before you proceed with
normal iterations.
In general you want to perform more cycles on coarse grids than
fine grids
Using too many grid levels can be problematic in some flow
topology:
Coarsest level may create single cells in thin passages leading to
break up in solution.

Coarse levels not sufficient to resolve hypersonic flow shocks,


leading to very bad shock structure straddling the outlines of the
agglomerated cells in coarse meshes. Thus we end up with
useless initial guess.
57

2011 ANSYS, Inc.

April 17, 2014

FMG Example
Numerical solution initialized from the free-stream flowfield
Full multigrid (FMG) initialization applied to obtain the initial solution

FMG initialization is launched by TUI command:


solve/initialize/fmg-initialization
For supersonic and hypersonic flows, it is recommended to reduce FMG
Courant number from 0.75 to 0.25:
solve/initialize/set-fmg-initialization

Initial solution after FMGI


58

2011 ANSYS, Inc.

April 17, 2014

Final converged solution

Previous calculation initialization


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
59

2011 ANSYS, Inc.

April 17, 2014

Simplified problem initialization


Sometimes solving a simplified version of the problem
first will provide a good initial guess for the real problem:

60

2011 ANSYS, Inc.

April 17, 2014

Sedan test case


Hybrid mesh (prisms + tetras)
3.9 million cells
3D, steady, double precision
Realizable k-epsilon turbulence
model + EWT
Pressure based coupled solver
Pseudo transient parameters
Time step Method : Automatic
Lenght scale Method : Conservative
Timescale factor : 1

61

2011 ANSYS, Inc.

April 17, 2014

Results comparison Vel Mag


Std init

Hyb init

Velocity field is closer


to the end solution for
the hybrid init, but the
max speed is quite
large

FMG init

V max = 55 m/s

62

2011 ANSYS, Inc.

April 17, 2014

V max = 213.6m/s

Interpo init

Velocity field is
predicted quite well
in both cases

Comparison
Initialization Number of
iteration to
convergence

63

Standard

600

Hybrid

500

FMG

250

Previous Cal.

150

All theses case have run on the same type of machines and
on the same number of procs.
The convergence process, looking at the residual, is
identical for the Std and Hyb init. While it is different for
the FMG & Ip.
Convergence is reached quicker with FMG and Ip in less
than 250 iter
while 500 iter is needed for the Hyb & Std.
2011 ANSYS, Inc.
April 17, 2014

Gig

sec

Sec

Comparison

The initialization time is clearly much bigger for the FMG


init followed by the hyb one.
The time/iter is equivalent for each case.
The RAM required to generate the initialization is increasing
with the process
The FMG initialization time is much bigger
64

2011 ANSYS, Inc.

April 17, 2014

PBNS Solver settings


for external aerodynamics

65

2011 ANSYS, Inc.

April 17, 2014

Introduction
Switching the pseudo-transient solver option can lead to
slower convergence on large cases
The pseudo transient term introduction can trigger the solver
sensibility to instabilities
Aerodynamics variables like drag or lift were observed to
oscillate in some cases using SST k-w
An alternative approach is to use the classic coupled PBNS
solver with F-Cycle for Turbulence, in a two or three steps
approach and play on CFL and under relaxation factors (high
for Turbulence equations)
Observed Outcome: faster convergence and reduced
oscillation of SST k-w
66

2011 ANSYS, Inc.

April 17, 2014

CFL and Under-Relaxations in PBNS


Under-relaxation of equations can be implicit and explicit :
Implicit:

+ +

Explicit: = +

The CFL number input inside fluent is a way to control all implicit
under-relaxation in the resolved equation at the same time

=
1

=
1 +

Values of CFL can be chosen in the range of 10-3 to 108 which


correspond to a range of 10-3 to 1 for the implicit under-relaxation

67

2011 ANSYS, Inc.

April 17, 2014

Example of improved Solver Settings


3 steps strategy

Advanced Solver Settings

Step 1

Step 2

Step 3

CFL

50

200

100

Pressure
explicit under relaxation

0.25

0.5

0.25

Pressure
explicit under relaxation

0.25

0.5

0.25

Turbulence
Implicit under relaxation

0.8

0.95

0.95

% of iterations

60

35

2 steps strategy

68

2011 ANSYS, Inc.

April 17, 2014

Step 1

Step 2

CFL

100

200

Pressure
explicit under relaxation

0.4

0.4

Pressure
explicit under relaxation

0.4

0.4

Turbulence
Implicit under relaxation

0.8

0.95

% of iterations

20

80

3 steps vs 2 steps strategy: NACA 4412


Default settings:
Oscillations!

3 steps

Takes about 450 it to fully stabilize forces


69

2011 ANSYS, Inc.

April 17, 2014

Chord = 299 mm
Span width = 150 mm
Angle of attack alpha = 13.86 deg.
Re ~ 1,000,000
About 3,000,000 cells, hybrid mesh (prism+tets)
SST kw

2 steps

Takes about 200 iterations


to fully stabilize forces

Formula 1 downforce test case


4M cells,
hybrid grid

Realizable k-e
SST k-w
SST k-w
with 3 step strategy

70

2011 ANSYS, Inc.

April 17, 2014

Solver settings
for thermal applications

71

2011 ANSYS, Inc.

April 17, 2014

Double-Precision Solver
The double-precision solver is designed to minimize truncation error and
thus improve the overall heat balance.

Fluent

CFX

Double precision doubles the memory need but only increases by 10% the
calculation time

72

2011 ANSYS, Inc.

April 17, 2014

MultiGrid Solver Parameters


Recommended Multi-Grid Cycle Method for cases where diffusion is the
predominant effect and for cases with high jump in thermal conductivity.

CFX

Fluent

Change the solver target


reduction scalar might help
smoother convergence

Using the F-Cycle (or W-Cycle) with


reduced termination criterion is
preferred

OR

73

2011 ANSYS, Inc.

April 17, 2014

MultiGrid Solver Parameters influence


16.2 Million Underhood case with high jump in thermal conductivity
at engine mount
Flexible-Cycle

Energy residuals

74

2011 ANSYS, Inc.

Temperature of engine mount

April 17, 2014

F-Cycle

Energy residuals

Temperature of engine mount

Under-Relaxation of Energy
Under-relaxation of energy equation can be implicit and explicit :
Implicit:

+ +

Explicit: = +
Generally if implicit URF is reduced to even slightly (to 0.99), it will
take many iterations to converge.
Instead, explicit URF can be reduced to as low as 0.1 and still obtain
convergence in reasonable number of iterations.

CFX

Fluent

Change the solver target


reduction scalar might help
smoother convergence

(rpsetvar 'explicit-relaxation? #t)


(rpsetvar 'temperature/explicit-relax 0.2)
(rpsetvar 'temperature/relax 1)

75

2011 ANSYS, Inc.

April 17, 2014

Explicit Under-Relaxation
15 million underhood case

explicit URF=0.5

76

2011 ANSYS, Inc.

April 17, 2014

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

The gradients of solution can be determined using one of these approaches:


CFX

Fluent

Trilinear (default)

Green-Gauss Cell-Based (GGCB)

Linear-Linear

Green-Gauss Node-Based (GGNB)


Least-Squares Cell-Based (LSCB) (default)

77

2011 ANSYS, Inc.

April 17, 2014

Gradient Schemes and conduction


To show the influence of the gradient scheme when a poor quality
mesh is used
A simple channel geometry with gas in between two walls
No flow
Gas has a conductivity of 0.1 W.K-1.m-1 for convenience
temperature at 50K

5mm

Symmetry

5.103 .9000
=
+50
0.1
= 500
=

Flux at 9000 W.m-2


78

2011 ANSYS, Inc.

April 17, 2014

Gradient Schemes and conduction


CFX

Fluent GGCB

0 K difference
Fluent LSCB

0 K difference

15 K difference
Fluent GGNB

4 K difference

Linear interpolation is always better when the conduction is predominant


79

2011 ANSYS, Inc.

April 17, 2014

Secondary Gradients
What is a secondary gradient?
Secondary gradient is introduced when a cell is skewed.
Disable this secondary gradient can help on convergence
for poor quality mesh
q k T n
T T
k w c f T
h

Tc
r

Tw

Perfect Hexahedral Mesh


Secondary Gradient = 0

2011 ANSYS, Inc.

Tc

Tw

80

Secondary gradient

April 17, 2014

Skewed Tetrahedral Mesh


Secondary Gradient
depends on skewness

Secondary Gradients
How to disable secondary gradients
Disabling secondary gradient only adjacent to walls (Alternative wall
formulation)
/solve set expert , yes , , ,

Disabling secondary gradient only in shell conduction zones


(rpsetvar 'temperature/secondary-gradient? #f)

Disabling secondary gradient in all cells, but shell conduction


(rpsetvar 'temperature/shell-secondary-gradient? #f)

81

2011 ANSYS, Inc.

April 17, 2014

Secondary Gradients
Do we loose accuracy by ignoring secondary gradient?
Typically, highly skewed cells are located in areas of less importance
(unresolved gaps, corners, etc.)
Thus, accuracy is not compromised if proper meshing guidelines are
followed.
Default

82

2011 ANSYS, Inc.

April 17, 2014

Without Secondary Gradients

Secondary Gradients
50K

Ignoring secondary gradient only


adjacent to walls improves robustness
without any loss of accuracy for cases
with highly skewed cells.

T?

Q=9,000 W/m^2
T(analytic)=9000*.005/.1+50=500K

Alternative Wall Formulation

Error = 42 %

83

2011 ANSYS, Inc.

April 17, 2014

LSCB

Error = 0 %

Speed-up conduction
convergence for transient
Thermal Applications

84

2011 ANSYS, Inc.

April 17, 2014

Equivalent thermal behavior


Equivalent transient behavior if 2 dimensionless quantities
are conserved :

Biot number

... heat transfer coefficient


L ... characteristic length
... solid heat conductance

85

2011 ANSYS, Inc.

April 17, 2014

Fourier number

... solid density


cp ... solid specific heat capacity
t ... time

Speedup Factor
A speedup factor f can be introduced so that : =

Assume only cp is varying :

All other variables are conserved


The 2 problems are equivalent
=

Lets consider the illustrating example of a solid square embedded into


cooling airflow

86

2011 ANSYS, Inc.

April 17, 2014

Solid square cooling example


Initial solid Temperature: 40C

constant flow velocity

Fluid Temperature: 25C

Speed-up factor of 2, 4, 100, 1000 are tested


87

2011 ANSYS, Inc.

April 17, 2014

Average Temperature decay :


Simulation time

real time

The time step are constant in t*


A smaller number of time-steps are needed for high acceleration factors
Method is valid for quasi stationary flow fields
88

2011 ANSYS, Inc.

April 17, 2014

Convergence Acceleration for


Stretched Meshes

89

2011 ANSYS, Inc.

April 17, 2014

Convergence Acceleration
For Stretched Meshes (CASM)
Accelerate the convergence of the
DBNS implicit on highly-stretched
meshes.
Convergence can be between 2 to 10
times faster than without using CASM.
Use CFL value multiplied by a factor
proportional to cell aspect ratio.
Cell stretched perpendicular to flow
skipped
Steady-State solution
Can be used with Solution-Steering
but Manual schedule adjustment is
required.
90

2011 ANSYS, Inc.

April 17, 2014

lmax

lmin

Standard time step


t CFL

CFL

lmin

CASM time step


t CFL

A
f

AR CFL

lmax

CASM
CASM option can be found in the
solver methods description.
When CASM is in use you typically
do not need to run the solver at very
high CFL value. Range between 2 to
50 is sufficient for most flow cases.
FMG initialization should be used
before solving flow with CASM

91

2011 ANSYS, Inc.

April 17, 2014

CASM : DPW-4 Wing-Body


Mach = 0.85, Re = 5e06 ,
AOA=2.2 deg
Turbulence model SST-k-w
HOTR = On
10 LBody

Mesh properties
3.5 million hex cell mesh
Max AR = 2.6e06

92

2011 ANSYS, Inc.

April 17, 2014

CASM : DPW-4 Wing-Body


10 times speed up
Slightly higher drag due to
higher numerical diffusion :
CASM : Cd = 0.0283607
Standard : Cd =0.0282161

93

2011 ANSYS, Inc.

April 17, 2014

200

2000

Conclusion

94

2011 ANSYS, Inc.

April 17, 2014

Conclusions
ANSYS CFD is working on the basis of five solvers
Each solver should be used knowing it most favourable domain
of application
Multiple now techniques exists to increase solver efficiency :

Higher Order Term Relaxation


Reduced Rank Extrapolation
Pseudo Transient Method
Convergence Acceleration for Stretched Mesh

Time to convergence can be greatly decreased using


these techniques

95

2011 ANSYS, Inc.

April 17, 2014

You might also like