You are on page 1of 101

Modeling Unsteady Flows

A Practical Guide

Franklyn J. Kelecy
Fluent Inc.
May 7, 2003

1
Agenda
• Motivation and Goals
• Algorithms
– Segregated Solver
– Coupled Solvers
• Setting Up Unsteady Problems
• Solving and Post-processing
• Physical Models and Unsteady Flows
• Summary

2
Motivation
• Nearly all flows in nature are unsteady!
– Steady-state assumption is possible if we…
• Ignore unsteady fluctuations
• Employ ensemble/time-averaging to remove
unsteadiness (e.g. turbulence modeling)
• In CFD, steady-state methods are preferred
– Lower computational cost
– Easier to post-process and analyze
• Many applications, however, require
resolution of unsteady flow
3
Typical Applications
• Aerodynamics (aircraft, land vehicles,etc.)
– Vortex shedding
• Rotating Machinery
– Rotor-stator interaction
– Rotating stall, surging
• Multiphase Flows
– Free surface motions
– Bubble dynamics (fluidized beds, bubble columns)
• Deforming Domains
– In-cylinder combustion
– Store separation
• Unsteady Heat Transfer
– Transient heating, cooling
4
Origin of Unsteady Flow
• “Natural” unsteadiness
– Unsteady flow due to growth of instabilities
within the fluid
– Examples: high Reynolds number flows over
blunt obstacles, natural convection flows
• “Forced” unsteadiness
– Time-dependent boundary conditions, source
terms drive the unsteady flow field
– Examples: pulsing flow in a nozzle, rotor-stator
interaction in a turbine stage
5
Unsteady Flow Examples
Natural Unsteadiness Forced Unsteadiness

Natural convection from periodic heat sources Rotor-stator interaction in an axial fan unit

6
CFD and Unsteady Flows
• Goals of unsteady CFD analysis
– Simulate transient flow field over a specified
time period
– Extract quantities of interest
• Natural frequencies (e.g. Strouhal Number)
• Time averages
• Time-related parameters (e.g. time required to cool a
hot solid, maximum/minimum pressure on a wing)
• Spectral data (FFT)

7
Unsteady Equations
∂ r

∂t V
ρφdV + ∫
A
ρφV ⋅ ˆ
n dA = ∫
A
Γ ∇ φ ⋅ ˆ
n dA + ∫ Sφ dV
V

unsteady convection diffusion generation

Eqn. φ
continuity 1
Generic unsteady transport equation x-mom. u
y-mom. v
energy h

8
Finite Volume Discretization
∂ ( ρφ ) r r r
∆V + ∑ ρ f φ f V f ⋅A f = ∑ Γf (∇φ ) f ⋅Af + Sφ ∆V
∂t faces faces

• Evaluate surface and


volume integrals over
control volume using control
volume
finite volume approach
• Temporal discretization
to be determined…
9
Temporal Discretization
• Write discrete unsteady equations as
∂ ( ρφ )
= F (φ ) Å Need to discretize the time derivative…
∂t
1  r r r 
F (φ ) = − ∑ ρ f φ f V f ⋅ A f + ∑ Γ f (∇φ ) f ⋅A f + Sφ ∆V 
∆V  faces faces 

10
Temporal Discretization (2)
• First-Order Scheme time

( ρφ ) n +1 − ( ρφ ) n n+1 t+∆t
= F (φ )
∆t
n t
• Second-Order Scheme
n-1 t-∆t
3( ρφ ) n +1 − 4( ρφ ) n + ( ρφ ) n −1
= F (φ )
2∆t n = time step index
t = physical time
• How is F(φ) evaluated?
11
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 same time step
– Time step is restricted by stability limits (typically Courant number
< 1)
– Since Courant number = V∆t/∆x < 1, maximum stable time
step is mesh dependent, and is tied to the smallest cell in the
domain!

