This action might not be possible to undo. Are you sure you want to continue?
Modeling Transient Flows
with Fluent 6
with Fluent 6
Frank Kelecy Frank Kelecy
Fluent Inc. Fluent Inc.
June 9, 2005 June 9, 2005
Agenda
Motivation and Goals
Algorithms
Temporal Discretization
Subiteration and Dual Time Stepping
Noniterative Schemes
Setting Up Unsteady Problems
Solving and Postprocessing
Physical Models and Unsteady Flows
Summary
Appendix
Additional Material on Solver Features and Physical Models
Motivation
Nearly all flows in nature are unsteady!
Steadystate assumption is possible if we…
Ignore unsteady fluctuations
Employ ensemble/timeaveraging to remove
unsteadiness (e.g. turbulence modeling)
In CFD, steadystate methods are preferred
Lower computational cost
Easier to postprocess and analyze
Many applications, however, require resolution of unsteady flow
Typical Applications
Aerodynamics (aircraft, land vehicles,etc.)
Vortex shedding
Rotating Machinery
Rotorstator interaction
Rotating stall, surging
Multiphase Flows
Free surface motions
Bubble dynamics (fluidized beds, bubble columns)
Deforming Domains
Incylinder combustion
Store separation
Unsteady Heat Transfer
Transient heating, cooling
Origin 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
Timedependent boundary conditions, source terms drive the unsteady flow
field
Examples: pulsing flow in a nozzle, rotorstator interaction in a turbine stage
KelvinHelmholtz cloud instability Rotorstator interaction in an axial compressor
Goals of Unsteady CFD Analysis
Simulate transient flow field over a specified time period
Solution may approach
Steadystate solution flow variables stop changing with time
Timeperiodic solution flow variables fluctuate with a repeating
temporal pattern
Goal may also be to simply track the flow over the simulation
period
Free surface flows, moving shock waves
Extract quantities of interest
Natural frequencies (e.g. Strouhal Number)
Time, RMS averages
Timerelated parameters (e.g. time required to cool a hot solid,
residence time of a pollutant)
Spectral data (FFT)
Agenda
Motivation and Goals
Algorithms
Temporal Discretization
Subiteration and Dual Time Stepping
Noniterative Schemes
Setting Up Unsteady Problems
Solving and Postprocessing
Physical Models and Unsteady Flows
Summary
Appendix
Additional Material on Solver Features and Physical Models
Unsteady Equations
+ = +
V A A V
dV S A d A d V dV
t
r r r
unsteady
convection diffusion generation
Eqn.
continuity 1
xmom. u
ymom. v
energy h
Generic unsteady transport equation
Finite Volume Discretization
V S A A V V
t
f
faces
f f f
faces
f f f
+ = +
r r r
) (
) (
control
volume
• Evaluate surface and volume
integrals over control volume using
finite volume approach
• Variables now represent averages
evaluated at cell or face centers
• Temporal discretization to be
determined…
Temporal Discretization
(
¸
(
¸
A + · V I + · ÷
A
=
=
c
c
¿ ¿
V S A A V
V
F
F
t
f
faces
f f f
faces
f f f  
  µ 

µ
r r r
) ( ) (
1
) (
) (
) (
• Write discrete unsteady equations as
Need to discretize the time derivative…
Temporal Discretization (2)
FirstOrder Scheme
) (
) ( ) (
1
F
t
n n
=
+
) (
2
) ( ) ( 4 ) ( 3
1 1
F
t
n n n
=
+
+
time
t
tt
t+t
n
n+1
n1
n = time step index
t = physical time
SecondOrder Scheme
How is F() evaluated?
Explicit Time Integration
Evaluate F() at current time level (n)
Example: First order explicit scheme
) ( ) ( ) (
1 n n n
tF + =
+
Implications
Simplest approach – data known at current time level
All cells are marched in time with the same time step
Time step is restricted by stability limits, typically in the form of the
Courant number:
Since Courant number < 1, maximum stable time step is mesh
dependent, and is tied to the smallest cell in the domain!
1 No. Courant <
x
t V
V = fluid velocity scale
t = time step
x = characteristic mesh size
Explicit RungeKutta Scheme
Fluent’s CoupledExplicit Solver uses a multistage RungeKutta
scheme
RungeKutta scheme provides better stability and a lessrestrictive
time step limit for nonlinear equations than simple explicit scheme
For compressible flows, time step is computed as
m n
i
i
n i
n
tF
) ( ) (
) ( ) ( ) (
) ( ) (
1
1
0
1,2,3...m i
=
+ =
=
+
=
a u
x
CFL t
+
=
x = local grid size
u = local fluid velocity
a = speed of sound
CFL=Courant number
Implicit Time Integration
Evaluate F() at future (n+1) time level
Example: First order (Euler) implicit scheme
) ( ) ( ) (
1 1 + +
+ =
n n n
tF
Implications
Solution unknowns are coupled together at future time level (n+1)
Time step is not tied to Courant number stability restrictions
We can “theoretically” use as large a time step as we want
(unconditionally stable) – though this is only strictly true for
linear equations, for which unconditional stability can be proven
mathematically
How do we handle the coupling at future time levels?
Subiteration
We can deal with the coupling of the discrete equations at the
future time level by iteratively solving the implicit equations as
follows:
Define a provisional solution
i
which is initialized with
the current solution
n
Iteratively solve the implicit equations until the provisional
solution satisfies the equations
i
n+1
as the subiteration process converges
Example: First Order Implicit Scheme
1,2,3... i ) ( ) ( ) ( = + =
i n i
tF
(i = iteration count)
Implications of Subiteration
Solution of implicit equations for a single time step is identical to the
solution of a steadystate problem
Subiteration process is similar to solving a steadystate solution
from a prescribed initial condition
The number of subiterations required to converge the subiteration
process will depend upon the time step
In general, the number of subiterations increases as the time
step is increased
Residuals are a general guide to convergence, but…
…you may wish to observe other solution monitors as functions of
iteration to ensure that the solution is converging properly
Subiteration is also deals with nonlinearity and coupling in the
unsteady equations
Subiteration can be applied to both the segregated and coupled
solvers
Subiteration Convergence Behavior
t 10t
DualTime Stepping
Dual time stepping is a variation of subiteration which is better
suited to the coupled solver algorithms
Essential idea – add an extra “unsteady” term to the equations
which is integrated in a “pseudotime”
) (
~
) (
) (
=
=
=
+
t
t
terms) source (fluxes, vector RHS
variables dependent coupled of vector
=
=
DualTime Stepping (2)
We note that the new form of the equations is identical in form to
the old – so we can employ the same algorithms
Example: mstage RungeKutta scheme
m p
i
i
p i
p
tF
) ( ) (
) ( ) ( ) (
) ( ) (
1
1
0
1,2,3...P p 1,2,3...m i
=
+ =
=
+
= =
P = number of pseudotime steps
Implications of DualTime Stepping
Dualtime stepping permits explicit schemes (like Runge
Kutta) to be used with an implicit temporal discretization
Like subiteration, dualtime stepping requires convergence of
the solution in pseudotime to obtain the solution at the next
time level
The number of pseudotime steps required depends on the
time step
Improved preconditioning for coupled implicit (in time)
solver
Mainly benefits accuracy and robustness for low Mach
number flows
Coupled Solver Efficiency Improvements in
Fluent 6.2
Old preconditioning
New preconditioning
Baseline solution
(Fourstage RK)
Pressure wave
propagation
.One of the downsides of subiteration schemes is that they can be
inefficient (i.e. solver uses more subiterations than it really needs)
Time derivative discretization introduces truncation error
Splitting of the operators in the solver introduces a time step related
splitting error
Subiteration tries to eliminate the splitting error….BUT…
…the overall timeaccuracy can be preserved as long as the
splitting error is O(t
2
)
Truncation error
O( t
2
)
Splitting error
O( t
n
)
Overall timediscretization
error for 2
nd
order scheme
O( t
2
)
Noniterative Schemes (Segregated Solver)
New in 6.2 for the segregated solver
No outer (pressurevelocity) iteration
within a timestep
Subiterations are needed to account for
the deferredcorrections, nonlinearity in
and coupling among the equations
Splitting error ~ O(t
2
)
Speedup by a factor ~ N
ITA
/2 (N
ITA
is the
number of iterations per time step)
Two flavors
PISO
Fractionalstep method
Solve k and
Solve U,V,W Eq.
Solve Pressure Correction
Correct Velocity, Pressure,Flux
Next timestep
n += 1
t = t + nt
Solve other scalars
NonIterative TimeAdvancement (NITA)
Schemes
Originally proposed as a noniterative scheme (Issa, 1985)
Splitting error in the PISO scheme can be made smaller
than the truncation error (by multiple “corrector” steps).
Consists of 1 predictor and N corrector steps (N =2 for
2
nd
order accuracy)
Fluent 6.2 newly offers a new NITA version of PISO
scheme
Energy & turbulence equations and compressibility
effects are still loosely coupled.
You can still use PISO in a subiterative manner is
desired
The NITA PISO Scheme
The NITA FractionalStep Method (FSM)
Employs an Approximate Factorization technique to solve
the momentum and pressure correction equations


.

\

+


.

\

=


.

\

(
¸
(
¸
+
+
c
m
n
n
b p
D
G A b r u
0 0
1
1
matrix  block Original
o
43 42 1
( ) [ ]
2
1
1
matrices Factorized
0 0
0
t
b p
I
tG I
DG t D
A
c
m
n
n
A +


.

\

+


.

\

=


.

\

(
¸
(
¸
A
(
¸
(
¸
A
+
+
O
b r u
o
4 4 4 4 8 4 4 4 4 7 6
Exact
approximate
factorization
Approximate


.

\

+


.

\

=


.

\

(
¸
(
¸
A
(
¸
(
¸
A


.

\

+
+
+
c
m
p
n
n
b p
I
tG I
DG t D
A
n
b r u
u
0 0
0
1
ˆ
1
1
4 4 4 3 4 4 4 2 1
o
o


.

\

=


.

\

(
¸
(
¸
A


.

\

+


.

\

=


.

\

(
¸
(
¸
A
+
+
+
+
1
1
1
1
ˆ
0
0
ˆ
0
n
n
n
c
m
n
p
p
I
tG I
b
p
DG t D
A
o
o
o
u
u
b r
u
1 1
1
ˆ
ˆ
+ +
+
A ÷ =
= A
+ =
n n
c n
m
p tG
b p DG t
A
o
o
u u
b r u
NITA FSM – Splitting of Equations
The FSM is very similar to the “segregated” algorithm.
Closely resembles the SIMPLEC scheme on a periteration
basis
Cheaper (by approx. 20 %) than the PISO scheme on a
pertimestep basis
Splitting errors will be different than the PISO
Best choice between PISO and FSM will be somewhat
problem dependent
NITA FSM Implications
Subiterations are introduced to the individual equations and/or
a group of the individual equations.
Accounts for nonlinearity in and coupling among the
equations, deferredcorrection terms, BC’s and solution
dependent source terms
New convergence criteria for the subiterations
Use initial residuals at each timestep as the reference
values for the convergence for the subiterations and the
AMG cycle
The default criteria were determined based on an extensive
testing.
Solutions can be explicitly underrelaxed in the subiterations.
The massflux is updated after each momentum subiteration.
Default for secondorder timediscretization
NITA Subiteration
Supported physical models
Incompressible and weakly compressible (up to high
subsonic)
Laminar (DNS)
All turbulence models including LES, DES and RANS
models
Passive scalars (heat transfer with constant properties,
species transport w/o reaction)
VOF
Compressible liquid (UDF)
Sliding mesh
1D coupling (WAVE, GTPower, Optimal Power)
Compressible flows (transonic, supersonic)
NonNewtonian fluids
MDM
NITA Schemes and Physical models
NITA Schemes and Physical models (2)
Not supported (NITA schemes cannot be selected with these
models)
Multiphase models (except VOF)
Radiation models
Reacting species and all combustions models
DPM, spark, crevice models
Phase change (solidification & melting)
UDS transport
Inviscid ideal gas
Porous media, porous jump, fan model
t u u & sin
0
=
y
Noniterative fractionalstep (NITA) method vs. fully
iterative method (ITA) and exact solution
NITA Example: Oscillating Plate
Noniterative scheme vs. fullyiterative scheme
NITA Example: Exhaust Manifold
Noniterative solution identical to
standard subiteration scheme
Comparison of total CPUtime
Noniterative scheme reduces CPU time by factor of 5!
0
0.2
0.4
0.6
0.8
1
Iterative Noniterative
Iterative
Noniterative
NITA Example: Exhaust Manifold (2)
FLUENT 6.1
ITERATIVE PISO
CPU=29,591
FLUENT 6.2
ITERATIVE PISO
CPU=15,794
FLUENT 6.2
NITA –
Fractional Step
CPU=4,043
FLUENT 6.2
NITA – PISO
CPU=3,450
NITA Example: VOF Tank Sloshing
Agenda
Motivation and Goals
Algorithms
Temporal Discretization
Subiteration and Dual Time Stepping
Noniterative Schemes
Setting Up Unsteady Problems
Solving and Postprocessing
Physical Models and Unsteady Flows
Summary
Appendix
Additional Material on Solver Features and Physical Models
Unsteady Schemes: Segregated Solver
Implicit Schemes only
First or Second order
accuracy in time
NITA schemes
PISO or FSM set in
SolveControls
Frozen Flux Formulation
Not applicable to NITA
schemes
Frozen Flux Formulation
An option for the segregated solver which reduces the non
linearity of the convection terms
Advantage: Improves convergence of the subiteration loop
Limitations
Only available for single phase flows
Cannot be used with moving/deforming meshes
f
faces
n
f
n
f
n
f
n
f
faces
f f f
A V A V
¿ ¿
+
+
÷÷ ÷
(
¸
(
¸
1
1
 µ  µ
Segregated Solver Notes  Subiteration
Use PISO scheme for PressureVelocity coupling
Provides faster convergence for unsteady flows than the
standard SIMPLE approach
Select number of subiterations per time step to obtain good
convergence
Ideally, you should observe residuals decline by several orders of
magnitude to levels similar to that of a steadystate calculation
(actual residual level will be problem dependent)
If convergence is not adequate…
Adjust solver controls (underrelaxations, discretizations)
Reduce the time step
In general, try to employ second order accurate scheme unless…
Numerical stability is a concern
Transient is not of interest (time march to steadystate or time
periodic solution)
Activate second order when timeperiodicity is achieved
Beginning a calculation from an approximate initial condition (e.g.
impulsive startup)
Segregated Solver Notes  NITA
Choose PISO or FSM under
PressureVelocity Coupling
NITA Controls – The BASIC
Solution Process
Inner subiterations are
performed for both PISO
and FSM until a termination
criterion is satisfied
(described on next slide)
A final subiteration is then
performed before exiting
the loop – a residual
tolerance is applied to
ensure this final sub
iteration is well converged
Note – convergence within
each subiteration is controlled
by the AMG solver settings in
SolveControlsMultigrid
Segregated Solver Notes – NITA (2)
NITA Controls
Max. Corrections
maximum number of (inner) subiterations performed for each equation
Correction Tolerance
Subiterations terminate when ratio of current subiteration initial (0
th
) AMG
residual and the first subiteration initial (0
th
) AMG residual fall below this value
Residual Tolerance
During the final iteration, the AMG solver is converged until the ratio of the
current AMG residual and the first subiteration initial (0
th
) AMG residual fall
below this value
Relaxation Factor
Explicit underrelaxation factor applied to variables between subiterations
Segregated Solver Notes – NITA (3)
NITA Controls – Recommendations
Default settings should be good for most problems
Convergence of the AMG solver can be monitored by Verbosity
in the Multigrid Controls panel to 1
For problems involving very small time steps, diagonal
dominance is high and convergence should be driven down
further by reducing the Residual Tolerance
For problems involving larger time steps, Residual Tolerance
may be increased to avoid wasting AMG iterations due to
residual tolerance threshold not being met
If divergence is detected in the subiteration process, reduce the
Relaxation Factor values to 0.7 – 0.8.
Unsteady Schemes: Coupled Solvers
Coupled Explicit
Explicit time marching scheme
NOTE – For this scheme,
the time step is chosen by
the solver based on
stability considerations
First and second order implicit
schemes (dualtime stepping)
Coupled Implicit
First and second order implicit
schemes (dualtime stepping)
Coupled Solver Notes
Use coupled explicit solver with the explicit time stepping
formulation for transient shock waves and related flows
More accurate and less expensive than the implicit
formulations
The FAS multigrid and residual smoothing should not be used
for timeaccurate calculations when using the explicittime
stepping formulation.
The 2ndorder timeimplicit formulation should not be used in
capturing time accurate shock propagation. The scheme is
dispersive.
The 1storder timeimplicit formulation can be used to capture time
accurate shock propagation if sufficiently small time step is
specified and if the solution is allowed to converge at each time
level.
Unsteady Boundary Conditions
Most boundary conditions can be prescribed as functions of
time through
UserDefine Functions (UDF)
Profile files
Unsteady UDF Macros
Several macros are available for accessing various time
related quantities in your UDF
Unsteady UDF Example
/**********************************************************************
unsteady.c
UDF for specifying a transient velocity profile boundary condition
***********************************************************************/
#include "udf.h"
DEFINE_PROFILE(unsteady_velocity, thread, position)
{
face_t f;
real t = CURRENT_TIME;
begin_f_loop(f, thread)
{
F_PROFILE(f, thread, position) = 20. + 5.0*sin(10.*t);
}
end_f_loop(f, thread)
}
Macro for accessing physical time
Unsteady Profile Files (1)
((profilename transient n periodic?)
(field_name1 a1 a2 a3 .... an)
(field_name2 b1 b2 b3 .... bn)
.
.
.
.
(field_namer r1 r2 r3 .... rn))
Flag for time periodic
profile (0=no, 1=yes)
Number of data points
per field
((sampleprofile transient 3 0)
(time 1 2 3)
(u 10 20 30)
)
Sample file
Standard Format
Read into FLUENT using FileReadProfile…
Unsteady Profile Files (2)
profilename n_field n_data periodic?
fieldname1 fieldname2 fieldname3 .... fieldnamen_field
v11 v21 ... ... ... ... vn_field1
v12 v22 ... ... ... ... vn_field2
.
.
.
v1n_data v2n_data ... ... ... ... vn_fieldn_data
Flag for time periodic
profile (0=no, 1=yes)
Number of data points
per field
sampletabprofile 2 3 1
time u
1 10 2
20 3 30
Sample file
Number of fields
Tabular Format
Read into FLUENT using TUI Command:
file/readtransienttable
Agenda
Motivation and Goals
Algorithms
Temporal Discretization
Subiteration and Dual Time Stepping
Noniterative Schemes
Setting Up Unsteady Problems
Solving and Postprocessing
Physical Models and Unsteady Flows
Summary
Appendix
Additional Material on Solver Features and Physical Models
Running an Unsteady Solution
Basic Steps
Select unsteady option in
Define Models Solver
Set up physical models, BCs as usual
Prescribe initial conditions
Set solver settings and monitors
If using segregated solver with subiteration
or dual time stepping…
Select time step and max iterations per
time step
Prescribe the number of time steps
Run the calculation (Iterate)
Initial Conditions
Accurate initial conditions are just as important as boundary
conditions for unsteady problems
Initial solution should be physically realistic
Arbitrary initial guess may lead to unphysical transients
If the solution is timeperiodic or a steadystate solution is
sought (transients are not important), the initial condition can be
more approximate
Some suggest ways of setting initial conditions
Use a steadystate solution
Example – run a nozzle with steady flow BC before
activating unsteady BC
Write an Initial Condition UDF  DEFINE_INIT( name, d)
Initial Condition UDF Example
/********************************************************************
UDF for initializing flow field variables
*********************************************************************/
#include "udf.h"
DEFINE_INIT(my_init_func,d)
{
cell_t c;
Thread *t;
real xc[ND_ND];
/* loop over all cell threads in the domain */
thread_loop_c(t,d) {
/* loop over all cells */
begin_c_loop_all(c,t) {
C_CENTROID(xc,c,t);
if (sqrt(ND_SUM(pow(xc[0]  0.5,2.),
pow(xc[1]  0.5,2.),
pow(xc[2]  0.5,2.))) < 0.25)
C_T(c,t) = 400.;
else
C_T(c,t) = 300.;
}
end_c_loop_all(c,t)
}
}
Initial Transients
Unsteady rotor lift becomes
periodic after initial transient
Solution started from steadystate
Rotor lift coefficient for 2D unsteady turbine stage
Autosaving Files
Fluent permits files to be saved
automatically during a transient run
File Write Autosave
The frequency is the number of
time steps between saves
Fluent automatically appends the
time step count to the filename
(e.g. 0001, 0002, etc.)
Compression suffix in filename will
cause stored files to be
compressed in desired format (.gz
or .Z)
Overwriting existing files
New in Fluent 6.2
Defines the maximum number
of files of each type (case
and.or data) which are stored
When maximum is reached
the earliest file will be
overwritten when Fluent writes
another file
Monitors
Surface and Force monitors can be
set up to compute and save
unsteady data as a function of time
step
Select Time Step under Every
column in GUI
By default, Force monitors are
written every time step for unsteady
calculations
Choosing Your Time Step
Simple estimate
Fluid particle should move no more than one cell’s
distance in one time step.
V
x
t
~
x = representative cell size
V = characteristic velocity
t
t+ t
Choosing Your Time Step (2)
Physicallybased estimate
Choose time step which resolves the unsteady physics of
interest (t < T)
t
t < T
T
T = characteristic
time scale of unsteady
flow
Choosing Your Time Step (3)
Time Scale Examples
Vortex Shedding
Buoyant Flows
RotorStator Interaction
V St
L
T
~
&
)
p
T
~
TL g
L
T
*
~
velocity Freestream V
length stic Characteri
Number Strouhal
=
=
=
L
St
difference re temperatu Freestream  Surface T
t coefficien expansion Thermal
on accelerati nal Gravitatio g
length stic Characteri
=
=
=
=
*
L
speed rotational Rotor
angle pitch Blade
=
=
&
)
p
Choosing Your Time Step (4)
Adaptive time stepping
Adaptive time stepping (ATS) permits automatic adjustment of
time step size as the calculation proceeds
Based on local truncation error analysis
Available for both segregated and coupled solvers
Compatible with first and second order temporal discretization
schemes
Customization possible via UDF
Limitations
Not compatible with VOF model
Not available for coupled explicit solver
Additional information provided in the Appendix
Data Sampling
FLUENT can save and store unsteady solution data in order to derive
useful field variables, namely
Time averages
Root mean square (RMS)
( ) ( )
1,2,...N i
1
1
0 0
0
=
=
=
i
i
i
f
t
t
f
t
t t
t d
t t
f
1,2,...N i
2
=
=
i
i RMS
Activating Data Sampling
Select data sampling option in the
Iterate panel
Sampled variables are computed
and stored “on the fly” for
subsequent time steps
Sampled variables are also stored
in case and data files
Available timeaveraged and RMS
variables
Static pressure
Velocity magnitude and
components
Temperature
Combustion variables (e.g.
mixture fracture…)
Sampled Data Contour Plots
Instantaneous TimeAverage
Sliding mesh solution:
2D Turbine Stage
Sliding interface
Postprocessing Unsteady Solutions
Unsteady data from solution monitors can be viewed using Fluent’s
xy plotting tools
FFT can be applied to unsteady xy plot data
Animation of solutions
Setup animations in SolveAnimate panel
Write image files “on the fly” using macros in SolveExecute
Commands panel
Instantaneous solution case/data files (written using Autosave
feature) can be reread into FLUENT for further processing
Can be automated using journal files
Solution data can also be exported in formats compatible with
dedicated thirdparty postprocessing software (e.g. Fieldview,
Ensight, etc.).
Additional information is provided in the Appendix
Agenda
Motivation and Goals
Algorithms
Temporal Discretization
Subiteration and Dual Time Stepping
Noniterative Schemes
Setting Up Unsteady Problems
Solving and Postprocessing
Physical Models and Unsteady Flows
Summary
Appendix
Additional Material on Solver Features and Physical Models
Turbulence – Unsteady RANS
Unsteady solutions are possible using the ReynoldsAveraged Navier
Stokes (RANS) equations provided the time scale of the unsteadiness is
much larger than the turbulent time scales
( )
( )
( )
=
+ (
=
N
n
n
i
N
i
t x u
N
t x U
1
,
1
lim ,
r r
( ) ( ) ( ) t x u t x U t x u
i i i
, , ,
r r r
,
+ =
U
Long time scale unsteadiness
preserved in ensemble average
Unsteady RANS Modeling
Unsteady RANS Momentum Equations
Turbulence closure models available in Fluent
SpalartAllmaras (1 eqn)
kc (standard, RNG, Realizable) (2 eqn)
ke (2 eqn)
V2F (4 eqn)
Reynolds Stress Model (RSM) (7 eqn)
j
ij
j
i
j i k
i
k
i
x
R
x
U
x x
p
x
U
U
t
U
c
c
+


.

\

c
c
c
c
+
c
c
÷ =


.

\

c
c
+
c
c
µ µ
j i ij
u u R
' '
÷ = µ
Reynolds Stress
Unsteady RANS Notes
Unsteady RANS is the most practical approach for unsteady
turbulent flows
Modest mesh requirements
Reasonable run times
Applicable to a wide range of problems
Large scale unsteady flow features can usually be resolved on a
RANS mesh
Example – vortex shedding at High Reynolds numbers
For flows where unsteady RANS is unsuitable, you can attempt to
use LES or DES
Large Eddy Simulation (LES)
LES is recommended for highend applications where the RANS
models are not adequate ( e.g. mixing, combustion, external
aerodynamics)
LES dispenses with Reynoldsaveraging, and instead solves the NS
equations directly to capture turbulent fluctuations resolvable by the
mesh
Eddies smaller than the grid size are removed and modeled by a
subgrid scale model (SGS)
Larger eddies are directly solved numerically by the “filtered”
transient NS equations.
Sufficiently long solution time is required to reach statistically stationary
state and obtain stable statistics of the solution.
LES Setup
Activate LES Model in
Define Models Viscous Model GUI
Three subgrid scale (SGS) models
are available
SmagorinskyLilly
WALE
KineticEnergy Transport
Simple nearwall model (twolayer
wall functions similar to the model
by Werner and Wengle)
Secondorder spatial and temporal
discretizations (including new
bounded central differencing
scheme)
Need to provide appropriate initial and
boundary conditions
•Note: You can use NITA for LES/DES models
Vortex shedding over a cylinder
with Re = 90,000
The simulation uses
large eddy simulation
(LES) turbulence model
a fine grid with 170,000
quadrilateral elements
A transient calculation is
performed for many cycles until
periodic flow is achieved
Example: LES Vortex Shedding
Fine scale vortices captured by LES
LES Solution: Pressure Field
NITA Example  LES of Channel Flow
(Re
= 180)
NITA/FSM, nodebased
gradient, BCD
72 x 72 x 72 hex. mesh
Detached Eddy Simulation (DES)
DES is a hybrid model which
uses LES in the bulk (core
turbulent) and a RANS model
(SpalartAllmaras) in the near
wall region
DES is a practical alternative to
LES for highReynolds number
flows over airfoils in the external
aerodynamic applications
New in Fluent 6.2  access to
DES through viscous model GUI
Unsteady DPM Modeling
Discrete Phase Model (DPM) in FLUENT can be run within an
unsteady flow calculation
Particle paths are updated in time along with the flow
Can be used with sliding mesh and moving/deforming mesh
Applications
Particle flows through rotating machinery
Unsteady settling, erosion, and accretion problems
Unsteady DPM Setup
Specify DPM model parameters
in Define Models Discrete
Phase…
Create injections
For unsteady DPM, you
need to set the Start Time
and End Time to define
when particles will be
introduced
Run unsteady solution
Use DisplayParticle Tracks To
display particle positions at
current time
Unsteady DPM Example
Moving Reference Frames
Unsteady solutions can be carried out in a moving reference frame
Only Single Reference Frame (SRF) models are applicable!
Multiple Reference Frame (MRF) and Mixing Plane models are by
definition steadystate models
SRF solutions will capture unsteadiness in the relative frame
Example: vortex shedding from the trailing edge of a turbine rotor
blade
Sliding Mesh Model
The sliding mesh model permits motion multiple domains sliding relative to one
another along interface boundaries
Numerous applications
Mixing tanks
Rotorstator interaction
Vehicles in tunnels
The governing equations are solved in the inertial reference frame for absolute
quantities (e.g. absolute velocities).
For each time step, the meshes are moved and the fluxes at the sliding
interfaces are recomputed.
cells at time t
cells at time t+t
moving mesh zone
Sliding interface requirements:
Interfaces are nonconformal
For rotating domains, the interface between a rotating subdomain
and the adjacent stationary/rotating subdomain must be a surface
of revolution with respect to the axis of rotation of the rotating
subdomain.
Many failures of sliding mesh models can be traced to interface
geometries which are not surfaces of revolution!
Any translation of the interface cannot be normal to itself.
A sliding mesh preview is now available in Fluent 6.1 to help detect
sliding mesh problems before you run your calculation
time t = 0
t + t
Elliptic interface
is not a surface of
revolution.
Solve Mesh Motion…
Sliding Interfaces
Sliding Mesh Setup
Enable unsteady solver.
Define overlapping zones as Interface
types
For moving zones, select Moving Mesh
as Motion Type in Fluid BC panel.
By default, velocity of walls are zero
relative to the adjacent mesh's
motion.
For each interface zone pair, create a
nonconformal interface
Enable Periodic option if
sliding/rotating motion is periodic.
Enable Coupled for conjugate heat
transfer.
Sliding Mesh Example
Accelerating Reference Frames
Fluent’s moving reference frame model does not account for
accelerating reference frames
Two additional acceleration terms are required
You can incorporate acceleration effects in two ways
Use Moving Reference Frame option for the fluid zone and add the
additional acceleration terms as source terms using UDFs
Use Moving Mesh option for the fluid zone and adjust the
translation and/or rotational frame velocities through UDFs
Illustration of Reference Frames
x
y
z
z
y
x
stationary
frame
moving
frame
axis of
rotation
r
r
&
r
CFD domain
o
r
r
R
Note: R is perpendicular
to axis of rotation
) (
) (
0 0
t r r
t
r r
r r
=
=& &
Additional Acceleration Terms
Additional acceleration terms need to be added to the RHS of
the MRF momentum equations when rotation or translation of
the frame is time dependent…


.

\

+ × ÷ =
2
0
2
dt
r d
r
dt
d
S
accel
r
r
r
r
e
µ
tangential
acceleration
linear
acceleration
Add these terms
using a Source
term UDF
applied to the
momentum
equations…
Example: Tank Sloshing
A rectangular tank is 20% filled
with liquid
The periodic accelerations of tank
introduced using source term
UDFs
Results are compared to
experiment
1
for
general flow patterns
pressures recorded at three
sites (shown)
1
Hadzic, et al., Numerical Simulation of
Sloshing, Proc. SRITUHH Mini Workshop on
Numerical Simulation of Twophase Flows, Ship
Research Institute, Tokyo, Japan, 2001.
Example: Tank Sloshing (2)
The volume of fluid (VOF) model is
used in FLUENT
A userdefined function (UDF) is used
to simulate the periodic swaying
motion
At one instant, the liquid sloshes up
the right side of the tank (top)
The FLUENT simulation captures this
motion accurately (bottom)
Velocity vectors colored by static pressure
Moving Mesh Option
Another way of handling accelerating reference frames is to employ the
Moving Mesh option
Advantage – no additional acceleration terms are required in the
momentum equations
This is because the momentum equations are referred to the
absolute frame (no MRF transformation is used)
Accelerations are prescribed by defining the time dependent grid
locations
For rotation, you need only prescribe &(t).
Example: Flapping Airfoil
Flapping NACA 0012 airfoil (+/ 8 deg)
Moving zone
Sliding interface
Moving Mesh UDF
/**********************************************/
/* flap.c */
/* UDF for specifying a timevarying omega */
/* */
/* Simulates +/ 8 deg flapping with cycle of */
/* of 1 sec. */
/* */
/**********************************************/
#include "udf.h“
#define PI 3.141592654
DEFINE_ADJUST(speed, domain)
{
real omega;
Thread *t;
real time = RP_Get_Real("flowtime");
omega = 0.8773*cos(2.*PI*time); /* rotational speed about axis */
thread_loop_c(t,domain)
{
if (THREAD_VAR(t).cell.motion_spec == MOTION_TYPE_MOVING_GRID)
{
THREAD_VAR(t).cell.omega = omega;
}
}
}
Flapping Airfoil: Unsteady Velocity
Additional Physical Models
Other models/features in FLUENT 6 which employ unsteady
solutions
Dynamic mesh refinement
Moving Deforming Mesh
Acoustics
Additional information on these topics provided in the
Appendix
Agenda
Motivation and Goals
Algorithms
Temporal Discretization
Subiteration and Dual Time Stepping
Noniterative Schemes
Setting Up Unsteady Problems
Solving and Postprocessing
Physical Models and Unsteady Flows
Summary
Appendix
Additional Material on Solver Features and Physical Models
Summary
CFD analysis of unsteady flows are becoming more
commonplace
FLUENT 6 has the ability to address a wide range of unsteady
problems
In this lecture we have discussed
Unsteady algorithms in FLUENT 6
Setting up, running, and postprocessing unsteady solutions
Physical models and unsteady flows
New algorithms in Fluent 6.2 will make the solution of unsteady
flows more efficient than ever!
Thank you for your attention!
Appendix
Dynamic Mesh Refinement
Fast Fourier Transforms (FFT)
Animations
Automatic Time Step Adjustment
Moving/Deforming Mesh
Acoustics
Dynamic Mesh Refinement
Gradient adaption can be used to dynamically adapt the mesh
to a timeevolving solution
This approach can be useful for a wide range of applications
Moving shock waves
Free surface flows
Unsteady wakes
Dynamic Adaption Setup
Method
Curvature (smooth flows)
Gradient (strong gradients, shocks)
Normalization
Standard
No scaling (not recommended
for dynamic adaption)
Scale
Normalizes with average value
Normalize
Normalizes with max value
Dynamic Interval
Set value from to 1 – 10, depending
on the unsteady flow Coarsen Threshold
– Scale (0.3 – 0.5)
– Normalize (0.2 – 0.4)
Refine Threshold
– Scale (0.7 – 0.9)
– Normalize (0.5 – 0.9)
Shock Waves in a Channel
Mesh Colored by Contours of Static Pressure
Fast Fourier Transform (FFT)
FFT utility is available for general analysis of unsteady data
Features
Plot and pruning utility
Enables users to inspect and select signal
Multiple choices of window functions
Xaxis function
Frequency
Strouhal number
Yaxis function
Power spectral density
Magnitude
Sound Pressure Level (db)
Sound Amplitude (db)
FFT – How It Works
An FFT performs a discrete Fourier transform of an unsteady signal (t)
to derive spectral information about the signal, e.g.
vortex shedding frequency
higher harmonics associated with rotorstator interaction
For an unsteady function
k
sampled uniformly at a finite number of
points, N, the coefficients of the Fourier transform are given by
=
=
1
0
/ 2
1
ˆ
N
k
N ikn
k n
e
N
/
FFT – How It Works (2)
The variables define the relative influence of discrete frequencies
contained in the signal
Derived variables
Power Spectral Density (E)
Amplitude (A)
k
ˆ
2
2
0 0
ˆ
2 ) (
ˆ
) (
n n
f E
f E
=
=
) ( ) (
n n
f E f A =
FFT  Windowing
FFT assumes sampled data are periodic in time
Windowing addresses cases where the data are not periodic, thereby
leading to aliasing errors
Windowing applies filters to the signal to remove the influence of the
ends of the data range (approximately ¼ of the entire range)
Four windowing filters are available in Fluent 6.1
Hamming
Hanning
Barlett
Blackman
FFT – Main Interface
Usage
1. Read in plot file containing
data
2. Apply “pruning” to remove
unwanted portions of the
data set
3. Select Window option and
xy axes functions
4. Plot the FFT
Can optionally write FFT data
to file
FFT – Pruning Interface
Pruning permits you to set the
xdata range (typically time)
Removes unwanted regions
of the signal such as a start
up transient
Pruned data will then be
used by the FFT
You can plot the pruned signal
and compute statistics
FFT – Example
Original Data
Pruned Data
FFT – Example (2)
Animations
FLUENT 6 provides a facility for creating animations
Define a sequence of frames for subsequent playback
Can use for contours, meshes, XY plots, vectors, and monitors
Options for storing data
“Memory”  Meta files are saved that allow user to select the
animation view (pan, zoom, rotate, etc.) after performing the
simulation
“Disk”  User chooses a hardcopy option (MPEG, series of .tifs,
etc.) and the animation parameters are fixed a priori
Limitation
MPEG is the only currently supported movie format
No AVI export yet
Animation Setup
Set up as many animation
sequences as desired…
Animation Playback
Playback interface permits
selection of sequences
framebyframe analysis of
sequences
export of animations or
individual animation frames
Use individual frames if
you want to use third party
animation software
Adaptive time stepping (ATS) permits automatic adjustment of time
step size as the calculation proceeds
Based on local truncation error analysis
Available for both segregated and coupled solvers
Compatible with first and second order temporal discretization
schemes
Customization possible via UDF
Limitations
Not compatible with VOF model
Not available for coupled explicit solver
Adaptive Time Stepping
GUI Panel for ATS
Specify initial time step and
total number of time steps
desired
Set control parameters for
ATS
Set the subiteration
parameters as usual
Click on Iterate to begin
computation…
ATS Controls (1)
Truncation Error Tolerance (TE
tol
)
Trunction Error = a measure of solution error
TE
tol
is a userspecified threshold value which is compared to the
actual truncation error for the purpose of determining if the time
step should be increased or decreased
Default value (0.01) is acceptable for most cases, but you can
decrease this value if you want to maintain a smaller time step
Ending Time
The maximum time permitted for the calculation
Note that the calculation will terminate sooner if the number of time
steps equals the userspecified number in the GUI panel
ATS Controls (2)
Minimum/Maximum Time Step Size
Maximum/Minimum limits placed on time step size
Choose the minimum based on simple estimate (x/V)
Choose maximum as no more than one or two orders of magnitude
greater than this (too large a value may lead to inaccuracy)
Minimum/Maximum Step Change Factor (f)
Define step change factor as the ratio of the truncation error
tolerance and the actual (computed) truncation error value:
Limiting f results in smoother changes in the time step size,
especially in flows with high frequency fluctuations.
actual
tol
TE
TE
f ~
ATS Controls (3)
The algorithm for computing the time step based on f proceeds as
follows:
If f > 1 and f < f
max
, then t is increased (since TE < TE
tol
)
If f > 1 and f > f
max
, then t is increased, but limited to f
max
t
n1
Prevents time step from increasing too rapidly
If f < 1 and f < f
min
, then t is decreased (since TE > TE
tol
)
If f < 1 and f > f
min
, then t is unchanged
Prevents time step from getting too small
Number of Fixed Time Steps
The number of fixed time steps which are performed before ATS is
applied to the calculation
It is recommended that a number of fixedsize time steps be
performed, especially for impulsive initial conditions
UDFs for ATS
A UDF can be hooked to ATS
using the drop down list in the
ATS GUI panel
Sample UDF shown on right
Uses DEFINE_DELTAT
macro
Returns time step (in units
of seconds)
DEFINE_DELTAT(mydeltat, domain)
{
real time_step;
real t = CURRENT_TIME;
if (t < 0.5)
time_step = 0.1;
else
time_step = 0.2;
return time_step;
}
Example: Transient Heating in a Cavity
Contours of Velocity Magnitude (m/s) Contours of Static Temperature (K)
Final Solution at SteadyState
Transient Temperature History
Total Volume
Integral of
Temperature
(K/m3)
Flow Time (s)
Comparison of Computational Effort
Total Volume Integral of Temperature (K/m3)
Adaptive Time Stepping Constant Time Stepping
# of Time Steps # of Time Steps
Agenda
Motivation and Goals Algorithms Temporal Discretization Subiteration and Dual Time Stepping Noniterative Schemes Setting Up Unsteady Problems Solving and Postprocessing Physical Models and Unsteady Flows Summary Appendix Additional Material on Solver Features and Physical Models
Motivation
Nearly all flows in nature are unsteady! Steadystate assumption is possible if we… Ignore unsteady fluctuations Employ ensemble/timeaveraging to remove unsteadiness (e.g. turbulence modeling) In CFD, steadystate methods are preferred Lower computational cost Easier to postprocess and analyze Many applications, however, require resolution of unsteady flow
land vehicles. bubble columns) Deforming Domains Incylinder combustion Store separation Unsteady Heat Transfer Transient heating.) Vortex shedding Rotating Machinery Rotorstator interaction Rotating stall.Typical Applications Aerodynamics (aircraft. surging Multiphase Flows Free surface motions Bubble dynamics (fluidized beds. cooling .etc.
Origin of Unsteady Flow “Natural” unsteadiness Unsteady flow due to growth of instabilities within the fluid or a nonequilibrium initial fluid state Examples: natural convection flows. source terms drive the unsteady flow field Examples: pulsing flow in a nozzle. shock waves) “Forced” unsteadiness Timedependent boundary conditions. fluid waves (gravity waves. rotorstator interaction in a turbine stage KelvinHelmholtz cloud instability Rotorstator interaction in an axial compressor . turbulent eddies of all scales.
Strouhal Number) Time. RMS averages Timerelated parameters (e. residence time of a pollutant) Spectral data (FFT) . time required to cool a hot solid. moving shock waves Extract quantities of interest Natural frequencies (e.g.Goals of Unsteady CFD Analysis Simulate transient flow field over a specified time period Solution may approach Steadystate solution flow variables stop changing with time Timeperiodic solution flow variables fluctuate with a repeating temporal pattern Goal may also be to simply track the flow over the simulation period Free surface flows.g.
Agenda Motivation and Goals Algorithms Temporal Discretization Subiteration and Dual Time Stepping Noniterative Schemes Setting Up Unsteady Problems Solving and Postprocessing Physical Models and Unsteady Flows Summary Appendix Additional Material on Solver Features and Physical Models .
ymom.Unsteady Equations V t dV + A r r V dA = A convection r dA + S dV V diffusion generation Eqn. energy unsteady Generic unsteady transport equation 1 u v h . continuity xmom.
Finite Volume Discretization ( t • ) V+ faces f r r f V f Af = faces f ( r ) f Af + S V Evaluate surface and volume integrals over control volume using finite volume approach • Variables now represent averages evaluated at cell or face centers control volume • Temporal discretization to be determined… .
Temporal Discretization • Write discrete unsteady equations as ( t ) = F( ) f faces Need to discretize the time derivative… 1 F( ) = V r r f V f Af + faces ( )f ( r ) f Af + S V .
t SecondOrder Scheme 3( ) n +1 4( ) n + ( 2 t )n 1 = F( ) n1 How is F( ) evaluated? n = time step index t = physical time .Temporal Discretization (2) FirstOrder Scheme time ( ) n +1 ( t )n = F( ) n+1 n t+ t t t.
typically in the form of the Courant number: Courant No.Explicit Time Integration Evaluate F( ) at current time level (n) Example: First order explicit scheme ( ) n +1 = ( ) n + tF ( n ) Implications Simplest approach – data known at current time level All cells are marched in time with the same time step Time step is restricted by stability limits. maximum stable time step is mesh dependent. and is tied to the smallest cell in the domain! . V t <1 x V = fluid velocity scale t = time step x = characteristic mesh size Since Courant number < 1.
Explicit RungeKutta Scheme Fluent’s CoupledExplicit Solver uses a multistage RungeKutta scheme ( ( ( )0 = ( )i = ( ) n +1 = ( )n )n + )m i tF ( i 1 ) i = 1...m RungeKutta scheme provides better stability and a lessrestrictive time step limit for nonlinear equations than simple explicit scheme For compressible flows. time step is computed as x t = CFL u+a x = local grid size u = local fluid velocity a = speed of sound CFL=Courant number .2.3.
for which unconditional stability can be proven mathematically How do we handle the coupling at future time levels? .Implicit Time Integration Evaluate F( ) at future (n+1) time level Example: First order (Euler) implicit scheme ( ) n +1 = ( ) n + tF ( n +1 ) Implications Solution unknowns are coupled together at future time level (n+1) Time step is not tied to Courant number stability restrictions We can “theoretically” use as large a time step as we want (unconditionally stable) – though this is only strictly true for linear equations.
.Subiteration We can deal with the coupling of the discrete equations at the future time level by iteratively solving the implicit equations as follows: Define a provisional solution i which is initialized with the current solution n Iteratively solve the implicit equations until the provisional solution satisfies the equations as the subiteration process converges Example: First Order Implicit Scheme i n+1 ( )i = ( ) n + tF ( i ) i = 1.3.2.. (i = iteration count) .
but… …you may wish to observe other solution monitors as functions of iteration to ensure that the solution is converging properly Subiteration is also deals with nonlinearity and coupling in the unsteady equations Subiteration can be applied to both the segregated and coupled solvers .Implications of Subiteration Solution of implicit equations for a single time step is identical to the solution of a steadystate problem Subiteration process is similar to solving a steadystate solution from a prescribed initial condition The number of subiterations required to converge the subiteration process will depend upon the time step In general. the number of subiterations increases as the time step is increased Residuals are a general guide to convergence.
Subiteration Convergence Behavior t 10 t .
source terms) = ( ) .DualTime Stepping Dual time stepping is a variation of subiteration which is better suited to the coupled solver algorithms Essential idea – add an extra “unsteady” term to the equations which is integrated in a “pseudotime” + t = ( ) t = ( ) ~ = vector of coupled dependent variables = RHS vector (fluxes.
3...3...m p = 1.DualTime Stepping (2) We note that the new form of the equations is identical in form to the old – so we can employ the same algorithms Example: mstage RungeKutta scheme ( ( ( )0 = ( )i = ( ) p +1 = ( )p )p + )m i tF ( i 1 ) i = 1.2.P P = number of pseudotime steps .2.
Implications of DualTime Stepping Dualtime stepping permits explicit schemes (like RungeKutta) to be used with an implicit temporal discretization Like subiteration. dualtime stepping requires convergence of the solution in pseudotime to obtain the solution at the next time level The number of pseudotime steps required depends on the time step .
2 Improved preconditioning for coupled implicit (in time) solver Mainly benefits accuracy and robustness for low Mach number flows New preconditioning Pressure wave propagation Old preconditioning Baseline solution (Fourstage RK) .Coupled Solver Efficiency Improvements in Fluent 6.
One of the downsides of subiteration schemes is that they can be inefficient (i.BUT… …the overall timeaccuracy can be preserved as long as the splitting error is O( t2) Overall timediscretization error for 2ndorder scheme O( t2) Truncation error O( t2) Splitting error O( tn) . solver uses more subiterations than it really needs) Time derivative discretization introduces truncation error Splitting of the operators in the solver introduces a time step related splitting error Subiteration tries to eliminate the splitting error….Noniterative Schemes (Segregated Solver) .e.
Pressure.NonIterative TimeAdvancement (NITA) Schemes New in 6.2 for the segregated solver No outer (pressurevelocity) iteration within a timestep Subiterations are needed to account for the deferredcorrections.W Eq. Solve Pressure Correction Correct Velocity. nonlinearity in and coupling among the equations Splitting error ~ O( t2) Speedup by a factor ~ NITA/2 (NITA is the number of iterations per time step) Two flavors t=t+n t Solve U.V.Flux Solve k and Solve other scalars Next timestep n += 1 PISO Fractionalstep method .
Consists of 1 predictor and N corrector steps (N =2 for 2ndorder accuracy) Fluent 6. 1985) Splitting error in the PISO scheme can be made smaller than the truncation error (by multiple “corrector” steps).The NITA PISO Scheme Originally proposed as a noniterative scheme (Issa.2 newly offers a new NITA version of PISO scheme Energy & turbulence equations and compressibility effects are still loosely coupled. You can still use PISO in a subiterative manner is desired .
The NITA FractionalStep Method (FSM) Employs an Approximate Factorization technique to solve the momentum and pressure correction equations Original block .matrix A G D 0 123 4 4 u n +1 !p n +1 r bm = + c 0 b Exact approximate factorization Factorized 6444 7matrices 4 8 4 44 4 A 0 I tG u n +1 Approximate = r 0 + bm b c D t DG 0 I !p n +1 + O t2 [ ( )] .
NITA FSM – Splitting of Equations A D 0 I tG ˆ u !p n+1 u n +1 n +1 t DG 0 I !p 144 244 3 4 4 = r 0 + bm bc A D I 0 0 t DG tG I ˆ u !p u n +1 n +1 n +1 = ˆ u r 0 + bm bc ˆ Au = r + b m t DG !p n +1 = b c ˆ u n +1 = u tG !p n +1 !p = !p n +1 .
Closely resembles the SIMPLEC scheme on a periteration basis Cheaper (by approx.NITA FSM Implications The FSM is very similar to the “segregated” algorithm. 20 %) than the PISO scheme on a pertimestep basis Splitting errors will be different than the PISO Best choice between PISO and FSM will be somewhat problem dependent .
BC’s and solutiondependent source terms New convergence criteria for the subiterations Use initial residuals at each timestep as the reference values for the convergence for the subiterations and the AMG cycle The default criteria were determined based on an extensive testing. Accounts for nonlinearity in and coupling among the equations.NITA Subiteration Subiterations are introduced to the individual equations and/or a group of the individual equations. deferredcorrection terms. Solutions can be explicitly underrelaxed in the subiterations. The massflux is updated after each momentum subiteration. Default for secondorder timediscretization .
DES and RANS models Passive scalars (heat transfer with constant properties. species transport w/o reaction) VOF Compressible liquid (UDF) Sliding mesh 1D coupling (WAVE.NITA Schemes and Physical models Supported physical models Incompressible and weakly compressible (up to high subsonic) Laminar (DNS) All turbulence models including LES. supersonic) NonNewtonian fluids MDM . Optimal Power) Compressible flows (transonic. GTPower.
spark. fan model .NITA Schemes and Physical models (2) Not supported (NITA schemes cannot be selected with these models) Multiphase models (except VOF) Radiation models Reacting species and all combustions models DPM. porous jump. crevice models Phase change (solidification & melting) UDS transport Inviscid ideal gas Porous media.
fullyiterative method (ITA) and exact solution y u = u0 sin &t .NITA Example: Oscillating Plate Noniterative fractionalstep (NITA) method vs.
fullyiterative scheme Noniterative solution identical to standard subiteration scheme .NITA Example: Exhaust Manifold Noniterative scheme vs.
8 0.2 0 Iterative Noniterative Iterative Noniterative .6 0.4 0.NITA Example: Exhaust Manifold (2) Comparison of total CPUtime Noniterative scheme reduces CPU time by factor of 5! 1 0.
591 FLUENT 6.2 NITA – PISO CPU=3.2 ITERATIVE PISO CPU=15.450 .2 NITA – Fractional Step CPU=4.1 ITERATIVE PISO CPU=29.043 FLUENT 6.794 FLUENT 6.NITA Example: VOF Tank Sloshing FLUENT 6.
Agenda Motivation and Goals Algorithms Temporal Discretization Subiteration and Dual Time Stepping Noniterative Schemes Setting Up Unsteady Problems Solving and Postprocessing Physical Models and Unsteady Flows Summary Appendix Additional Material on Solver Features and Physical Models .
Unsteady Schemes: Segregated Solver Implicit Schemes only First or Second order accuracy in time NITA schemes PISO or FSM set in Solve Controls Frozen Flux Formulation Not applicable to NITA schemes .
Frozen Flux Formulation An option for the segregated solver which reduces the nonlinearity of the convection terms n +1 f faces f V f Af ' '( faces n f n +1 f V fn A f Advantage: Improves convergence of the subiteration loop Limitations Only available for single phase flows Cannot be used with moving/deforming meshes .
try to employ second order accurate scheme unless… Numerical stability is a concern Transient is not of interest (time march to steadystate or time periodic solution) Activate second order when timeperiodicity is achieved Beginning a calculation from an approximate initial condition (e.g. impulsive startup) .Subiteration Use PISO scheme for PressureVelocity coupling Provides faster convergence for unsteady flows than the standard SIMPLE approach Select number of subiterations per time step to obtain good convergence Ideally. you should observe residuals decline by several orders of magnitude to levels similar to that of a steadystate calculation (actual residual level will be problem dependent) If convergence is not adequate… Adjust solver controls (underrelaxations. discretizations) Reduce the time step In general.Segregated Solver Notes .
NITA Choose PISO or FSM under PressureVelocity Coupling NITA Controls – The BASIC Solution Process Inner subiterations are performed for both PISO and FSM until a termination criterion is satisfied (described on next slide) A final subiteration is then performed before exiting the loop – a residual tolerance is applied to ensure this final subiteration is well converged Note – convergence within each subiteration is controlled by the AMG solver settings in Solve Controls Multigrid .Segregated Solver Notes .
Corrections maximum number of (inner) subiterations performed for each equation Correction Tolerance Subiterations terminate when ratio of current subiteration initial (0th) AMG residual and the first subiteration initial (0th) AMG residual fall below this value Residual Tolerance During the final iteration. the AMG solver is converged until the ratio of the current AMG residual and the first subiteration initial (0th) AMG residual fall below this value Relaxation Factor Explicit underrelaxation factor applied to variables between subiterations .Segregated Solver Notes – NITA (2) NITA Controls Max.
Residual Tolerance may be increased to avoid wasting AMG iterations due to residual tolerance threshold not being met If divergence is detected in the subiteration process. reduce the Relaxation Factor values to 0. diagonal dominance is high and convergence should be driven down further by reducing the Residual Tolerance For problems involving larger time steps.Segregated Solver Notes – NITA (3) NITA Controls – Recommendations Default settings should be good for most problems Convergence of the AMG solver can be monitored by Verbosity in the Multigrid Controls panel to 1 For problems involving very small time steps.7 – 0. .8.
the time step is chosen by the solver based on stability considerations First and second order implicit schemes (dualtime stepping) Coupled Implicit First and second order implicit schemes (dualtime stepping) .Unsteady Schemes: Coupled Solvers Coupled Explicit Explicit time marching scheme NOTE – For this scheme.
The scheme is dispersive. .Coupled Solver Notes Use coupled explicit solver with the explicit time stepping formulation for transient shock waves and related flows More accurate and less expensive than the implicit formulations The FAS multigrid and residual smoothing should not be used for timeaccurate calculations when using the explicittime stepping formulation. The 2ndorder timeimplicit formulation should not be used in capturing time accurate shock propagation. The 1storder timeimplicit formulation can be used to capture time accurate shock propagation if sufficiently small time step is specified and if the solution is allowed to converge at each time level.
Unsteady Boundary Conditions Most boundary conditions can be prescribed as functions of time through UserDefine Functions (UDF) Profile files .
Unsteady UDF Macros Several macros are available for accessing various time related quantities in your UDF .
thread. position) { face_t f.Unsteady UDF Example /********************************************************************** unsteady. begin_f_loop(f.c UDF for specifying a transient velocity profile boundary condition ***********************************************************************/ #include "udf.h" DEFINE_PROFILE(unsteady_velocity. thread) { F_PROFILE(f. position) = 20. thread.0*sin(10. + 5. thread) } . } end_f_loop(f. Macro for accessing physical time real t = CURRENT_TIME.*t).
an) (field_name2 b1 b2 b3 ... rn)) ((sampleprofile transient 3 0) (time 1 2 3) (u 10 20 30) ) Sample file Read into FLUENT using File Read Profile… .. 1=yes) Number of data points per field ((profilename transient n periodic?) (field_name1 a1 a2 a3 . .. (field_namer r1 r2 r3 ....Unsteady Profile Files (1) Standard Format Flag for time periodic profile (0=no. . . bn) ...
..... vn_field2 per field .. .. fieldnamen_field v11 v21 ..... 1=yes) profilename n_field n_data periodic? fieldname1 fieldname2 fieldname3 . ..Unsteady Profile Files (2) Tabular Format Number of fields Flag for time periodic profile (0=no. ... .. .. . v1n_data v2n_data . ... ... vn_fieldn_data sampletabprofile 2 3 1 time u 1 10 2 20 3 30 Sample file Read into FLUENT using TUI Command: file/readtransienttable . ..... vn_field1 Number of data points v12 v22 ... .. .
Agenda Motivation and Goals Algorithms Temporal Discretization Subiteration and Dual Time Stepping Noniterative Schemes Setting Up Unsteady Problems Solving and Postprocessing Physical Models and Unsteady Flows Summary Appendix Additional Material on Solver Features and Physical Models .
BCs as usual Prescribe initial conditions Set solver settings and monitors If using segregated solver with subiteration or dual time stepping… Select time step and max iterations per time step Prescribe the number of time steps Run the calculation (Iterate) .Running an Unsteady Solution Basic Steps Select unsteady option in Define Models Solver Set up physical models.
DEFINE_INIT( name.Initial Conditions Accurate initial conditions are just as important as boundary conditions for unsteady problems Initial solution should be physically realistic Arbitrary initial guess may lead to unphysical transients If the solution is timeperiodic or a steadystate solution is sought (transients are not important). d) . the initial condition can be more approximate Some suggest ways of setting initial conditions Use a steadystate solution Example – run a nozzle with steady flow BC before activating unsteady BC Write an Initial Condition UDF .
pow(xc[1] .5.0. } end_c_loop_all(c.Initial Condition UDF Example /******************************************************************** UDF for initializing flow field variables *********************************************************************/ #include "udf.t) = 300. /* loop over all cell threads in the domain */ thread_loop_c(t.d) { /* loop over all cells */ begin_c_loop_all(c.). else C_T(c. Thread *t.).h" DEFINE_INIT(my_init_func.5..t) = 400.t) { C_CENTROID(xc.2. if (sqrt(ND_SUM(pow(xc[0] . real xc[ND_ND].))) < 0.0..c.5.2. pow(xc[2] .0.t).2.d) { cell_t c.t) } } .25) C_T(c.
Initial Transients Solution started from steadystate Unsteady rotor lift becomes periodic after initial transient Rotor lift coefficient for 2D unsteady turbine stage .
or data) which are stored When maximum is reached the earliest file will be overwritten when Fluent writes another file .gz or .g. 0002.Z) Overwriting existing files New in Fluent 6. 0001.) Compression suffix in filename will cause stored files to be compressed in desired format (. etc.2 Defines the maximum number of files of each type (case and.Autosaving Files Fluent permits files to be saved automatically during a transient run File Write Autosave The frequency is the number of time steps between saves Fluent automatically appends the time step count to the filename (e.
Force monitors are written every time step for unsteady calculations .Monitors Surface and Force monitors can be set up to compute and save unsteady data as a function of time step Select Time Step under Every column in GUI By default.
Choosing Your Time Step Simple estimate Fluid particle should move no more than one cell’s distance in one time step. x t~ V x = representative cell size V = characteristic velocity t t+ t .
Choosing Your Time Step (2) Physicallybased estimate Choose time step which resolves the unsteady physics of interest ( t < T) T = characteristic time scale of unsteady flow T t<T t .
Choosing Your Time Step (3) Time Scale Examples Vortex Shedding L T~ St V Buoyant Flows St = Strouhal Number L = Characteristic length V = Freestream velocity T~ L g* TL L = Characteristic length g = Gravitational acceleration * = Thermal expansion coefficient T = Surface .Freestream temperature difference RotorStator Interaction )p T~ & ) p = Blade pitch angle & = Rotor rotational speed .
Choosing Your Time Step (4) Adaptive time stepping Adaptive time stepping (ATS) permits automatic adjustment of time step size as the calculation proceeds Based on local truncation error analysis Available for both segregated and coupled solvers Compatible with first and second order temporal discretization schemes Customization possible via UDF Limitations Not compatible with VOF model Not available for coupled explicit solver Additional information provided in the Appendix .
.. namely Time averages = (t 1 f tf t0 ) t0 dt = (t 1 f t0 ) i i ti i = 1.2...2.N ..Data Sampling FLUENT can save and store unsteady solution data in order to derive useful field variables.N Root mean square (RMS) RMS = i 2 i i = 1..
mixture fracture…) .g.Activating Data Sampling Select data sampling option in the Iterate panel Sampled variables are computed and stored “on the fly” for subsequent time steps Sampled variables are also stored in case and data files Available timeaveraged and RMS variables Static pressure Velocity magnitude and components Temperature Combustion variables (e.
Sampled Data Contour Plots Sliding interface Instantaneous Sliding mesh solution: 2D Turbine Stage TimeAverage .
Fieldview. etc.).g. Additional information is provided in the Appendix . Ensight.Postprocessing Unsteady Solutions Unsteady data from solution monitors can be viewed using Fluent’s xy plotting tools FFT can be applied to unsteady xy plot data Animation of solutions Setup animations in Solve Animate panel Write image files “on the fly” using macros in Solve Execute Commands panel Instantaneous solution case/data files (written using Autosave feature) can be reread into FLUENT for further processing Can be automated using journal files Solution data can also be exported in formats compatible with dedicated thirdparty postprocessing software (e.
Agenda Motivation and Goals Algorithms Temporal Discretization Subiteration and Dual Time Stepping Noniterative Schemes Setting Up Unsteady Problems Solving and Postprocessing Physical Models and Unsteady Flows Summary Appendix Additional Material on Solver Features and Physical Models .
t ) + ui. t ) = lim N (+ N N n =1 ui (n ) r (x. t ) = U i ( x .Turbulence – Unsteady RANS Unsteady solutions are possible using the ReynoldsAveraged NavierStokes (RANS) equations provided the time scale of the unsteadiness is much larger than the turbulent time scales r 1 U i ( x . t ) U Long time scale unsteadiness preserved in ensemble average .( x . t ) r r r ui ( x .
RNG.Unsteady RANS Modeling Unsteady RANS Momentum Equations Ui +Uk t Ui xk = p + xi xj µ Ui xj + R ij xj Rij = ui.(standard.u . Realizable) (2 eqn) k& (2 eqn) V2F (4 eqn) Reynolds Stress Model (RSM) (7 eqn) .j Reynolds Stress Turbulence closure models available in Fluent SpalartAllmaras (1 eqn) k.
you can attempt to use LES or DES .Unsteady RANS Notes Unsteady RANS is the most practical approach for unsteady turbulent flows Modest mesh requirements Reasonable run times Applicable to a wide range of problems Large scale unsteady flow features can usually be resolved on a RANS mesh Example – vortex shedding at High Reynolds numbers For flows where unsteady RANS is unsuitable.
Large Eddy Simulation (LES) LES is recommended for highend applications where the RANS models are not adequate ( e. mixing. combustion. Sufficiently long solution time is required to reach statistically stationary state and obtain stable statistics of the solution.g. . and instead solves the NS equations directly to capture turbulent fluctuations resolvable by the mesh Eddies smaller than the grid size are removed and modeled by a subgrid scale model (SGS) Larger eddies are directly solved numerically by the “filtered” transient NS equations. external aerodynamics) LES dispenses with Reynoldsaveraging.
LES Setup Activate LES Model in Define Models Viscous Model GUI Three subgrid scale (SGS) models are available SmagorinskyLilly WALE KineticEnergy Transport Simple nearwall model (twolayer wall functions similar to the model by Werner and Wengle) Secondorder spatial and temporal discretizations (including new bounded central differencing scheme) Need to provide appropriate initial and boundary conditions •Note: You can use NITA for LES/DES models .
Example: LES Vortex Shedding Vortex shedding over a cylinder with Re = 90.000 quadrilateral elements A transient calculation is performed for many cycles until periodic flow is achieved .000 The simulation uses large eddy simulation (LES) turbulence model a fine grid with 170.
LES Solution: Pressure Field Fine scale vortices captured by LES .
mesh . BCD 72 x 72 x 72 hex.NITA Example .LES of Channel Flow (Re = 180) NITA/FSM. nodebased gradient.
2 .Detached Eddy Simulation (DES) DES is a hybrid model which uses LES in the bulk (core turbulent) and a RANS model (SpalartAllmaras) in the nearwall region DES is a practical alternative to LES for highReynolds number flows over airfoils in the external aerodynamic applications New in Fluent 6.access to DES through viscous model GUI .
Unsteady DPM Modeling Discrete Phase Model (DPM) in FLUENT can be run within an unsteady flow calculation Particle paths are updated in time along with the flow Can be used with sliding mesh and moving/deforming mesh Applications Particle flows through rotating machinery Unsteady settling. erosion. and accretion problems .
Unsteady DPM Setup Specify DPM model parameters in Define Models Discrete Phase… Create injections For unsteady DPM. you need to set the Start Time and End Time to define when particles will be introduced Run unsteady solution Use Display Particle Tracks To display particle positions at current time .
Unsteady DPM Example .
Moving Reference Frames Unsteady solutions can be carried out in a moving reference frame Only Single Reference Frame (SRF) models are applicable! Multiple Reference Frame (MRF) and Mixing Plane models are by definition steadystate models SRF solutions will capture unsteadiness in the relative frame Example: vortex shedding from the trailing edge of a turbine rotor blade .
For each time step. moving mesh zone cells at time t cells at time t+ t .g. the meshes are moved and the fluxes at the sliding interfaces are recomputed. absolute velocities).Sliding Mesh Model The sliding mesh model permits motion multiple domains sliding relative to one another along interface boundaries Numerous applications Mixing tanks Rotorstator interaction Vehicles in tunnels The governing equations are solved in the inertial reference frame for absolute quantities (e.
Sliding Interfaces Sliding interface requirements: Interfaces are nonconformal For rotating domains. Solve Mesh Motion… . A sliding mesh preview is now available in Fluent 6. Many failures of sliding mesh models can be traced to interface t+ t geometries which are not surfaces of revolution! Any translation of the interface cannot be normal to itself. the interface between a rotating subdomain and the adjacent stationary/rotating subdomain must be a surface time t = 0 of revolution with respect to the axis of rotation of the rotating subdomain.1 to help detect Elliptic interface sliding mesh problems before you run your calculation is not a surface of revolution.
create a nonconformal interface Enable Periodic option if sliding/rotating motion is periodic. velocity of walls are zero relative to the adjacent mesh's motion. Enable Coupled for conjugate heat transfer. For each interface zone pair. . select Moving Mesh as Motion Type in Fluid BC panel.Sliding Mesh Setup Enable unsteady solver. Define overlapping zones as Interface types For moving zones. By default.
Sliding Mesh Example .
Accelerating Reference Frames Fluent’s moving reference frame model does not account for accelerating reference frames Two additional acceleration terms are required You can incorporate acceleration effects in two ways Use Moving Reference Frame option for the fluid zone and add the additional acceleration terms as source terms using UDFs Use Moving Mesh option for the fluid zone and adjust the translation and/or rotational frame velocities through UDFs .
Illustration of Reference Frames y y CFD domain r ro z stationary frame r r moving frame R x & = & (t ) r r r0 = r0 (t ) r r z x & r axis of rotation Note: R is perpendicular to axis of rotation .
Additional Acceleration Terms
Additional acceleration terms need to be added to the RHS of the MRF momentum equations when rotation or translation of the frame is time dependent…
r S accel =
r d& r d r0 ×r + 2 dt dt r
2
tangential acceleration linear acceleration
Add these terms using a Source term UDF applied to the momentum equations…
Example: Tank Sloshing
A rectangular tank is 20% filled with liquid The periodic accelerations of tank introduced using source term UDFs Results are compared to experiment1 for general flow patterns pressures recorded at three sites (shown)
1Hadzic,
et al., Numerical Simulation of Sloshing, Proc. SRITUHH Mini Workshop on Numerical Simulation of Twophase Flows, Ship Research Institute, Tokyo, Japan, 2001.
Example: Tank Sloshing (2)
The volume of fluid (VOF) model is used in FLUENT A userdefined function (UDF) is used to simulate the periodic swaying motion At one instant, the liquid sloshes up the right side of the tank (top) The FLUENT simulation captures this motion accurately (bottom)
Velocity vectors colored by static pressure
you need only prescribe &(t).Moving Mesh Option Another way of handling accelerating reference frames is to employ the Moving Mesh option Advantage – no additional acceleration terms are required in the momentum equations This is because the momentum equations are referred to the absolute frame (no MRF transformation is used) Accelerations are prescribed by defining the time dependent grid locations For rotation. .
8 deg) .Example: Flapping Airfoil Sliding interface Moving zone Flapping NACA 0012 airfoil (+/.
omega = 0. domain) { real omega.8773*cos(2.omega = omega.c */ /* UDF for specifying a timevarying omega */ /* */ /* Simulates +/.h“ #define PI 3.141592654 DEFINE_ADJUST(speed.*PI*time). Thread *t.8 deg flapping with cycle of */ /* of 1 sec.cell. real time = RP_Get_Real("flowtime").cell. } } } .motion_spec == MOTION_TYPE_MOVING_GRID) { THREAD_VAR(t).domain) { if (THREAD_VAR(t).Moving Mesh UDF /**********************************************/ /* flap. /* rotational speed about axis */ thread_loop_c(t. */ /* */ /**********************************************/ #include "udf.
Flapping Airfoil: Unsteady Velocity .
Additional Physical Models Other models/features in FLUENT 6 which employ unsteady solutions Dynamic mesh refinement Moving Deforming Mesh Acoustics Additional information on these topics provided in the Appendix .
Agenda Motivation and Goals Algorithms Temporal Discretization Subiteration and Dual Time Stepping Noniterative Schemes Setting Up Unsteady Problems Solving and Postprocessing Physical Models and Unsteady Flows Summary Appendix Additional Material on Solver Features and Physical Models .
and postprocessing unsteady solutions Physical models and unsteady flows New algorithms in Fluent 6. running.Summary CFD analysis of unsteady flows are becoming more commonplace FLUENT 6 has the ability to address a wide range of unsteady problems In this lecture we have discussed Unsteady algorithms in FLUENT 6 Setting up.2 will make the solution of unsteady flows more efficient than ever! Thank you for your attention! .
Appendix Dynamic Mesh Refinement Fast Fourier Transforms (FFT) Animations Automatic Time Step Adjustment Moving/Deforming Mesh Acoustics .
Dynamic Mesh Refinement Gradient adaption can be used to dynamically adapt the mesh to a timeevolving solution This approach can be useful for a wide range of applications Moving shock waves Free surface flows Unsteady wakes .
shocks) Normalization Curvature Standard No scaling (not recommended for dynamic adaption) Scale Normalizes with average value Normalize Normalizes with max value Dynamic Interval Set value from to 1 – 10.3 – 0.7 – 0.5 – 0.9) – Normalize (0.5) – Normalize (0.Dynamic Adaption Setup Method (smooth flows) Gradient (strong gradients.9) .2 – 0.4) Refine Threshold – Scale (0. depending on the unsteady flow Coarsen Threshold – Scale (0.
Shock Waves in a Channel Mesh Colored by Contours of Static Pressure .
Fast Fourier Transform (FFT) FFT utility is available for general analysis of unsteady data Features Plot and pruning utility Enables users to inspect and select signal Multiple choices of window functions Xaxis function Frequency Strouhal number Yaxis function Power spectral density Magnitude Sound Pressure Level (db) Sound Amplitude (db) .
the coefficients of the Fourier transform are given by ˆ = 1 n N N 1 k =0 ke 2/ikn / N .FFT – How It Works An FFT performs a discrete Fourier transform of an unsteady signal (t) to derive spectral information about the signal. vortex shedding frequency higher harmonics associated with rotorstator interaction For an unsteady function k sampled uniformly at a finite number of points. N. e.g.
FFT – How It Works (2) The variables ˆk define the relative influence of discrete frequencies contained in the signal Derived variables Power Spectral Density (E) E ( f 0 ) = ˆ0 2 E ( f n ) = 2 ˆn Amplitude (A) 2 A( f n ) = E ( f n ) .
1 Hamming Hanning Barlett Blackman . thereby leading to aliasing errors Windowing applies filters to the signal to remove the influence of the ends of the data range (approximately ¼ of the entire range) Four windowing filters are available in Fluent 6.Windowing FFT assumes sampled data are periodic in time Windowing addresses cases where the data are not periodic.FFT .
FFT – Main Interface Usage 1. Select Window option and xy axes functions 4. Read in plot file containing data 2. Apply “pruning” to remove unwanted portions of the data set 3. Plot the FFT Can optionally write FFT data to file .
FFT – Pruning Interface Pruning permits you to set the xdata range (typically time) Removes unwanted regions of the signal such as a startup transient Pruned data will then be used by the FFT You can plot the pruned signal and compute statistics .
FFT – Example Original Data Pruned Data .
FFT – Example (2) .
rotate. etc.Meta files are saved that allow user to select the animation view (pan. XY plots. series of . meshes. and monitors Options for storing data “Memory” .Animations FLUENT 6 provides a facility for creating animations Define a sequence of frames for subsequent playback Can use for contours. zoom.) and the animation parameters are fixed a priori Limitation MPEG is the only currently supported movie format No AVI export yet . etc.User chooses a hardcopy option (MPEG.) after performing the simulation “Disk” . vectors.tifs.
Animation Setup Set up as many animation sequences as desired… .
Animation Playback Playback interface permits selection of sequences framebyframe analysis of sequences export of animations or individual animation frames Use individual frames if you want to use third party animation software .
Adaptive Time Stepping Adaptive time stepping (ATS) permits automatic adjustment of time step size as the calculation proceeds Based on local truncation error analysis Available for both segregated and coupled solvers Compatible with first and second order temporal discretization schemes Customization possible via UDF Limitations Not compatible with VOF model Not available for coupled explicit solver .
GUI Panel for ATS Specify initial time step and total number of time steps desired Set control parameters for ATS Set the subiteration parameters as usual Click on Iterate to begin computation… .
but you can decrease this value if you want to maintain a smaller time step Ending Time The maximum time permitted for the calculation Note that the calculation will terminate sooner if the number of time steps equals the userspecified number in the GUI panel .ATS Controls (1) Truncation Error Tolerance (TEtol) Trunction Error = a measure of solution error TEtol is a userspecified threshold value which is compared to the actual truncation error for the purpose of determining if the time step should be increased or decreased Default value (0.01) is acceptable for most cases.
ATS Controls (2) Minimum/Maximum Time Step Size Maximum/Minimum limits placed on time step size Choose the minimum based on simple estimate ( x/V) Choose maximum as no more than one or two orders of magnitude greater than this (too large a value may lead to inaccuracy) Minimum/Maximum Step Change Factor (f) Define step change factor as the ratio of the truncation error tolerance and the actual (computed) truncation error value: TEtol f ~ TEactual Limiting f results in smoother changes in the time step size. especially in flows with high frequency fluctuations. .
ATS Controls (3) The algorithm for computing the time step based on f proceeds as follows: If f > 1 and f < fmax. then t is unchanged Prevents time step from getting too small Number of Fixed Time Steps The number of fixed time steps which are performed before ATS is applied to the calculation It is recommended that a number of fixedsize time steps be performed. especially for impulsive initial conditions . then t is decreased (since TE > TEtol) If f < 1 and f > fmin. but limited to fmax tn1 Prevents time step from increasing too rapidly If f < 1 and f < fmin. then t is increased (since TE < TEtol) If f > 1 and f > fmax. then t is increased.
UDFs for ATS
A UDF can be hooked to ATS using the drop down list in the ATS GUI panel Sample UDF shown on right Uses DEFINE_DELTAT macro Returns time step (in units of seconds)
DEFINE_DELTAT(mydeltat, domain) { real time_step; real t = CURRENT_TIME; if (t < 0.5) time_step = 0.1; else time_step = 0.2; return time_step; }
Example: Transient Heating in a Cavity
Contours of Velocity Magnitude (m/s)
Contours of Static Temperature (K)
Final Solution at SteadyState
Transient Temperature History
Total Volume Integral of Temperature (K/m3)
Flow Time (s)
Comparison of Computational Effort Adaptive Time Stepping Constant Time Stepping # of Time Steps # of Time Steps Total Volume Integral of Temperature (K/m3) .
This action might not be possible to undo. Are you sure you want to continue?
We've moved you to where you read on your other device.
Get the full title to continue reading from where you left off, or restart the preview.