Solution Methods
Solution Methods
Solution Methods
2
Numerical Schemes
3
Numerical schemes: finding face values
• Face values of f and f/x are found by making assumptions
about variation of f between cell centers.
• Number of different schemes can be devised:
– First-order upwind scheme.
– Central differencing scheme.
– Power-law scheme.
– Second-order upwind scheme.
– QUICK scheme.
• We will discuss these one by one.
4
First order upwind scheme
• This is the simplest numerical
scheme. It is the method that we interpolated
f(x) value
used earlier in the discretization
example. fP fe
• We assume that the value of f at
the face is the same as the cell fE
centered value in the cell e
P E
upstream of the face.
• The main advantages are that it
is easy to implement and that it
results in very stable
calculations, but it also very Flow direction
diffusive. Gradients in the flow
field tend to be smeared out, as
we will show later.
• This is often the best scheme to
start calculations with. 5
Central differencing scheme
• We determine the value of f at
the face by linear interpolation interpolated
f(x) value
between the cell centered
values. fP
• This is more accurate than the fe
first order upwind scheme, but it fE
leads to oscillations in the e
P E
solution or divergence if the local
Peclet number is larger than 2.
The Peclet number is the ratio
between convective and diffusive
transport: uL
Pe
D
• It is common to then switch to
first order upwind in cells where
Pe>2. Such an approach is
called a hybrid scheme. 6
Power law scheme
• This is based on the analytical
solution of the one-dimensional
convection-diffusion equation.
f(x) interpolated
• The face value is determined value
fP
from an exponential profile
through the cell values. The
fe
exponential profile is fE
approximated by the following P e E
power law equation:
1 0.1Pe 5
fe f P fE fP x
Pe
L
• Pe is again the Peclet number.
• For Pe>10, diffusion is ignored
and first order upwind is used.
7
Second-order upwind scheme
• We determine the value of f 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 fW
can result in face values that are f(x) interpolated
value
outside of the range of cell fP
values. It is then necessary to
apply limiters to the predicted fe
face values. fE
Flow direction
9
Accuracy of numerical schemes
• Each of the previously discussed numerical schemes assumes some
shape of the function f. 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.
10
Accuracy of Numerical Schemes
Accuracy and false diffusion (1)
• False diffusion is numerically introduced diffusion and arises in
convection dominated flows, i.e. high Pe number flows.
• Consider the problem below. If there is no false diffusion, the
temperature will be exactly 100 ºC everywhere above the
diagonal and exactly 0 ºC everywhere below the diagonal.
• False diffusion will occur due to the oblique flow direction and
non-zero gradient of temperature in the direction normal to the
flow.
• Grid refinement coupled
with a higher-order
Diffusion set to zero
interpolation scheme will
k=0
minimize the false Hot fluid
diffusion as shown on T = 100ºC
the next slide.
Cold fluid 12
T = 0ºC
Accuracy and false diffusion (2)
8x8
64 x 64
13
Properties of numerical schemes
• All numerical schemes must have the following properties:
– Conservativeness: global conservation of the fluid property f must
be ensured.
– Boundedness: values predicted by the scheme should be within
realistic bounds. For linear problems without sources, those would
be the maximum and minimum boundary values. Fluid flow is non-
linear and values in the domain may be outside the range of
boundary values.
– Transportiveness: diffusion works in all directions but convection only
in the flow direction. The numerical scheme should recognize the
direction of the flow as it affects the strength of convection versus
diffusion.
• The central differencing scheme does not have the
transportiveness property. The other schemes that were
discussed have all three of these properties.
14
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.
• The central differencing scheme should only be used for transient
calculations involving the large eddy simulation (LES) turbulence
models in combination with grids that are fine enough that the
Peclet number is always less than one.
• It is recommended to only use the power law or QUICK schemes
if it is known that those are somehow especially suitable for the
particular problem being studied.
15
Pressure
• We saw how convection-diffusion equations can be solved. Such
equations are available for all variables, except for the pressure.
• Gradients in the pressure appear in the momentum equations,
thus the pressure field needs to be calculated in order to be able
to solve these equations.
• If the flow is compressible:
– The continuity equation can be used to compute density.
– Temperature follows from the enthalpy equation.
– Pressure can then be calculated from the equation of state p=p(,T).
• However, if the flow is incompressible the density is constant and
not linked to pressure.
• The solution of the Navier-Stokes equations is then complicated
by the lack of an independent equation for pressure.
16
Pressure - velocity coupling
• Pressure appears in all three momentum equations. The velocity field
also has to satisfy the continuity equation. So even though there is no
explicit equation for pressure, we do have four equations for four
variables, and the set of equations is closed.
• So-called pressure-velocity coupling algorithms are used to derive
equations for the pressure from the momentum equations and the
continuity equation.
• The most commonly used algorithm is the SIMPLE (Semi-Implicit
Method for Pressure-Linked Equations). An algebraic equation for the
pressure correction p’ is derived, in a form similar to the equations
derived for the convection-diffusion equations:
19
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.
• Compressible flows at high Mach number, especially when they
involve shock waves, are best solved with the coupled solver.
20
Segregated solution procedure
Update properties.
Converged?
No Yes Stop
21
Coupled solution procedure
• When the coupled solver is used for steady state calculations it
essentially employs a modified time dependent solution algorithm, using
a time step t = CFL/(u/L) with CFL being the user specified Courant-
Friedrich-Levy number, L being a measure of the size of the cell, and u
being a measure of the local velocities.
Update properties.
Converged?
No Yes Stop
22
Unsteady solution procedure
• Same procedure for segregated and coupled solvers.
• The user has to specify a time step that matches the time variation in the
flow.
• If a time accurate solution is required, the solution should be converged
at every time step. Otherwise, convergence at every time step may not
be necessary.
24
The multigrid solver
• The multigrid solver uses a sequence of grids going from fine to
coarse.
• The influence of boundaries and far-away points is more easily
transmitted to the interior on coarse meshes than on fine meshes.
• In coarse meshes, grid points are closer together in the
computational space and have fewer computational cells between
any two spatial locations.
• Fine meshes give more accurate solutions.
corrections
fine coarse
mesh mesh
summed equations
(or volume-averaged
solution)
26
Finite volume method - summary
• The FVM uses the integral conservation equation applied to
control volumes which subdivide the solution domain, and to the
entire solution domain.
• The variable values at the faces of the control volume are
determined by interpolation. False diffusion can arise depending
on the choice of interpolation scheme.
• The grid must be refined to reduce “smearing” of the solution as
shown in the last example.
• Advantages of FVM: integral conservation is exactly satisfied and
the method is not limited to grid type (structured or unstructured,
Cartesian or body-fitted).
• Always ensure proper convergence.
27
Flow over a backward-facing step