12
Explicit Runge-Kutta Scheme
• Fluent’s Coupled-Explicit Solver uses a multi-stage
Runge-Kutta scheme
( ρφ ) 0 = ( ρφ ) n
( ρφ ) i = ( ρφ ) n + α i ∆tF (φ i −1 ) i = 1,2,3...m
( ρφ ) n +1 = ( ρφ ) m
– Runge-Kutta scheme provides better stability and a less-restrictive
time step limit for non-linear equations than simple explicit scheme
– For compressible flows, time step is computed as
∆x ∆x = local grid size
∆t = CFL u = local fluid velocity
u+a a = speed of sound
13
Implicit Time Integration
• Evaluate F(φ) at current (n) and future (n+1) time
levels
– 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
– Can “theoretically” use as large a time step as we want

• How do we handle the coupling at future time levels?

14
Subiteration
• We can deal with the coupling of the discrete equations at
the future time level by iteratively solving the implicit
equations as follows:
1. Define a provisional solution φi which is initialized with
the current solution φn
2. Iteratively solve the implicit equations until the
provisional solution satisfies the equations
• Example: First Order Implicit Scheme

( ρφ )i = ( ρφ ) n + ∆tF (φ i , φ i −1 ) i = 1,2,3... (i = iteration count)

15
Implications of Subiteration
• Solution of implicit equations for a single
time step is identical to the solution of a
steady-state problem
– φi Æ φn+1 as the subiteration process converges
• The number of subiterations required will
depend upon the time step
– In general, the number of subiterations
increases as the time step is increased

16
Convergence Behavior

∆t 10∆t

17
Dual-Time 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 “pseudo-
time” τ
∂ ∂ = vector of coupled dependent variables
+ = ( ) = RHS vector (flux, source terms)
∂τ ∂t
∂ ∂ ~
= ( )− = ( )
∂τ ∂t
18
Dual-Time 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: m-stage Runge-Kutta scheme

( ρφ ) 0 = ( ρφ ) p
( ρφ ) i = ( ρφ ) p + α i ∆tF (φ i −1 ) i = 1,2,3...m p = 1,2,3...P
( ρφ ) p +1 = ( ρφ ) m P = number of pseudo-time steps

19
Implications of Dual-Time Stepping
• Dual-time stepping permits explicit schemes (like
Runge-Kutta) to be used with an implicit temporal
discretization
• Like subiteration, dual-time stepping requires
convergence of the solution in pseudo-time to
obtain the solution at the next time level
• The number of pseudo-time steps required
depends on the time step

20
Basic Unsteady Algorithm
Set initial conditions

Subiteration/dual time
stepping loop

Solve discretized equations

Converged?

No Yes

Update solution
at new time level
t+∆t

No t = tmax? Stop

21
Unsteady Algorithms: Segregated Solver

• Segregated solver
– Implicit schemes only
– First or Second order
accuracy in time
– Employs subiteration
approach
– Frozen Flux
Formulation provided
as option

22
Frozen Flux Formulation
• An option for the segregated solver which reduces
the non-linearity of the convection terms
n +1
 
 ∑ ρ f φ f V f Af  → ∑ ρ nfφ fn +1V fn A f

 faces  faces

• Advantage: Improves convergence of the


subiteration loop
• Limitations
– Only available for single phase flows
– Cannot be used with moving/deforming meshes
23
Segregated Solver Notes
• Use PISO scheme for Pressure-Velocity coupling
– Provides faster convergence for unsteady flows than the
standard SIMPLE approach
• In general, try to employ second order accurate
scheme unless…
– Numerical stability is a concern
– Transient is not of interest (time march to steady-state
or time periodic solution)
• Activate second order when time-periodicity is achieved
– Beginning a calculation from an approximate initial
condition (e.g. impulsive start-up)
24
Unsteady Schemes: Coupled Solvers

• Coupled Explicit
– Explicit time marching scheme
• NOTE – For the Explicit
scheme, the time step is
chosen by the solver based on
stability considerations
– First and second order implicit
schemes (dual-time stepping)
• Coupled Implicit
– First and second order implicit
schemes (dual-time stepping)

