CFD Theory
CFD Theory
Fluids deform under the influence of shear forces and the deformation is proportional to the velocity of deformation . + 289
It
Ilar /1 m
=
Conservation of
:+D pe
mass = .
Conservation of momentum :
2prjail
St
=F Linear momentum is conserved unless an external force is
exerted on it.
STRAIN RATE TENSOR
>
Surface Forces (s Tids
:
.
F : Stress tensor T -(p
=
3 D . I 2uS
+
pi + T
+ = -
Volume Forces :
(afdv -
SHEAR VISCOSITY I
Work done on or
by the
fluid Volumetric heating
Conservation of energy :
GE)au) =
Dirigen
Surface heating
Inviscid fluid: u = 0 Euler equations. Viscous effects can be neglected at high Mach and Reynolds numbers
Incompressible fluid: pressure is independent of density. Doesn’t mean that density is constant, but that 1 u = 0
Barotropic fluid: pressure depends only on density. Energy equation not needed.
Potential flows: inviscid and rotation free. = De De = 0
Guid + 1p-iscous stress
tense
-
GRID GENERATION
Points value at cell centre or vertex. Finite difference discretisation. Difficult for complex geometry.
Coefficients of basis functions. Finite element discretisation. Arbitrary high order, but slow.
Cell averages finite volume discretisation. Robust and fast.
Finite volume method
The computational domain is divided into non-overlapping control volumes. The solution consists of the cell average and
not localised. It is associated with the cell centre. It requires approximation methods:
• Solution from cell averages and flux at the boundary surfaces. Requires reconstruction or interpolation.
• Surface integral approximated by numerical quadrature.
The quality of the result strongly depends on the mesh quality.
• Topology: relationship between neighbouring elements.
• Geometry: shape and size of the cells.
Structured grids Unstructured grids
• Internal cells are topologically similar • Elements can have neighbours with arbitrary topology.
• All internal cells have the same number and type of • No general rule for connectivity with neighbours.
connection. • Can be automatically generated by a compute but it is less
• Mesh is more accurate but is difficult to make for precise.
irregular shapes.
• Easier to access data but has to be human made.
Hybrid grids: combination of structured and unstructured grids. Implementation usually as unstructured grid, or as multi-
block grid.
Multi-block grids: domain is decomposed in two levels. Firstly in coarse level (blocks) which are then discretised.
Structured grids Unstructured grids
• Domains can be projected onto Cartesian domains. • Not possible to be projected onto Cartesian domain.
• Rectangles (2D) and Hexahedrons (3D). • Triangles (2D) and Tetrahedrons (3D).
• Data stored in matrix —> easy to access. • Data stored in large vector which needs other vectors for
• Efficient solution algorithm. finding the location of the data. Connectivity matrix.
• Local grid refinement requires multi block grids. • Local grid refinement simply by dividing elements.
• Higher computing time per element.
23GP(G =a
Unstructured grids
Advancing front method: prescribe point distribution at domain boundary. Generates one cell layer and repeats until
entire domain is meshed. Requires final smoothing steps and cells might overlap.
Delaunay triangulation: start from a small number of points. Then meshes them using triangulation and afterwards insert
new points using simple algorithms, such that the mesh has the Delaunay property: the smallest interior angle of each
triangle is s large as it can get. Finally, deletes the remaining points.
Octree method: automatic generation of structured meshes by splitting one cell in 4. It ensures +/- 1 level difference at
interfaces. The resolution difference between adjacent cells cannot be higher than one step.
TURBULENCE
Laminar flows recover from disturbances at low velocities. However, they become unstable and eddies from at high
velocities. Tollmien-Schlischting waves develop perpendicular to the mean flow solution. They are unstable as Reynolds
number increases, developing secondary instabilities. Further down, they develop lambda vortices up to hairpin vortices.
The critical Reynolds number depends on the wavelength of perturbation. The Kelvin-Helmholtz instability appears if
there is a velocity gradient across the boundary between two fluid layers.
Turbulence enhances mixing, as well as wall friction. It delays flow separation, increasing lift and decreasing pressure drag.
Turbulence energy is generated on the largest scale, transferred to medium-small scaled vortices and finally dissipated in
micro scale vortices. Tollmien-Schlischting waves have size comparable to boundary layer thickness.
Turbulence cascade:
• Large scale vortices are induced by and strongly dependent on geometry and boundary conditions of the flow.
• Small scales are obtained from large scale through energy cascade. Not affected by geometry and boundary
condition.
Scale separation is more pronounced at high Reynolds numbers.
The Taylor-Green vortex is a classic theoretical model in fluid dynamics, often used to study turbulence and vortex
behaviour in a controlled, idealised setup. It consists of periodic structured vortex field in which pairs of counter-rotating
vortices interact in a decaying pattern. They are initialised as sine and cosine and forced to interact with stretching and
produce smaller scales.
At high Reynolds numbers the vortices are shorter. Turbulence is not random but can be exactly described (DNS).
However, it is strictly dependent on initial conditions.
Within the dissipative range, the energy content decays exponentially with the length scale. Energy spectrum is a function
of the wavelength. Turbulence scale can be computed by the combination of kinematic viscosity and energy dissipation.
v31
Kolmogorov length
Ma
=
1/4
Kolmogrov velocity My = VE
Kolmogorov time Tw =
&
The integral length scale of the largest vortex structures can be estimated based on flow geometry. Consider two points in
space and the vector correlating them. Two points correlating function: statistical tool used to quantify the spatial
relationship between velocity and fluctuations at two different points within a fluid.
>u(x t)u(x + 2 t)
R(x 2),
=
,
,
High correlation at distance r implies that the flow structures are coherent over that distance, indicating the scale of
vortices. As r increases, the correlation decreases. The distance at chich R(x,y) becomes 0 represents the size of the
vortex.
DIRECT NUMERICAL SIMULATIONS (DNS)
Captures all length and time scales of a turbulent flow directly, and without further assumptions, resolving accurately their
temporal evolution.
Total cost of a DNS: NINT-Re
DNS LES RANS
• All turbulent structures resolved in • All gradients of the mean flow and • All gradients and structure of the
space and time; most energetic turbulence structures mean flow are resolved;
• Very fine 3D grid and time step. are resolved in space and time; • Coarse, sometimes 2D grid.
• Cost scales with Re • 3D grid with moderate number of Steady state or a few time steps.
cells and time steps;
• Cost independent of Re.
Reynolds averaging: substitute the sum of the mean value and fluctuations into the Navier-Stokes equations. Apply
averaging operator and simplify as much as possible.
(2(uj uj))
+
= 2xuj Dei
St Gt Ot
Y
Mass conservation : Di = o < filli =i < Mi + Fili = , Di < Mix = O
Momentum )
conservation
fGip 9 Gj(p G2j(sp + x
.
< <
p
: = + =
-Fil = (e e) = Di s i +
> D .
(e) =
Sidelj = i (ri vi) (erj uj =i j
+ + +
luj +
Mis + <euj)
Gi
<Misurstress
=
tenson
The Reynolds stress tensor acts like a stress tensor for apparent viscosity due to turbulence, even though molecular
viscosity is not directly involved. This is because turbulent fluctuations behave like an additional exchange of momentum,
similar to how viscosity would. It is only part of the momentum equation which takes accounts for turbulence, as all other
terms are the same in viscous and inviscid regimes. This tensor is symmetric.
To derive a conservation law for Reynolds stress tensor RST we multiply the momentum equation for the i-component with
uj’ and for the j-component with ui’. Then apply averaging operator.
Quantity is spreading over a large
area without changing the size Reduces Reynolds stress term.
sul Dj Dij
2t
+ Kij =
Pij +
Tij + + +
Ei -
Eij
Advection Production Diffusion Pressure strain Dissipation
Increases the component of the correlation
stress tensor (speed component)
Many terms of the RST include additional unknowns which one probably wants to model.
Advection Kij = e rjui Spacial gradient of the quantity, multiplied by the advection
2x
Transport by mean flow velocity (mean velocity of the flow).
& Miju
Turbulent diffusion Tij =
2x
Transport of Reynolds stress tensor times a turbulence fluctuation. Triple
Production Pij =
-il Zujiju Gui
Ax
Reynolds stress tensor multiplied by gradient
2x
Source term. Increase turbulence intensity of the mean flow. This means that in regions where there is a strong gradient of the mean flow,
by energy transfer from the mean flow turbulence is likely produced. It can be negative. However, usually increases turbulence.
Viscous diffusion
Transport of viscous stress
Dij =1 Milise Viscous diffusion of the Reynolds tensor. Laplacian of the Reynolds stress
Pressure diffusion Dj =
Redistribution of energy among component Redistribution of energy across the components of the Reynolds stress tensor. Responsible for isentropic flows.
Dissipation Eij =
2 Gui Gie Sink term so that alway dissipate momentum in form of thermal energy.
The RST includes unknown correlations, such as <u’i p’> and <u’i u’j u’k>
For every unknown we could derive a conservation law but it would include new unknowns. Need models that approximate.
Miej =
2VSij -3 Sijk
-
ifi i
Sij (=1
=
= O ,
if izj
Eddy viscosity is a field quantity, not a material property as the kinematic viscosity.
Assumptions:
• The effect of divergence of the Reynolds stress tensor are that it is possible to model the 6 terms with 1 scalar field
quantity which is the eddy viscosity.
• The isentropic being of a flow depends only on the components of the Sij tensor (mean flow gradients).
Substituting the EVM into the RANS equations yields:
②Mi
2t
+
(uj r +
Si
• Zero equation models: they are the simplest and are also called mixing length models. The intensity of the turbulence
is proportional to the velocity gradient times a mixing length, which is a length scale at which mixing happens.
r=
a
• One equation models: use kinetic energy in turbulence fluctuations: k. Still a mixing length needs to be defined.
V+ & Om k =
2 Mili
• Two equations models: based on turbulence kinetic energy and a second quantity which can be either the dissipation
rate of k (E ) or the normalised dissipation rate ( ). w
V+ ak2 V+ ak
E w
These models aim to close the RANS equations, which are incomplete due to appearance of turbulent vorticity correlation
terms.
Vonkerman cons e
PRANDTL ONE-EQUATION MODEL
Is an extension of the zero equation model, designed to improve how turbulence is modelled in boundary layer flows. The
transport equation allows the model to capture the spatial variation of turbulence intensity more accurately than the simple
mixing length model.
k is defined as the sum of diagonal component of the Reynolds stress tensor.
In this model, the pressure strain correlation cancels out completely.
avie--
24
There are still unknowns that have to be replaced: Reynolds stress tensor, turbulence diffusion and pressure diffusion.
Dissipation needs to be modelled as well, and it’s done with proportionality to the turbulent kinetic energy^3/2, divided by
the mixing length. This is strictly valid only far away from walls, where we have isentropic turbulence.
N • Includes turbulence production, transport and dissipation, thus much better than 0 equation
H • Very efficient because only transport equation
H • The assumption of a constant mixing length for all flow outside boundary layers is a strong limitation
u • Not suitable for internal flows and flow separation, but often satisfies for external flow and attached boundary layers.
•
JONES & LAUNDER TWO-EQUATIONS MODEL
It aims to provide a more robust adaptable model for turbulence by solving two separate transport equations: one for the
turbulent kinetic energy and another for the rate of dissipation of turbulent kinetic energy. For isentropic turbulence the
equilibrium follows a linear relation between Reynolds stress and strain rate tensor.
Cm = ru =
Ck
The unknown terms are modelled the same way as the Prandtl one equation model. However, we don’t need a model for
the dissipation term, because E is part of the solution.
There is an exact transport equation for the dissipation rate, but it is very complex, so we simply postulate a transport
equation for it.
" • Low computational overhead because only two additional transport equations.
H • Good results for external flows.
" • Should apply only to flows without strong pressure gradients, stream line curvature or separation.
↓ • Formulation of numerical boundary conditions for E is difficult.
• Assumes that Reynolds stress is proportional to main strain rate. Cannot distinguish effects of the individual
components of the Reynolds stress tensor. Model fails to predict anisotropic influences such as curved streamline and
directional volume forces.
Tij = 2+
Sij-Edijk Vw=
↓ • Low computational overhead because only two additional transport equations.
I•
• Gives very good results for boundary layer flows and flows with strong pressure gradients and separation.
Simple wall boundary conditions for W .
" • Very sensitive on inflow and freestream boundary conditions.
h• Over estimation of turbulence production at stagnation point.
These functions detect some flow features and modify the model accordingly to the expected turbulence scenario. The
distance from the wall, d, is used as length scale when close to the wall, but, it the cell size becomes smaller (far away from
the wall) the cell size becomes the length scale.
• Very robust.
• Computationally efficient because jute’s one transport equation.
• Often very good results for simple attached flow and also for flow separation location.
• Less suitable for the prediction of the flow reattachment and shear layer.
• No underlying physical theory at all
Fijijij
The slow term accounts for relations towards an isotropic stage. It takes anisotropic coefficient and put a minus sign in front
of, to acts as an anisotropy damping.
The rapid term accounts for the relation to gradients or external forces which make the tensor anisotropic. The pressure
strain correlation is very physically important because it makes the model sensible to mean flow gradients and their
isotropic state.
• LRR RSM uses the first linear term on the generic model.
• SSG RSM uses the linear and quadratic term of the generic model.
LARGE EDDY SIMULATION (LES)
Large turbulence scales Small turbulence scale
• Produced by external energy input. • Receive energy from turbulence cascade.
• Depend on geometry and boundary conditions. • Similar in all turbulent flows.
• Inhomogeneous and anisotropic. • Homogeneous and isotropic.
• Large and long living. • Small and short live time.
• High energy content, strong effect on loads. • Low energy content.
• Modelling very difficult. • Easy to model.
• Model works only for special cases. • Universal models possible.
It is not the small scale that is modelled, but the effect that it has on the large scale.
To divide the two regions it is either possible to:
• Apply a filter to the Navier-Stokes equations (damps small scales).
• Plot the solutions into a grid.
If the mesh is too fine, the effects of dissipation become important and need to be modelled.
The filter function smooths out high-frequency (small-scale) fluctuations while retaining low-frequency components. The
filtered Navier-Stokes equations introduce a new term, which is the subgrid scale stress tensor, which captures how
small scale motions influence the larger scales.
Most of the dissipation occurs in the smaller scales. Due to the net forward direction of the energy cascade, other effects
are secondary.
With an infinitely fine mesh in LES simulation, the precision would be the same as a DNS, but the cost would be much
higher, due to turbulence modelling.
Convolution is a mathematical operation used to combine two functions in a way that expresses how the shape of one is
modified by the other. Convolution in physical space corresponds to multiplication in Fourier spectral space.
ui = G -
u= =
(G(x -
x ui(x)dx With G(x x)dx
-
= 1
• Gaussian filter: smooths the field based on a Gaussian distribution centred on each point.
• Top-hat filter: averages values within a local box or region. Simulate the mean value over the volume of the set up.
Problem: oscillation.
• Spectral filter: retains only components with wavenumber below a cutoff. Implies that in physical space the filter method
requires to compute an integral ( H unpractical). It preserves exactly the spectral content of all wave numbers that are
contributions to the solution and then drops to zero.
•
Nyquist Theorem: wavelengths that are smaller than twice the cell size cannot be represented anymore.
1 KINETIC ENERGY
i CUT OFF FILTER
Cut-off filter works nicely if the correct turbulence
model is chosen.
GRID
-
WAVE NUMBER
>
log(3)
The filter decomposes the solution into a filtered part and a fluctuation part (subgrid scale). The filter operation is not
orthogonal to the result field.
The subgrid scale stress tensor can be decomposed into three parts, each one representing different interactions between
the resolved scale and the modelled one.
• Leonard stress tensor: represents the interaction between the resolved scale turbulence with itself. It results from the
convolution filter and, since it depends only on resolved scales, it’s often completed directly rather than modelled.
Lij =
ij-Tij
It tells something about how much we remove from the equation. These fluctuations don’t disappear when multiplied
with filtered velocities and then filtered again.
• Cross stress tensor: represents the interaction between resolved and unresolved scales. The term arises because the
filtered velocity fields are affected by smaller, unresolved fluctuations.
Cij =
Mill"j + M Mj
• Reynolds stress tensor: exactly the same as for the RANS, it represents the interaction between the unresolved
scales themselves. It captures how subgrid turbulence itself transfers momentum and energy.
Rij =
Mirj
Fig =
1 Te Sij-2Usas Sij Si= -
Qui Glii
Written in the same way as the one for RANS, decomposes the subgrid stress tensor in deviatoric and trace component.
The deviatoric part is modelled by taking the strai tensor and multiplying it by some turbulent viscosity.
Usas =
(CsA) 5
Smagorinsky constant Filter width : 1 = 3 Cesvolume Characteristic dimension
The Smagorisnky constant can be calculated from the known energy spectrum of homogeneous isotropic turbulence.
However, in practice very different values are used for Cs. Close to wall, it must be corrected by a van-Driest damping.
- 2
% 2
Cs =
Cso 1 - e
"•
• Very simple and efficient.
Does not require additional PDEs.
↓ • No numerical problems.
"• Drains sufficient amount of energy from the resolved scales, which stabilises the simulation.
i
• Very unsatisfying correlation with exact subgrid-scale stresses.
• Better model are required for complex flows.
• Optimal value for Smagorisnky constant varies a lot.
The Germano identity allows to resolve the Leonard stress tensor on the test-filter level. The strain tensor is based on a
coarse grid solution.
H • For the first time, the model is closed.
↓ • Significant improvements over original Smagorinsky model.
"• No further empirical assumptions required.
"• Improves prediction of near-wall turbulence.
Hu • Does not require van-Driest damping if the filter is formulated in such way that it filters only on wall tangential direction.
I • CD can assure positive and negative values, thus the model is able to represent the backscatter in theory.
i•
• In practice, the backscatter often leads to instabilities.
Still poor correlation of model and exact SGS stress tensor.
• Numerically unstable
MIXED MODELS
• Similarity type models (correlation) + eddy viscosity (stability)
Mid-point rule: approximate surface integral, simplest most Gauss quadrature. Write Fe as the average flux times the
area. Integral approximated as the product of the integrant (flux) and the area of the cell face. The error of this
approximation can be evaluated by a Taylor series expansion.
p(x) =
p(x) + (x -
x)8q +
(x-x) .
T (n)dx =
n y(x)h 1(E) (
+ -
=
( +
Numerical method
-
p(x) y(x)
+
=
e error
22
Error depends on (second derivative of variable x). Scales with h^2 —> gets rapidly smaller by refining the mesh.
2x
Trapezoidal rule: fit a trapezoidal shape between the two end points of the integral (2nd order).
Simpson rule: obtained by combining the trapezoidal and mid point rule in a smart way. The second order errors cancel
with each other, obtaining a 4th order error.
Linear interpolation: approximates the convective flux at a cell face by using value from the upstream cell centre (E). It is
stable and easy to implement, but has low accuracy and introduces numerical diffusion, which can smear out sharp
gradients.
~
e
= Tre + (1 te) -
te =
He-ke
Re -
xB
Takes both solutions form E and P and multiplies them for a rate factor lambda which depends on geometry.
The error of a numerical scheme can be analysed by Taylor series expansion.
T= + (x -
x) p +
(x
-x) (p + Ho T
. .
The truncation error of the UDS is a 1st order one, because it is proportional to the grid width.
% gi SxG =
-
+
(4)
- St
Ge
-est . .
+
Uu 1x St
-
Numerical scheme Truncation
GG-u-uue
error
2x2
+ vo +
Ut Ven
2
2
2x2
- -
viscosity N : Numerical
The truncation errors added results in a term expressed with second derivative multiplied by something that is constant.
This is called numerical viscosity and produces numerical diffusion. Generally, it is not related to the character of the
original conservation law. Thus, the effective Reynolds number lowers by a factor Un
ut
Re =
Un =
US -
Ust
N + UN 2
The minus sign represents the facts that numerical viscosity can be either positive or negative, depending on ration
between the time step size and the mesh size.
This diffusion smoothens perturbations. A negative viscosity would amplify small perturbations reaching infinitely large
values. Therefore, it must be avoided.
Courant - Friedrisch - Lewy number: CFl =
St
CENTRED DIFFERENCING SCHEME (CDS)
V= =
V + (xz -
xp) ( Ve V =
+ (xe -
xp) e
~
Ve = Ere + (1-te) -
(e-vele-se) I'v
2 2x2I
The truncation error is proportional to the square of the cell size: 2nd order scheme.
With minimal numerical diffusion, CDS can capture sharp gradients more accurately. However, it tends to produce
oscillations or overshoots near discontinuities, due to its lack of inherent stability.
UCS CDS
• Interpolates values in the direction of the flow. • Averages values from both sides of the cell face, assuming a
• First order numerical error. symmetric contribution from neighbouring cells.
• Due to the numerical viscosity, tends to smear out sharp • Second order numerical error.
gradients. • Can represent sharp gradients, however, can oscillate or
• Unconditionally stable for steady-state problems with overshoot in presence of discontinuities.
convection dominant flows. • Unstable at high Reynolds or Peclet numbers.
• Numerical diffusion is the main limitation. • Numerical diffusion is minimal, providing crisper
representation.
Discretisation of gradients
Gradients at the cell face come from the term with divergence. (ls .
E idS
-
Approximate the viscous stress with a CDS method, because this closely corresponds to the isotropic character of a
diffusion.
For non-uniform grids, this formally leads to a 1st order method, because the leading order error term scales with Ax .
For uniform grids, the order increases by one, and the method converges with 2nd order.
• Refine by splitting into equal intervals: 1st order error appears only at the old cell faces. Global truncation error
converges only slightly slower than a 2nd order.
• Refine by splitting into sub interval with equal stretching: first error term converges faster than second error term,
obtaining a 2nd order convergence.
UNSTEADY PROBLEMS
A 4th dimension needs to be discretised, time. Unsteady problems are initial boundary value problems where the solution
depends on the initial conditions and boundary conditions. Time discretisation is done the same as the spatial one.
• Euler forward (explicit): evaluate all terms at the already known time level (t0 or t^n-1). 1st order.
• Euler backwards (implicit): evaluate all terms from time step n+1. Very expensive iterative method. 1st order.
• Mid-point rule (implicit): approximate the integral by the center point. Smaller truncation error of 2nd order.
• Trapezoidal rule (implicit).
All methods converge to the same solution at small time steps.
A helpful indication for convergence is Courant-Friedrisch-Lewy number; time integration errors are generally small for
CFL < 0.5. Implicit time marching methods allow for stable time integration with much larger time steps.
Explicit time marching Implicit time marching
• Efficient, no iteration necessary. • Include values of t > tn.
I •
•
Straight forward.
Low memory requirements. H •
• Integration can only be done iteratively.
Several iteration methods are available, implementation can
• Unstable for large time steps. be very complex.
I• Stability analysis gives limit for time step size in terms of Il
1 • Large memory requirements.
CFL number. N • Generally stable for much larger time steps.
↓ • Time step has to be adjusted according to flow velocity Il
• High cost can be compensated by using fewer and larger
or grid size. time steps. However, larger time steps can lead to
numerical diffusion.
The physical time step represents the actual time increments used to advance the simulation by a specific physical
amount. Commonly used in simulations where the goal is to precisely capture temporal evolution. If it is too large can
cause temporal aliasing.
Local time step is an artificially modified time step that varies spatially across the domain, allowing different cells to
advance by different amounts depending on local flow characteristics. Primarily used in steady-state simulations to reach
convergence faster, by allowing different regions of the flow field to equilibrate at different rates.
The dual time-stepping method is an approach used in unsteady CFD simulations to improve stability and convergence.
It is particularly used when dealing with complex flow features, such as turbulence, that require accurate transient
solutions. By introducing a pseudo-time step, it helps ensure each physical time step is fully converged before moving onto
the next one, for greater stability.
The pseudo-time step is an artificial smaller time step used for internal iterations to converge the solution within each
physical timestep.
(ri
Implicit time discretisation methods are usually applied to a linearised version of the Navier-Stokes equations.
• Approximate the non linear term with the velocity of the previous time step (1st order).
• Extrapolation of as much information as possible from the previous step (2nd order).
Discrete operators approximate the flow evolution in a cell as a function of the solution in neighbouring cells. But what do
we do at domain boundaries? Boundary conditions.
• Dirichlet: impose value of variable on the boundary.
• Neumann: impose gradient of the variable on the boundary.
• Robbin: combination of Dirichlet and Neumann.
• Periodic: value should be the same as another boundary condition.
No slip wall:
• Dirichlet boundary condition for velocity. MFLUID =
MWall
Symmetry
• Pressure gradient, velocity gradient and vertical velocity null at the symmetry plane.
ap Or- SYM SYI
= D
Inflow C
u + C
X M + C
Outflow
• Supersonic: no upstream influence. Not allowed to specify any Dirichlet boundary condition.
• Subsonic: exactly one Dirichlet boundary condition for left travelling characteristic u - c.
Boundary conditions approximate the reality. To avoid unphysical effects, they should be located as far away as possible
from the region of interest. The choice of them can affect the convergence rate of the linear solver.
Gustu Duse
2
APPLY DIVERGENCE .
Grj
Gui = o For
incompressibility Gli Posson
equae
The velocity of the cell doesn’t depend on the pressure of the cell itself:
Pressure flux :
Pr-pe =
PwPp -
Poipe =
Pr-pe
2
Thus, pressure is effectively discretised on a coarser grid.
Poisson equation f(u) PEE-St Pa PNP
Ps
+
:
D'p = <
=l
Pressure at cell P depends on the neighbour of the neighbour. This decoupling leads to at least 4 independent solutions.
Without imposing a coupling condition between these 4 decoupled solutions, they could evolve due to numerical errors
independently.
RIE & CHOW INTERPOLATION
Pressure - velocity coupling can be re-established by:
• Different staggered grids for pressure and velocity.
• Special interpolation techniques for the pressure.
Tailored interpolation method for the mass flux through cell surface. The additional term detects oscillations. One can show
that this term is dissipation and smoother oscillations.
Du
Used in CFX
an
Ce
C =
SOLUTION ALGORITHMS FOR LARGE LINEAR SYSTEMS
Linear algebraic system coefficient matrix Constant "right hand side"
.
-
Solution vector
25
With the formal solution: %
-
= 1
However, inverting the matrix A is not an easy task: with N grid points A-1 has O(N^2) entries. Furthermore the inverse
matrix is not sparse, even for a sparse matrix. Prohibitive memory requirements.
• Gauss-elimination: transform A into an upper triangular: O(N^3) operation required.
- 5
• LU factorisation: A decomposes into an upper triangular and a lower triangular. up =
j y =
Iterative solution methods: split A in a part N that can be easily inverted (diagonal matrix) and a part P.
= - -
N= + 5 <
p =
E- qn
In practice, firstly the residuum is computed, which is the difference between the equation solved and the equation ideally
solved.
ERROR :
"
=
qu - Residui : R =
Ägn - 5
>
R = Egn
Interrupting the simulation as soon as the residuum becomes small is not a good solution because doesn’t mean that the
error has stopped decreasing.
The iteration matrix G is the matrix that brings the solution from one iteration step to another one. The spectral radius is
the largest eigenvalue of the iteration matrix. It needs to be < 1 for faster convergence.
= [ 1 -
E = ge
96
Jacobi method is an iterative algorithm for solving a system of linear equations. It solves each equation in the system for a
specific variable, assuming that all other variables are known from previous iterations. Matrix A is broken down into its
diagonal D, lower half L and upper half U.
Spectral radius for Poisson equation on uniform NxM grid: p( = 1 -
N +
t
Increasing the number of mesh points slows down the convergence, which is the main issue of this method.
Gauss-Seidel method improves the Jacobi method by updating each variable immediately, as soon as a new value is
computed within each iteration. This allows to used the most recent values of variables, instead of waiting until the entire
↑
iteration is completed. No need to remember , just overwrite with the updated solution.
Converges twice as fast as the Jacobi method: = 1
- +
i
Incomplete LU factorisation (ILU): matrix A approximated by the product of L and U, however, only non-zero elements
are computed. L and U sparse if A is sparse. Manageable memory requirements.
Multigrid methods are advanced iterative techniques for solving large systems of linear equations. They address the
problem of slow convergence seen in traditional iterative solvers, especially for high resolution grids. The solve the problem
on multiple grid resolutions: coarser grids to handle large scale, low frequency errors and refined grids for small scale, high
frequency ones.
By projecting the error on a coarser grid, large wave lengths appear smaller to the solver.
1. Relaxation (Smoothing): Begin solving on the finest grid by using an iterative solver like Jacobi or Gauss-Seidel to
reduce high-frequency (small-scale) errors.
2. Restriction: Transfer the residual (error in the current solution) from the fine grid to a coarser grid. This involves
averaging or “restricting” the fine-grid information onto the coarse grid.
3. Coarse Grid Correction: Solve the error equation on the coarser grid. This removes the low-frequency (large-scale)
errors more effectively on the coarser level than it would on the fine grid.
4. Prolongation (Interpolation): Transfer the corrected solution from the coarse grid back to the finer grid by
interpolating, which refines the solution on the finer grid.
5. Post-Smoothing: After transferring back to the fine grid, apply additional smoothing iterations to eliminate any
remaining errors.
• V-Cycle: A simple cycle where the algorithm goes from the finest grid to the coarsest level once and then back up to
the finest grid.
• W-Cycle: A more thorough approach, the W-cycle revisits the coarser grids multiple times. This can improve
convergence but is computationally more expensive.
• Full Multigrid (FMG): In this cycle, the solution starts on the coarsest grid and gradually interpolates up to the finest
grid, solving the equation more accurately at each level.
Algebraic multigrid: discretisation done only once on the original fine grid. Discrete equations for coarser grids obtained
by summation from the fine grid. Absolute value of coefficients determines which cells are merged.
Very efficient because the lowest number of iterations needed is performed, only in the locations where needed.
into
Decompose solution of equations
(Menact-Descete
of equations
solution of
Exact set se
smaller
pieces
=
Unature
-
Udiscrete =
(Unature -
Memp + Memp-Menact +
Simulation a
experiment
=
(Menact -
lune so +lune so
-Mun , , I,
I ↓
Should not exist if the numerical scheme Discretization is not consistent
Actualmesh andtimestep,withiteratiesents
.
I
• Insufficient spatial discretisation convergence.
• Insufficient temporal discretisation convergence. SOLUTION VERIFICATION
↑
Wh .
. CDS
Resolution of boundary layer is important for friction coefficient, flow separation and transition and turbulence production.
Production peak at y+ ~ 10/20
The quality of grid is critical for accuracy of the discretisation, convergence behaviour and time step size.
Wall treatment is automatic in CFX. Wall functions are switched if the laminar sublayer is unresolvable or an epsilon-based
turbulence model is selected.
Pay attention not only to residual but also to imbalance, i.e. between incoming and outcoming mass flow when flow is
converged.
Modelling error
• Turbulence: the choice of turbulence model can significantly affect results. This dependency is smaller in LES. Check
should be done between different models. In LES is more important the refinement of the mesh rather than switching
turbulence model.
• Thermodynamics: standard parameters can vary between dry and Lukewarm conditions. Material properties depend
on temperature and pressure.
• Boundary conditions: they are not realistic, but an approximation of reality which leads to uncertainty. Make the
computational domain as large as possible and pay attention to gradients at the corner.
u(xo h) -
=
u(r) + ( - h-
xd) du (h da so
u(x h) + =
u(x) +
hd +
da a
u(x + h) -
2k
m(r-h)
+
duno += ah
12 da 40
gU
= =
U W
3) Re M = Fr =
U
St =
f - = Pr
URT gl &
4) Hydraulics jumps
#o
a
5) Incompressible
: 0 Dr =o
It
+ u
.
Dy = 0
Constant
density : 0 u .
de = o
7) Because from the non linear term of momentum equation , appears only the divergence of the RST.
Et = -2rsasSi Tir =
3rsas Sir
SAME
Subgrid scale
viscosity a C1
12) Performs the deconvolution in a finite domain with M upper bound , therefore introducing a numerical
error .
= = -G) = G
Sas tensor :
vil-jij-ij
13) The Smagorinsky constant is fixed throughout the whole domain , being highly inaccurate .
It can be
conditions . Furthermore
,
it doesn't need the van Driest damping term close to the wall. It is a
closed model .
②
1) The order of convergence is the rate of error
convergence with mesh refinement
11)Zu1zu Da =
= DGuu 2x
Nom hmear term
19) While
performing numerical approximation the second order truncation er ror acts like a numerical
2) u(t) =
e (to) + (t to)
-
(E +
It-toGr h to
auu At
u-u
u(x) =
u(x0) -
(m -
x0) (2) +
(2-20) (E 2
Su
2x
=
St
,
~
u =
u +
St(Gu) +
I ) to
u =
u-Sx(s +S (
-Stu c St 2 at
+ =
I I
Truncation er roz
Du
From
Gu 2xz
~ Trunc . er ror =
-f
I
_
CA
2 2x2
I
Un
Ap = b
Approximate solution :
Ay = b Residual : R =
Ay-b Truncation erroz: E =
y -a
R b A(y y)
=
Ay
-
=
Ay Ay - = -
= AE
22) 20 =
1 , 22 , Se , 23 , La . 250 Uj =
Rjtzk
uj-u +c r -
b
St 21x
=
fj Ay =
x
=Ha ,
22 , 23 ,
24
-
n= 1 2 3 "
e ut
- -
j = 1
- 23x
C
O O +
2xx
C 1 C
u
1
2
Ec
O
204 St 25x I
+
C 1 C
3 0
-
202 St 21x
r f3 +
u
-C 1 n +1
4 un u CM5
----
O O + -
St u
21x 17 28x-
-
j = 1
unun un CAx
ent
j = 2
At
+
Cu f2 +
m
St
23) Orthogonality ,
smoothness , fast convergence ,
easy to refine ,
as fine as needed , as carse as
possible
.
29) y
+
11
28) MELVID =
Mwal = o
= = 0
In = 0
2019
9) Cost a Re -S
=St tu u
-
74) 2 =
f(u t) ,
= - u -
Ax
75)
e
J Se nese Ma =
Mp -
Ah -
&
If A = B, second order term vanishes - and order er ro
Gu =
MB-Ma
h
Ah -
h
Bhe
au?
If AB ,
1st order error
17) Implicit :
larger time step for quicker convergence
RANS :
implicit LES :
explicit
22) RST =
-Mil =
2VSij-ESijk
13) d .
b Prandtl length
.
:
mixing
c . Spalart-Allmaras : distance from wall
25) Physical explanation : Most of the effect of the SaS is due to the interaction between the smallest resolved scale and
26) Error decreases and them stops for RANS with refinement
LES > DNS
201 os e
RANS mothing
-
LES
· Geometric
multigrid :
different levels of discretization
The is to
compute the
large wavelength mesh.
purpose er ror on a corser
28) Turbine
22) un cu
Point 1) Un u cuu
- - -
Estu crs
-
1 &
It 200 41
-e de Mz
= fz +
u
St
·
- U3 f3 +
un
-
* o
-5-- 44 - - fu +
uc 25x
M(20 + h)
15) ur-h d
-
Se
=
u(xo h) + =
u(x) + h ae a
e(x h) -
=
u(x) -
ha dae s n
u(x h) u(x h) 2h de
+ -
- =
di so
t
h3
3
Bu
da Ro
E =
h
6
as no
memory :
O (N) N =
m .
n 2 =
8
Memory : 64