Advanced workshop on Computational Fluid Dynamics
Discretization
Schemes
Dr.D.Prakash
Senior Assistant Professor, School of Mechanical Engineering,
Advanced workshop on Computational Fluid Dynamics
• Domain is
discretized into a finite set of control volumes
or cells. The discretized
domain is called the “grid” or the “mesh.”
• General conservation (transport) equations for mass,
momentum, energy, etc., are discretized into algebraic equations.
• All equations are solved to render flow field.
Advanced workshop on Computational Fluid Dynamics
Status of FDM, FEA in CFD
FDM
Very simple to get discretized equation
Suitable for simple geometry
Not convenient to solve problem with complex geometry
Mathematical sense
FDM rely on expansion of a function in Taylor’s series.
Requirement of discretization
Conservativeness
Boundedness
Advanced workshop on Computational Fluid Dynamics
FEA
Relatively more complicated than FDM
Have strong mathematical sense- Principle of error minimization
Principle
Minimization of function is the minimization of potential energy
Eg- Structural problem: Structure at equilibrium tends to minimization
of potential energy.
But the governing principles of a fluid flow , heat transfer and mass
transfer is the conservation of mass momentum , energy.
Advanced workshop on Computational Fluid Dynamics
1-D Steady state heat conduction problem
Governing differential equation: 𝑑
𝑑𝑥 𝑘 𝑑𝑡
𝑑𝑥 + 𝑆 = 0
Step 1: Divide into no of subdomains
Centroid
Isolate any control volume from the domain
In addition to 3 centroid, two grind point at the boundaries should be considered.
P E
W
Boundary grid point
1 2 3 4 5 6
w e
Faces of the control volume – e and w
Main grind points- Upper case letter
x
xw xe Step 2: Integrate the GDE for each
Advanced workshop on Computational Fluid Dynamics
Step 3: Convert to algebraic equation using profile variation function
Assume the variation of T wrt x
(1) Simple assumption as piece wise linear (Constant)
W w P e E
(2) Non constant linear
Advanced workshop on Computational Fluid Dynamics
W w P e E
(3) Piece wise linear between control grids
𝑘𝑒 𝑇𝐸𝑥− 𝑇𝑃
(4) Higher order interpolation function
W
Advanced workshop on Computational Fluid Dynamics
8
•
The net flux through the control volume boundary is the sum of
integrals over the four control volume faces (six in 3D). The
control volumes do not overlap.
•
The value of the integrand is not available at the control volume
faces and is determined by interpolation.
Typical control volume
Advanced workshop on Computational Fluid Dynamics
9
Discretization example
•
To illustrate how the conservation equations used in CFD can be
discretized
•
The continuity equation is given by:
•
(1)
Introduce control volume integral- Gauss divergence theorem
(2)
Advanced workshop on Computational Fluid Dynamics
10
Discretization example - continued
The face velocity are located midway between each of the control
volume centroid.
The face velocities are determined from the values located at the
centroids
(4)
Advanced workshop on Computational Fluid Dynamics
11
Discretization example - continued
(6)
(7)
Advanced workshop on Computational Fluid Dynamics
Discretization (Interpolation
Methods)
•
Field variables (stored at cell centers) must be interpolated to the faces of
the control volumes in the FVM:
•
FLUENT
offers a number of interpolation schemes:
–
First-Order Upwind Scheme
•
easiest to converge, only first order accurate.
–
Power Law Scheme
•
more accurate than first-order for flows when Re
cell< 5 (typ. low Re
flows).
–
Second-Order Upwind Scheme
•
uses larger ‘stencil’ for 2nd order accuracy, essential with tri/
tet
mesh or when flow is not aligned with grid; slower convergence
–
Quadratic Upwind Interpolation (QUICK)
•
applies to quad/hex and hyrbid meshes (not applied to
tri’s
), useful
Advanced workshop on Computational Fluid Dynamics
13
First order upwind scheme
P e E
(x)
P e
E
Flow direction
• This is the simplest numerical scheme.
• Assume that the value of at the upstream of the face is the same as the cell centered value in the cell
• The main advantages are that it is easy to implement and that it results in very stable calculations, but it also very diffusive. Gradients in the flow field tend to be smeared out
• This is often the best scheme to start calculations
Advanced workshop on Computational Fluid Dynamics
Central differencing scheme
• This scheme determines the value of at the face by linear
interpolation between the cell centered values.
• This is more accurate than the first order upwind scheme, but it leads to oscillations in the solution or divergence if the local Peclet number is larger than 2.
Advanced workshop on Computational Fluid Dynamics
15 • This is based on the analytical
solution of the one-dimensional convection-diffusion equation.
• The face value is determined from an exponential profile through the cell values. The exponential profile is approximated by the following power law equation:
• Pe is again the Peclet number.
• For Pe>10, diffusion is ignored and first order upwind is used.
Power law scheme
Advanced workshop on Computational Fluid Dynamics
16
Second-order upwind scheme
• We determine the value of from the cell values in the two cells
upstream of the face.
• This is more accurate than the first order upwind scheme, but in
regions with strong gradients it can result in face values that are outside of the range of cell values. It is then necessary to apply limiters to the predicted face values.
• There are many different ways to implement this, but second-order upwind with limiters is one of the more popular numerical schemes because of its combination of accuracy and stability.
Advanced workshop on Computational Fluid Dynamics
17
QUICK scheme
• QUICK stands for Quadratic Upwind Interpolation for Convective
Kinetics.
• A quadratic curve is fitted through two upstream nodes and one
downstream node.
• This is a very accurate scheme, but in regions with strong gradients, overshoots and undershoots can occur. This can lead to stability
problems in the calculation. P
Advanced workshop on Computational Fluid Dynamics
18
Accuracy of numerical schemes
• Each of the previously discussed numerical schemes assumes some shape of the function . These functions can be approximated by Taylor series
polynomials:
• The first order upwind scheme only uses the constant and ignores the first derivative and consecutive terms. This scheme is therefore considered first order accurate.
• For high Peclet numbers the power law scheme reduces to the first order upwind scheme, so it is also considered first order accurate.
• The central differencing scheme and second order upwind scheme do include the first order derivative, but ignore the second order derivative. These
schemes are therefore considered second order accurate. QUICK does take the second order derivative into account, but ignores the third order derivative. This is then considered third order accurate.
Advanced workshop on Computational Fluid Dynamics
19
Solution accuracy
•
Higher order schemes will be more accurate. They will also be less
stable and will increase computational time.
•
It is recommended to always start calculations with first order
upwind and after 100 iterations or so to switch over to second
order upwind.
•
This provides a good combination of stability and accuracy.
Advanced workshop on Computational Fluid Dynamics
20
Finite volume solution methods
•
The finite volume solution method can either use a “segregated”
or a “coupled” solution procedure.
•
With segregated methods an equation for a certain variable is
solved for all cells, then the equation for the next variable is
solved for all cells, etc.
•
With coupled methods, for a given cell equations for all variables
are solved, and that process is then repeated for all cells.
•
The segregated solution method is the default method in most
commercial finite volume codes. It is best suited for
incompressible flows or compressible flows at low Mach number.
Advanced workshop on Computational Fluid Dynamics
consistency
stability
convergence
Discretized equation is a good replica of PDE
Check the Discretized equation is having a property of amplifying
errors or errors get suppressed
Confirm that the computed solution is how much close to
Advanced workshop on Computational Fluid Dynamics