25
Coupled Solver Notes
• Use coupled explicit solver with the explicit time stepping
formulation for transient shock waves and similar flows
– More accurate and less expensive than the implicit formulations
• The FAS multigrid and residual smoothing should not be
used for time-accurate calculations when using the explicit
time stepping formulation.
• The 2nd-order time-implicit formulation should not be
used in capturing time accurate shock propagation. The
scheme is dispersive.
– The 1st-order time-implicit 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.

26
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 or dual time
stepping, specify
• time step
• max iterations per time step
– Prescribe the number of time steps
– Run the calculation
27
Unsteady Boundary Conditions
• Most boundary conditions can be prescribed
as functions of time through
– User-Define Functions (UDF)
– Profile files

28
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; Macro for accessing physical time
begin_f_loop(f, thread)
{
F_PROFILE(f, thread, position) = 20. + 5.0*sin(10.*t);
}
end_f_loop(f, thread)
}

29
Unsteady Profile Files
((profile-name transient n periodic?) Flag for time periodic
(field_name-1 a1 a2 a3 .... an) profile (0=no, 1=yes)
(field_name-2 b1 b2 b3 .... bn)
Number of data points
.
per field
.
.
.
(field_name-r r1 r2 r3 .... rn))

((sampleprofile transient 3 0)
(time 1 2 3) Sample profile
(u 10 20 30)
)

30
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 time-periodic or a steady-state
solution is sought (transients are not important),
the initial condition can be more approximate
• Steady-state solutions can provide a good initial
condition in many cases

31
Initial Transients
Solution started from steady-state

Unsteady rotor lift becomes


periodic after initial transient

Rotor lift coefficient for 2D unsteady turbine stage


32
Autosaving Files
• Fluent permits files to
be saved automatically
during a transient run
• The frequency in this
case will be the
number of time steps
between saves
• Fluent automatically
appends the time step
count to the filename
33
Monitors
• Surface and Force
monitors can be set up to
compute and save
unsteady data as a
function of time step
• Select Time Step in Surface
Monitor GUI
• By default, Force monitors
are written every time step
for unsteady calculations

34
Dynamic Mesh Refinement
• Gradient adaption can be used to
dynamically adapt the mesh to a time-
evolving solution (new in FLUENT 6.1)
• This approach can be useful for a wide
range of applications
– Moving shock waves
– Free surface flows
– Unsteady wakes

35
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 Refine Threshold
– Scale(0.3 – 0.5) – Scale(0.7 – 0.9)
– Normalize (0.2 – 0.4) – Normalize (0.5 – 0.9)

36
Shock Waves in a Channel

Mesh Colored by Contours of Static Pressure


37
Data Sampling
• FLUENT 6.1 can save and store unsteady solution
data in order to derive useful field variables,
namely
– Time averages
tf
1 1
φ =
( ∫
t f − t0 t0
φ dt =
) (
t f − t0 ) ∑
i
φ ∆t
i i i = 1,2,...N

– Root mean square (RMS)


φ RMS = ∑i
φ
i
2
i = 1,2,...N

38
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 time-averaged and
RMS variables
– Static pressure
– Velocity magnitude and
components
– Temperature
– Combustion variables (e.g.
mixture fracture…)
39
Sampled Data Contour Plots
Sliding interface

Instantaneous Time-Average
Sliding mesh solution:
2D Turbine Stage

40
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
– X-axis function
• Frequency
• Strouhal number
– Y-axis function
• Power spectral density
• Magnitude
• Sound Pressure Level (db)
• Sound Amplitude (db)

41
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 rotor-stator interaction
• For an unsteady function φk sampled uniformly at a finite
number of points, N, the coefficients of the Fourier
transform are given by
N −1
1
ˆ
φn =
N
∑ k
φ
k =0
e − 2πikn / N

42
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)
2
E ( f 0 ) = φˆ0
2
E ( f n ) = 2 φˆn
– Amplitude (A)
A( f n ) = E ( f n )
43
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

