Tips and Tricks for Faster Simulation Convergence v6
-
Upload
rafael-serrano-bello -
Category
Documents
-
view
928 -
download
140
description
Transcript of Tips and Tricks for Faster Simulation Convergence v6
-
2011 ANSYS, Inc. April 17, 2014 1
Tips and Tricks for faster simulation convergence
Dr. Valry Morgenthaler ANSYS France
March 2014
-
2011 ANSYS, Inc. April 17, 2014 2
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
Presentation Plan
-
2011 ANSYS, Inc. April 17, 2014 3
Introduction
-
2011 ANSYS, Inc. April 17, 2014 4
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 5
High Performance Computing
-
2011 ANSYS, Inc. April 17, 2014 6
Parallel/HPC in ANSYS Fluids
Every year parallel HPC has always been a major focus on enhanced simulation throughput
The cluster usage increases
GPU usage begins
0
2000
4000
6000
8000
10000
12000
14000
2009 2010 2011 2012 2013
number cores/cluster
0
1
2
3
4
5
6
7
8
9
2009 2010 2011 2012 2013
number cores/processor
0
2
4
6
8
10
12
14
16
18
2009 2010 2011 2012 2013
% of GPU
TOP500.Org
-
2011 ANSYS, Inc. April 17, 2014 7
Parallel Scalability for large cases
CFX
Up to 90% efficiency over 2048 cores
Fluent
Up to 86% efficiency over 10240 cores
0
100
200
300
400
500
600
700
800
900
0 2048 4096 6144 8192 10240 12288
Rat
ing
Number of Cores
96 Million cells
R15.0
Ideal
0
512
1024
1536
2048
0 512 1024 1536 2048
Wal
l Clo
ck S
pe
ed
up
Number of Cores
150 Million cells
ideal
15.0
14.5
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.
-
2011 ANSYS, Inc. April 17, 2014 8
Parallel Scalability for small cases
0
5000
10000
15000
20000
25000
0 64 128 192 256 320 384 448 512
Pe
rfo
rman
ce R
atin
g
Num Cores
SEDAN_4M Cells
12.0.19 13.0.1
Processor multicore architecture is also accounted for enabling also a higher parallel scalability for small cases
Fluent
-
2011 ANSYS, Inc. April 17, 2014 9
Partitioning continuing progress
Partitioning strategies and efficiency is reviewed at each ANSYS release
Compute Node 1 Compute Node 2
P1
P5
P3
P6
P2 P7
P4 P8
P1
P5 P3
P6
P2 P7
P4
P8
Partitioning step finds adjacency amongst partitions; partitions with max adjacency are grouped on same compute nodes
CFX
-
2011 ANSYS, Inc. April 17, 2014 10
Discrete Phase Particle tracking
More scalable discrete phase particle tracking Over 2x for 512-way parallel
0
1000
2000
3000
4000
5000
6000
7000
16 32 64 128 256 384 512
Rat
ing
246,000 cells, 1 million particles
Hybrid
MPI
2Domain
-
2011 ANSYS, Inc. April 17, 2014 11
Viewfactor calculation speedup
0.4 million surface clusters
1.1 million surface clusters
R13
R14
CFX
Cluster-to-cluster view factor file writing optimization
Fluent
GPU usage to reduce cluster-to-cluster view factor calculation
-
2011 ANSYS, Inc. April 17, 2014 12
Parallel File I/O and Startup
The bottleneck of File IO can be leverage using a Parallel File Systems :
PVFS2 (NASA Goddard) Lustre (Linux Cluster) GFS (Google File Sytem)
Case read time reduced significantly at high core counts
Start-up time for 8192-way parallel reduced from 30 minutes to 30 seconds
0
1000
2000
3000
4000
5000
6000
7000
1024 2048 4096 6144 8192 9216 10240
Tim
e in
se
con
ds
150M cell case read time
15.0.0
14.5.0
-
2011 ANSYS, Inc. April 17, 2014 13
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
-
2011 ANSYS, Inc. April 17, 2014 14
0
500
1000
1500
2000
2500
3000
3500
4000
0 2048 4096 6144 8192 10240 12288
Rat
ing
NumCores
truck_111m CRAY XE6
13.0.0
14.0.0
15.0.0
Make new architectures available
Support of CRAY XE6 architecture
Support for Intel Many-Integrated-Core architecture
-
2011 ANSYS, Inc. April 17, 2014 15
Mesh quality
-
2011 ANSYS, Inc. April 17, 2014 16
Meshing strategy
Accuracy
Simplicity Efficiency
-
2011 ANSYS, Inc. April 17, 2014 17
Meshing guidelines
Desired mesh quality
What is the maximum skewness and aspect
ratio you can tolerate?
Time available
Faster Tet-dominant mesh vs crafted Hex/hybrid mesh with lower cell
count
Desired cell count
Low cell count for resolving overall flow
features vs High cell count for greater details
Use of non conformal interface !!!
-
2011 ANSYS, Inc. April 17, 2014 18
Cell not too distorted
Cell not too stretched
Smooth Cells
transition
Mesh quality
Good Not Good
-
2011 ANSYS, Inc. April 17, 2014 19
Capture flow physics
Grid must be able to capture important physics:
Boundary layers
Heat transfer
Wakes, shock
Flow gradients,
Boundary layers: Velocity and temperature
10-15 elements
Expansion ratios 1.2 1.3
y+ 1 for heat transfer and transition modeling
-
2011 ANSYS, Inc. April 17, 2014 20
Contours of axial velocity magnitude
Hex mesh Tri mesh
U=0.1
U=1.0
Hex vs Tet mesh
Quad/Hex aligned with the flow are more accurate than Tri
Without dominant flow direction Quad & Tri equivalent
quad t
ri
T = 0
T =
1
U = V = 1.0 , U = V = 1.0 ,
T =
1
U =
V =
1.0
,
U =
V =
1.0
,
T = 0
Contours of temperature for inviscid flow
Accuracy comparison
-
2011 ANSYS, Inc. April 17, 2014 21
ANSYS Solvers
-
2011 ANSYS, Inc. April 17, 2014 22
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
-
2011 ANSYS, Inc. April 17, 2014 23
Density Based
Pressure Based
ANSYS Solvers
Implicit Segregated
All equations
are solved in a segrageted way
Implicit Coupled
Continuity, Momentum, Energy and Species
are solved in a coupled way
Implicit Coupled
Continuity and Momentum
are solved in coupled way
Explicit Coupled
All equatiions
are solved in a coupled way
Each of these technologies are also separated depending on how equations are coupled together
Fluent Fluent
Fluent Fluent
CFX
-
2011 ANSYS, Inc. April 17, 2014 24
Density Based
Pressure Based
ANSYS Solvers
Implicit Segregated
Mach < 0.3
Combustion, LES
Implicit Coupled
Mach > 2
Most effective solver
Implicit Coupled
Mach < 2
Most effective solver
Explicit Coupled
Mach > 2
Unsteady flows
Each of these technologies are also separated depending on how equations are coupled together
Fluent Fluent
Fluent Fluent
CFX
-
2011 ANSYS, Inc. April 17, 2014 25
Pressure-based Solvers
(FLUENT & CFX)
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
Pressure-Based (segregated)
Solve Mass
Continuity;
Update Velocity
Solve U-Momentum
Solve V-Momentum
Solve W-Momentum
Pressure-Based (coupled)
Solve Turbulence Equation(s)
Solve Species
Solve Energy
Solve Other Transport Equations as required
Solve Mass
& Momentum
Pressure-Based
-
2011 ANSYS, Inc. April 17, 2014 26
Density-based Solvers
(FLUENT)
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
DBS solvers can be run implicit or explicit
Density-Based (coupled implicit)
Solve Turbulence Equation(s)
Solve Other Transport Equations as required
Solve Mass,
Momentum,
Energy,
Species
Density-Based (coupled explicit)
Solve Mass,
Momentum,
Energy,
Species
Density-Based
-
2011 ANSYS, Inc. April 17, 2014 27
Numerical Schemes
-
2011 ANSYS, Inc. April 17, 2014 28
High Order Term Relaxation
-
2011 ANSYS, Inc. April 17, 2014 29
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
-
2011 ANSYS, Inc. April 17, 2014 30
HOTR : Supersonic Jet Impingement
With
Without
Density URF: 0.5
CFL: 2000
Default values for other Solution Controls
No Impact on results
-
2011 ANSYS, Inc. April 17, 2014 31
HOTR : Supersonic Jet Impingement
Residuals stall at a higher value without HOTR
Solution converged 2.5 times faster with HOTR
With Without
-
2011 ANSYS, Inc. April 17, 2014 32
Reduced Rank Extrapolation
-
2011 ANSYS, Inc. April 17, 2014 33
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
-
2011 ANSYS, Inc. April 17, 2014 34
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
-
2011 ANSYS, Inc. April 17, 2014 35
Pseudo Transient Method
-
2011 ANSYS, Inc. April 17, 2014 36
Pseudo Time Step
Pseudo Time Step is an alternative to solution steering in DBNS
Traditional strategy for steady-state PBNS coupled solver.
with
Pseudo transient method
adding a pseudo transient term to under-relax equation.
with
This under-relaxation method depends on global scales rather than local scales and therefore often converges better on anisotropic meshes
pniinppnpnpp Saaa
1111
11
CFL
p
n
ii
n
pp
n
p
n
p
pp Saat
Vol
11
1
scalevelocity
scalelengtht
_
_
-
2011 ANSYS, Inc. April 17, 2014 37
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
Pseudo Timestep
-
2011 ANSYS, Inc. April 17, 2014 38
Automatic Setup of Pseudo Time Step
CFX
Auto Timescale,
Physical Timescale
Local Timescale Factor (per zone)
Fluent
Automatic
User Defined
-
2011 ANSYS, Inc. April 17, 2014 39
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 :
Volumetric length scale : = 3
Domain length scale : = max , ,
Conservative and Aggressive definition is the same in CFX and Fluent :
Auto Timescale or Automatic Length Scale
Conservative : m(, )
Aggressive : m(, )
-
2011 ANSYS, Inc. April 17, 2014 40
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 : =max(,,)
Auto Timescale or Automatic Velocity scale
-
2011 ANSYS, Inc. April 17, 2014 41
Timestep is calculated as : = min , , , , ,
For solid zones : =
where =
is the diffusity
Most of the time the Timestep provided is enough
Auto Timescale or Automatic Timescale
0.3
max( , )
0.3
0.1
0.3
max( , , , )
2
-
2011 ANSYS, Inc. April 17, 2014 42
Often faster convergence than Auto Timescale for appropriate values
CFX
Usually constant but expressions possible, e.g dependent of timestep number
Fluent
Only constant values can be applied
User Timescale
-
2011 ANSYS, Inc. April 17, 2014 43
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
CFX and Local Timescale Factor (LTF)
-
2011 ANSYS, Inc. April 17, 2014 44
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
-
2011 ANSYS, Inc. April 17, 2014 45
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
Courant number coupled: # Iterations
Pseudo-transient coupled: # Iterations
Backward facing step (turbulent: SST)
750 75
Film cooling benchmark (turbulent: SA)
2300 1350
Flat plate, SST transition model 1200 100
Rotor/Stator with the mixing plane model
500 250
Centrifugal pump 220 50 Axial compressor stage 400 110
-
2011 ANSYS, Inc. April 17, 2014 46
Pseudo time step can be specified with reference to the Navier-Stokes equation time scale :
FlowScalar tTSFt
Pseudo Timestep per equation
CFX
Fluent
pseudo transient can be switch Off per equation under-relaxation panel is then enabled
-
2011 ANSYS, Inc. April 17, 2014 47
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
-
2011 ANSYS, Inc. April 17, 2014 48
Case PBCS Pseudo Transient off
PBCS Pseudo Transient on
PBCS Pseudo Transient on
But off for Species & Energy
Iter. 244 125 66
Pseudo Transient Method
-
2011 ANSYS, Inc. April 17, 2014 49
Initialization
-
2011 ANSYS, Inc. April 17, 2014 50
Four initialization methods
Standard Hybrid
Full MultiGrid
Previous Calculation
-
2011 ANSYS, Inc. April 17, 2014 51
Standard initialization
Initialization is done based on specific value Boundary value can both be specified or calculated
from boundary conditions
CFX
Fluent
-
2011 ANSYS, Inc. April 17, 2014 52
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)
Fluent
-
2011 ANSYS, Inc. April 17, 2014 53
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.
-
2011 ANSYS, Inc. April 17, 2014 54
MFINLET(Primary In) MFR = 1.14; T0 = 322.04 K
POUTLET(Primary Out) P = 0.0
MFINLET(Auxiliary In) MFR = 0.5; T0 = 388.7098 K
POUTLET(Auxiliary Out) P = 0.0
Case Setup : PBNS, SIMPLE Scheme Viscous Laminar, Heat Exchanger - ON LSQ Cell Based, First Order accurate
WALL: Inviscid, Adiabatic
Initialization Fields
FLUENT
Hybrid initialization Example: Multiphase Heat Exchanger
-
2011 ANSYS, Inc. April 17, 2014 55
Std Init: Iterations = 279 URF
Mom 0.7, Press 0.3, Den 1.0 Energy 0.99
Hybrid Init: Iterations = 102 URF
Mom 0.7, Press 0.3, Den 1.0 Energy 1.0
Hybrid initialization Example: Multiphase Heat Exchanger
-
2011 ANSYS, Inc. April 17, 2014 56
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
-
2011 ANSYS, Inc. April 17, 2014 57
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.
FMG tips
-
2011 ANSYS, Inc. April 17, 2014 58
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 Final converged solution
-
2011 ANSYS, Inc. April 17, 2014 59
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
-
2011 ANSYS, Inc. April 17, 2014 60
Simplified problem initialization
Sometimes solving a simplified version of the problem first will provide a good initial guess for the real problem:
-
2011 ANSYS, Inc. April 17, 2014 61
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
-
2011 ANSYS, Inc. April 17, 2014 62
Results comparison Vel Mag
Std init Hyb init
FMG init Interpo init
V max = 213.6m/s
V max = 55 m/s
Velocity field is closer to the end solution for the hybrid init, but the
max speed is quite large
Velocity field is predicted quite well
in both cases
-
2011 ANSYS, Inc. April 17, 2014 63
Comparison
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.
Initialization Number of iteration to convergence
Standard 600
Hybrid 500
FMG 250
Previous Cal. 150
-
2011 ANSYS, Inc. April 17, 2014 64
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
sec G
ig
Sec
-
2011 ANSYS, Inc. April 17, 2014 65
PBNS Solver settings for external aerodynamics
-
2011 ANSYS, Inc. April 17, 2014 66
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
-
2011 ANSYS, Inc. April 17, 2014 67
CFL and Under-Relaxations in PBNS
Under-relaxation of equations can be implicit and explicit :
Implicit:
= + +
1
Explicit: = +
The CFL number input inside fluent is a way to control all implicit under-relaxation in the resolved equation at the same time
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
=
1 =
1 +
-
2011 ANSYS, Inc. April 17, 2014 68
Example of improved 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 5 60 35
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 strategy
2 steps strategy
Advanced Solver Settings
-
2011 ANSYS, Inc. April 17, 2014 69
3 steps vs 2 steps strategy: NACA 4412
Takes about 450 it to fully stabilize forces Takes about 200 iterations to fully stabilize forces
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
3 steps 2 steps
Default settings: Oscillations!
-
2011 ANSYS, Inc. April 17, 2014 70
Formula 1 downforce test case
4M cells, hybrid grid
Realizable k-e
SST k-w
SST k-w with 3 step strategy
-
2011 ANSYS, Inc. April 17, 2014 71
Solver settings for thermal applications
-
2011 ANSYS, Inc. April 17, 2014 72
Double-Precision Solver
The double-precision solver is designed to minimize truncation error and thus improve the overall heat balance.
Double precision doubles the memory need but only increases by 10% the calculation time
CFX
Fluent
-
2011 ANSYS, Inc. April 17, 2014 73
Fluent
Using the F-Cycle (or W-Cycle) with reduced termination criterion is preferred
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.
OR
CFX
Change the solver target reduction scalar might help smoother convergence
-
2011 ANSYS, Inc. April 17, 2014 74
MultiGrid Solver Parameters influence
F-Cycle Flexible-Cycle
Energy residuals Temperature of engine mount
16.2 Million Underhood case with high jump in thermal conductivity at engine mount
Energy residuals Temperature of engine mount
-
2011 ANSYS, Inc. April 17, 2014 75
Under-Relaxation of Energy
Under-relaxation of energy equation can be implicit and explicit :
Implicit:
= + +
1
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.
Fluent
(rpsetvar 'explicit-relaxation? #t)
(rpsetvar 'temperature/explicit-relax 0.2)
(rpsetvar 'temperature/relax 1)
CFX
Change the solver target reduction scalar might help smoother convergence
-
2011 ANSYS, Inc. April 17, 2014 76
15 million underhood case
Explicit Under-Relaxation
explicit URF=0.5
-
2011 ANSYS, Inc. April 17, 2014 77
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)
-
2011 ANSYS, Inc. April 17, 2014 78
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
Flux at 9000 W.m-2
Symmetry
=
+
=5.103.9000
0.1+50
= 500
5mm
-
2011 ANSYS, Inc. April 17, 2014 79
Gradient Schemes and conduction
CFX Fluent GGCB
Fluent GGNB Fluent LSCB
0 K difference
0 K difference
15 K difference
4 K difference
Linear interpolation is always better when the conduction is predominant
-
2011 ANSYS, Inc. April 17, 2014 80
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
cT
wT
h
Tfh
TTk
Tkq
cw
n
cT
wT
hr
Perfect Hexahedral Mesh Secondary Gradient = 0
Skewed Tetrahedral Mesh Secondary Gradient
depends on skewness
Secondary gradient
-
2011 ANSYS, Inc. April 17, 2014 81
Secondary Gradients
How to disable secondary gradients Disabling secondary gradient only adjacent to walls (Alternative wall
formulation)
Disabling secondary gradient only in shell conduction zones
Disabling secondary gradient in all cells, but shell conduction
/solve set expert , yes , , ,
(rpsetvar 'temperature/secondary-gradient? #f)
(rpsetvar 'temperature/shell-secondary-gradient? #f)
-
2011 ANSYS, Inc. April 17, 2014 82
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 Without Secondary Gradients
-
2011 ANSYS, Inc. April 17, 2014 83
Secondary Gradients
Ignoring secondary gradient only adjacent to walls improves robustness without any loss of accuracy for cases with highly skewed cells.
LSCB
Q=9,000 W/m^2
50K
T? T(analytic)=9000*.005/.1+50=500K
Error = 42 % Error = 0 %
Alternative Wall Formulation
-
2011 ANSYS, Inc. April 17, 2014 84
Speed-up conduction convergence for transient Thermal Applications
-
2011 ANSYS, Inc. April 17, 2014 85
Equivalent thermal behavior
=
=
Equivalent transient behavior if 2 dimensionless quantities are conserved :
Biot number Fourier number
... heat transfer coefficient L ... characteristic length ... solid heat conductance
... solid density cp ... solid specific heat capacity t ... time
-
2011 ANSYS, Inc. April 17, 2014 86
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
=
=
=
=
-
2011 ANSYS, Inc. April 17, 2014 87
Solid square cooling example
Initial solid Temperature: 40C
Fluid Temperature: 25C
Speed-up factor of 2, 4, 100, 1000 are tested
constant flow velocity
-
2011 ANSYS, Inc. April 17, 2014 88
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
-
2011 ANSYS, Inc. April 17, 2014 89
Convergence Acceleration for Stretched Meshes
-
2011 ANSYS, Inc. April 17, 2014 90
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.
minl
maxl
minlCFL
A
VCFLt
f
Standard time step
maxlCFLAR
A
VCFLt
f
CASM time step
-
2011 ANSYS, Inc. April 17, 2014 91
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
-
2011 ANSYS, Inc. April 17, 2014 92
Mach = 0.85, Re = 5e06 , AOA=2.2 deg
Turbulence model SST-k-w
HOTR = On
Mesh properties
3.5 million hex cell mesh
Max AR = 2.6e06
CASM : DPW-4 Wing-Body
10 LBody
-
2011 ANSYS, Inc. April 17, 2014 93
10 times speed up
Slightly higher drag due to higher numerical diffusion :
CASM : Cd = 0.0283607
Standard : Cd =0.0282161
200 2000
CASM : DPW-4 Wing-Body
-
2011 ANSYS, Inc. April 17, 2014 94
Conclusion
-
2011 ANSYS, Inc. April 17, 2014 95
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