44
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
x-y axes functions
4. Plot the FFT
• Can optionally write
FFT data to file

45
FFT – Pruning Interface
• Pruning permits you to set
the x-data 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

46
FFT – Example

Original Data Pruned Data

47
FFT – Example (2)

48
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
49
Animation Setup
Set up as many animation
sequences as desired…

50
Animation Playback
• Playback interface permits
– selection of sequences
– frame-by-frame analysis of
sequences
– export of animations or
individual animation frames
• Use individual frames if
you want to use third party
animation software

51
Choosing Your Time Step
• Simple estimate
∆x ∆x = representative cell size
∆t ~ V = representative velocity
V
– Fluid particle should move no more than one
cell’s distance in one time step.
t t+∆t

52
Choosing Your Time Step (2)
• Physically-based estimate
– Choose time step which resolves the unsteady
physics of interest (∆t < T) T = characteristic
time scale of unsteady
φ T flow

t
∆t < T

53
Choosing Your Time Step (3)
– Examples
• Vortex Shedding
St = Strouhal Number
L L = Characteristic length
T~
St ⋅ V V = Freestream velocity
• Buoyant Flows L = Characteristic length
L g = Gravitational acceleration
T~ β = Thermal expansion coefficient
gβ∆TL
∆T = Surface - Freestream temperature difference
• Rotor-Stator Interaction
∆θ p ∆θ p = Blade pitch angle
T~ ω = Rotor rotational speed
ω
54
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 segregrated 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

55
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…

56
ATS Controls (1)
• Truncation Error Tolerance (TEtol)
– Trunction Error = a measure of solution error
– TEtol is a user-specified 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 user-specified number in the GUI panel

57
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.
58
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 increased (since TE < TEtol)
• If f > 1 and f > fmax, then ∆t is increased, but limited to fmax ∆tn-1
– Prevents time step from increasing too rapidly
• If f < 1 and f < fmin, then ∆t is decreased (since TE > TEtol)
• If f < 1 and f > fmin, 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 fixed-size time steps be
performed, especially for impulsive initial conditions

59
UDFs for ATS
• A UDF can be hooked to DEFINE_DELTAT(mydeltat, domain)

ATS using the drop down {

list in the ATS GUI panel real time_step;


real t = CURRENT_TIME;
• Sample UDF shown on if (t < 0.5)
right time_step = 0.1;

– Uses DEFINE_DELTAT else


macro time_step = 0.2;

– Returns time step (in units return time_step;

of seconds) }

60
Example: Transient Heating in a
Cavity

Contours of Velocity Magnitude (m/s) Contours of Static Temperature (K)

Final Solution at Steady-State


61
Transient Temperature History

Total Volume
Integral of
Temperature
(K/m3)
Adaptive
Constant

Flow Time (s)

62
Comparison of Computational Effort
Adaptive Time Stepping Constant Time Stepping

# of Time Steps # of Time Steps

Total Volume Integral of Temperature (K/m3)

63
Physical Models and Unsteady Flows
• Turbulence (Unsteady RANS, LES, DES)
• Multiphase Flows (Unsteady DPM)
• Moving Reference Frames
• Sliding Mesh
• Accelerating Reference Frames
• Moving/Deforming Mesh
• Acoustics
64
Turbulence – Unsteady RANS
• Unsteady solutions are possible using the Reynolds-
Averaged N-S (RANS) equations provided the time
scale of the unsteadiness is much larger than the
turbulent time scales
N
r 1
U i ( x , t ) = lim
N →∞ N
∑ ui
(n )
( xr, t )
n =1

r r r
ui ( x , t ) = U i ( x , t ) + ui′( x , t )
U
Long time scale unsteadiness
preserved in ensemble average

65
Unsteady RANS Modeling
• Unsteady RANS Mometnum Equations
 ∂U i ∂U i  ∂p ∂  ∂ U i  ∂ R ij

ρ +Uk  = − + µ +
  ∂x  ∂x
 ∂t ∂xk  ∂xi ∂x j  j  j

Rij = − ρ ui′u ′j Reynolds Stress

• Turbulence closure models available in Fluent


– Spallart-Almaras (1 eqn)
– k-ε (standard, RNG, Realizable) (2 eqn)
– k-ω (2 eqn)
– V2F (4 eqn)
– Reynolds Stress Model (RSM) (7 eqn)
66
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
• For flows where unsteady RANS is
unsuitable, you can attempt to use LES or
DES

67
Large Eddy Simulation (LES)
• LES is recommended for high-end applications where the
RANS models are not adequate ( e.g. mixing, combustion,
external aerodynamics)
• LES dispenses with Reynolds-averaging, and instead
solves the N-S equations directly to capture turbulent
fluctuations resolvable by the mesh
– Eddies smaller than the grid size are removed and modeled by a
sub-grid scale model (SGS)
– Larger eddies are directly solved numerically by the “filtered”
transient N-S equations.
• Sufficiently long solution time is required to reach
statistically stationary state and obtain stable statistics of
the solution.
68
LES Setup
• Activate LES Model in
DefineÆModelsÆViscous Model
GUI
– Two sub-grid scale (SGS) models
are available (Smagorinsky and
RNG-based models)
– Simple near-wall model (two-layer
wall functions similar to the model
by Werner and Wengle)
– Second-order spatial and temporal
discretizations
• Need to provide appropriate initial
and boundary conditions

69
Example: LES Vortex Shedding
• 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

70
LES Solution: Pressure Field
Fine scale vortices captured by LES

71
Detached Eddy Simulation (DES)
• DES is a hybrid model which uses LES in the bulk (core
turbulent) and a RANS model (Spalart-Allmaras) in the near-
wall region.
• DES is a practical alternative to LES for high-Reynolds
number flows over airfoils in the external aerodynamic
applications.
• How to enable DES…
– First choose Spalart-Allmaras (S-A) turbulence model in
DefineÆViscous GUI
– Enable DES with the following TUI (text user interface)
command:
/define/models/viscous/turbulence-expert

72
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

73
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

74
Unsteady DPM Example

75
Moving Reference Frames
• Unsteady solutions can be carried out using steady
moving reference frames
• Only Single Reference Frame (SRF) models are
applicable!
– Multiple reference frame (MRF) and Mixing Plane
models are by definition steady-state models
• SRF solutions will capture unsteadiness in the
relative frame e.g. vortex shedding

76
Sliding Mesh Model
• The sliding mesh model permits motion multiple domains sliding relative
to one another along interface boundaries
• Numerous applications
– Mixing tanks
– Rotor-stator 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.
moving mesh zone

cells at time t cells at time t+∆t


77
Sliding Interfaces
• Sliding interface requirements:
– Interfaces are non-conformal
– For rotating domains, the interface between a rotating subdomain and time t = 0
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! t + ∆t
– Any translation of the interface cannot be normal to itself.
• A sliding mesh preview is now available in Fluent 6.1 to help detect Elliptic interface
is not a surface of
sliding mesh problems before you run your calculation revolution.

SolveÆMesh Motion…

78
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 non-conformal interface
– Enable Periodic option if
sliding/rotating motion is periodic.
– Enable Coupled for conjugate heat
transfer.

79
Sliding Mesh Example
Sliding
Interface

Crossflow Fan (velocity contours)

80
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
81
Illustration of Reference Frames
y
y
CFD domain

r r r
r
r R ω = ω (t )
ro r r
moving
x r0 = r0 (t )
z frame

stationary r
frame ω
z x axis of
rotation

Note: R is perpendicular
to axis of rotation

82
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 r Add these terms
r  dω r d r0  2
using a Source
S accel = − ρ  × r + 2  term UDF

 dt dt  applied to the
momentum
equations…
rotationial linear
acceleration acceleration

83
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 1Hadzic, et al., Numerical Simulation of Sloshing,
Proc. SRI-TUHH Mini Workshop on Numerical
sites (shown) Simulation of Two-phase Flows, Ship Research
Institute, Tokyo, Japan, 2001.

84
Example: Tank Sloshing (2)
• The volume of fluid (VOF)
model is used in FLUENT
• A user-defined 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)
85 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 only, you need only prescribe ω(t).

86
Example: Flapping Airfoil
Sliding interface

Moving zone

Flapping NACA 0012 airfoil (+/- 8 deg)


87
Moving Mesh UDF
/**********************************************/
/* flap.c */
/* UDF for specifying a time-varying 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("flow-time");


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;
}
}
}
88
Flapping Airfoil: Unsteady Velocity

89
Moving/Deforming Meshes (MDM)
• FLUENT 6 offers three modes of Mesh
Movement/Deformation:
– Spring Analogy: interior nodes behave like a
spring/sponge with expansion or contraction (tri/tet cells
only)
– Local Re-meshing: allowing local nodes, faces and cells to
be re-meshed when the size/skewness of the mesh exceeds
specified criteria (tri/tet cells only)
– Dynamic Layering: adding/removing cell layers adjacent
to the moving surface as the region grows or shrinks (quad,
hex or prism cells).
90
MDM Setup (2)
• You must first enable the
unsteady segregated solver
– Only first order solver
available
• Set up model parameters
and methods in
DefineÆDynamic Mesh…
• Consult MDM tutorials
for learning the setup
procedures of MDM
problems.

91
MDM Example

Gear Pump

92
Acoustics
• Fluent 6.1 has an acoustics model as part of the
standard release
– Based on Ffowcs-Williams & Hawkings (FW-H)
methodology
– Predicts broad-band and tonal noise for external
aerodynamic flows
– Multiple sources and receivers can be specified
– Noise predictions can be computed “on-the-fly” or the
transient surface data can be stored for later analysis
– Outputs include:
• Sound pressure level
• Power spectral density at observer’s location
• Surface source strength 93
Acoustics Model Procedures
• Requires unsteady RANS, DES, or LES
solution as a starting point for the analysis
– RANS solution will NOT predict broadband
noise (only tonal noise)
• User sets up
– Acoustics model parameters
– Source surface locations
– Receiver locations

94
FW-H Integral Based Approach
Source Receiver
V
dV
dS R
(y, t ) ( x, t )

p′ (x, t ) = pT′ (x, t ) + p′L (x, t ) + pQ′ (x, t )

ρ 0 (υ& n + υ n& ) ρ 0υ n [r M& r + c (M r − M 2


)] dS ( y )
4π p T ' ( x , t ) = ∫
f =0
r (1 − M r )
dS ( y ) + ∫
f =0
r 2 (1 − M r ) 3
1 &l &l − l
4π p L ' ( x , t ) =
c ∫
f =0
r
r (1 − M r ) 2
dS ( y ) + ∫
f =0
r M
r (1 − M r )
2 2
dS ( y )

1 [ (
l r r M& r + c M r − M 2
)] dS ( y )
+
c ∫
f =0
r 2 (1 − M r ) 3
95
Model Parameters Inputs
• Far-field acoustic
properties
– Density
– Sound speed
• Reference acoustic
power and intensity
(defaults are for air)

96
Source Surface Selection
• Select from list of the
existing surface zones
• Allow multiple emission
surfaces
• Permeable (non-wall)
surfaces are allowed

97
Receivers Specification

• Can specify arbitrary number of receivers


• For each receiver, you specify
– Coordinates
– File name for acoustic (pressure) signal
98
Read & Compute Utility
• Used to compute acoustic
signals from saved source
data
– Read in the saved source
files
– Choose source zones
– Can add or modify
receivers

99
Example: Flow-Generated Noise

Contours of Vorticity Magnitude


Predicted Sound Pressure Level = 101 dB

100
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 post-processing unsteady
solutions
– Physical models and unsteady flows
• Thank you for your attention!

101

You might also like