You are on page 1of 41

RTR / DPC DRTH / QBM5350

NAVIER-STOKES System Département Prestations Clients


Understanding and Controlling fluid flows UET Aero Thermique
Dr. Ioan TELEAGA
NT 5350/2009/171 Tél : (40) 21 40 62 096
e-mail : ioan.teleaga@renault.com
Bucarest, le 07/07/09

Dr. Ioan TELEAGA RTR-DPC-UET AERO THERMIQUE STRICTEMENT CONFIDENTIEL


OVERVIEW

 This note is based on a lectures series in numerical methods given by the


author in 2008 at RENAULT RTR in the DPC department. In the same time, it is
a pleasure of the author to share with other interested people his knowledge,
experience and problems in the area of numerical mathematics applied to CFD.

 Today, mathematics is used with success with one face or another in many
areas of industry. In the same time, today experiments and theory are
supplemented in many cases by numerical computation that is an equally
important component. Nowadays, in scientific computing one can treat more
complex and less simplified problems through massive amounts of numerical
calculations and thanks to the increased computer facilities in short time.

 We have aimed to make this note as understandable as possible being written


in a fancy free style meant to popularize the mathematical concepts behind
almost any type of numerical method applied in engineering science,
particularly to incompressible Navier-Stokes equations.

Dr. Ioan TELEAGA RTR-DPC-UET AERO THERMIQUE STRICTEMENT CONFIDENTIEL 2


BACKGROUND (1)

 The Navier-Stokes (NS) equations describe the motion of a fluid in a


certain domain. Mathematically speaking the NS system looks like that:

u
 u   u   p  u  f
t 
   stress extra forces
convection

 u  0

→These equations have been discovered by Claude-Louise Navier (a


french engineer and physicist) and Sir George Gabriel Stokes (an irish
mathematician and physicist) more than 100 years ago. Although long
time has been passed, little understanding has been achieved.

Dr. Ioan TELEAGA RTR-DPC-UET AERO THERMIQUE STRICTEMENT CONFIDENTIEL 3


BACKGROUND (2)

 How to make real money u


within these equations (apart  u   u   p  u  f
t  
RENAULT of course)?     stress extra forces
convection

 u  0
 For a mathematical point of view, it is hard to answer the following
questions (in 3D):
 does exists one solution?
 the solution is unique?

 Moreover, there is 1e+6 $ millennium prize from the Clay


Mathematics Institute (http://www.claymath.org/) for the person
who will answer the above questions. The complete mathematical
formulation can be seen at the institute webpage.

Dr. Ioan TELEAGA RTR-DPC-UET AERO THERMIQUE STRICTEMENT CONFIDENTIEL 4


BACKGROUND (3)
 The NS = Newton’s second law u
of mechanics (which states that  u   u   p  u  f
t 
the sources for the time    stress extra forces
variation of the momentum (i.e. convection

the product of mass and  u  0


velocity) in a physical system
are the forces acting on it).

 The first equation (in fact three equations in 3D) is called the
momentum equation and the last one is called mass conservation
equation.
 There is no independent equation for the pressure. The pressure
only appears in the momentum equations as a gradient. Having no
explicit equation for the pressure (I meant here there is no
equation where the pressure is the dominant unknown), it is very
hard to solve both analytical and numerical cases.

Dr. Ioan TELEAGA RTR-DPC-UET AERO THERMIQUE STRICTEMENT CONFIDENTIEL 5


BACKGROUND (4)

Initial Conditions (IC) u


 u   u   p  u  f
t  
    stress extra forces
convection

 u  0

 Are very important in order to have good starting points


(according to the physical modeled phenomena).
 These IC are very useful to speed up the numerical convergence.

→ For instance, try to start from the pressure equal to dummy,


instead of the correct pressure. Definitively, the solver will need
more iteration steps to arrive at the desired result.

Dr. Ioan TELEAGA RTR-DPC-UET AERO THERMIQUE STRICTEMENT CONFIDENTIEL 6


BACKGROUND (5)

Boundary Conditions (BC) u


 u   u   p  u  f
t  
Part 1     stress extra forces
convection

 u  0
 BC are the most important data to be added into the NS system.
Thus they need to add NEW information to the NS system.
 From a mathematical point of view, we need to set up Dirichlet BC
(sometimes called no-slip or wall BC), i.e. (u,v,w)=g at the
boundary and NO BC for the pressure. This is of course not the
case in engineering computations. Moreover, this does not mean
that if we have some information (pointwise) for the pressure (for
instance) it is not allowed to be used. If the information reflects
the reality the solver will be “happy” to proceed. That’s why this
type of BC is used in almost all CFD codes.

Dr. Ioan TELEAGA RTR-DPC-UET AERO THERMIQUE STRICTEMENT CONFIDENTIEL 7


BACKGROUND (6)

Boundary Conditions u
 u   u   p  u  f
t  
Part 2     stress extra forces
convection

 u  0
 Another used BC is the slip BC, i.e. only one component of the velocity
field is set up at the boundary. This type of BC does not add enough
information and indeed the solver is giving results (wrong sometimes)
according to that (think about no wall turbulence).
 There is a more sensible way with the Neumann (outflow) BC. This type of
BC (unfortunately widely used in CFD simulations) does not add also any
new information on the NS system. Indeed the CFD solvers give wrong
results. We mean here, appearance of unexpected recirculation zones or
back flows (think about FLUENT). This is the right answer of the solver.
Therefore to get rid of such unphysical results the engineers try to
enlarge the computational domain. The same situation is seen in the
aerodynamical tunnels. They are huge buildings constructed in order to
avoid the same unphysical flow motions. So, the reality is also giving us
wrong results if we do not supply the correct BC.

Dr. Ioan TELEAGA RTR-DPC-UET AERO THERMIQUE STRICTEMENT CONFIDENTIEL 8


BACKGROUND (7)

Boundary Conditions u
 u   u   p  u  f
t  
Part 3     stress extra forces
convection

 u  0
 At this time many numerical experiments are done in order to obtain the
so-called “transparent” BC such that these not real flow features are not
anymore visible. → If will succeed, will be no need to have so huge aero
tunnels and digital tunnels. I wish them Good Luck!
 If one imposes a certain value of the pressure at the boundary then it
must impose there no no-slip condition on the velocity field. Today, I
believe that each code does that automatically and do not allow the users
to impose such combination.
 → In conclusion, we must use the physical correct BC in order to obtain a
physical correct numerical solution otherwise the numerical solver will
punish us.

Dr. Ioan TELEAGA RTR-DPC-UET AERO THERMIQUE STRICTEMENT CONFIDENTIEL 9


BACKGROUND (8)
u
Meshes/Grids  u   u   p  u  f
t  
    stress extra forces
Part 1 convection

 u  0
 Usually, having no analytical solution one try to obtain an
approximate one. First thing in this sense is to set up the
coordinates of the points where you want to obtain the solution,
which means instead of having a complete computational domain
(a car for example) we “look” only at some points of it. These
coordinates are very important and will have a big impact in the
numerical solution. The set of points together with other important
data (for example the boundary points have some labels (or PIDS,
FLAGS) to sort them, the neighbors of each point, number of
elements, volumes, lengths etc) is called mesh or grid.
→ Each CFD code has his own grid function which is stored in a
different way according to his needs/philosophy.

Dr. Ioan TELEAGA RTR-DPC-UET AERO THERMIQUE STRICTEMENT CONFIDENTIEL 10


BACKGROUND (9)

Meshes/Grids
Part 2
 Types of grids:
 structured
 unstructured

 Elements:
 triangles, rectangles, hexagons in 2D
 prisms/tetrahedra, parallelepipeds, etc in 3D

 Different grids have different impact on


the numerical solution, of course.
→ We will talk later about that!

Dr. Ioan TELEAGA RTR-DPC-UET AERO THERMIQUE STRICTEMENT CONFIDENTIEL 11


NUMERICAL SCHEMES (1)

 Properties of all numerical schemes:

 Consistency: means that the discretized version of the equation must fit the
analytical one if one goes with the grid size to zero and the truncation error (i.e. the
difference between the exact and numerical (discrete) equation) must be small and
bounded.
 Stability: assures that the errors made at each time step/iteration will not grow in
time.
 Convergence: numerical solution tends to the exact one as the grid size tends to
zero.

Dr. Ioan TELEAGA RTR-DPC-UET AERO THERMIQUE STRICTEMENT CONFIDENTIEL 12


NUMERICAL SCHEMES (2)

 Based on FEM method


 Try to approximate the solution
 Not often used for NS equations because forces the div-free condition only globally!
 Based on FV method
 Try to approximate the NS system and NOT the solution
 My opinion: the most used in CFD computations!
 Codes: FLUENT
 Based on FD method
 Try to approximate the NS system and NOT the solution
 The most ancient and simple method!
 Based on LBM method
 Based on Boltzmann equation approach
 Relatively new on the market
 Codes: PowerFlow
 Based on Spectral approximation (based on Fourier transform)
 etc

Dr. Ioan TELEAGA RTR-DPC-UET AERO THERMIQUE STRICTEMENT CONFIDENTIEL 13


NUMERICAL SCHEMES (3)
u
Methods for NS  u   u   p  u  f
t 
   stress extra forces
convection

 u  0

 Standard Methods (solve the NS system like it is)


Difference ?
 LBM Methods (ex. Industrial code PowerFlow)
 Projection Methods (ex. Industrial code Fluent)

1 p
 Artificial Compressibility Methods (β small)   u  0
 t
 Particle Methods: FVPM, FPM…
All of them are trying to obtain the div-free condition!

Dr. Ioan TELEAGA RTR-DPC-UET AERO THERMIQUE STRICTEMENT CONFIDENTIEL 14


NUMERICAL SCHEMES (4)

Dummy Unsteady Approach

T fin T fin

Integrating in time
u (T fin )  u (0)   u   u dt   (p  u  f ) dt
0 0
T fin
Final time = T fin    u dt  0
0

 The above integration is exact!


 There is not explicit integration of the remaining integrals!
 To completely get the exact u we need to integrate “exact” in space too!

First concept of global error is needed!!!

Dr. Ioan TELEAGA RTR-DPC-UET AERO THERMIQUE STRICTEMENT CONFIDENTIEL 15


NUMERICAL SCHEMES (5)

Sources of errors etime - temporal errors


To define in a rigorous general eround - round-off errors
way the concept of error it is
an impossible task!
eaccum - accumulation error

espace - spatial errors

Total error etot  eround  etime  espace  eaccum


 In software engineering (and not only) numerical error bears all
(d)effects which may disturb the final solution/result. In the
numerical error is included first of all the incapability of the
computer to store an rational/irrational number.

Dr. Ioan TELEAGA RTR-DPC-UET AERO THERMIQUE STRICTEMENT CONFIDENTIEL 16


ERRORS (1)

Round-off errors

We expect that 2+2 = 4


32 = 9
 3  2
3

→ but the computer will not give us  3 


2
 3 WHY?

 Because 3 do NOT has a finite digit representation. Indeed,


only a certain number of digits are stored, i.e., an approximation!

All numerical calculations are done in


CPU in binary system (through the
mathematical processor).

Dr. Ioan TELEAGA RTR-DPC-UET AERO THERMIQUE STRICTEMENT CONFIDENTIEL 17


ERRORS (2)

Between absolute and relative error (1)

 Let ũ be an approximation of u

→ | ũ - u | is called ABSOLUTE ERROR


→ | ũ - u | / |u| is called RELATIVE ERROR

 In real industrial problems the exact value of u is usually


unavailable, therefore the above concepts cannot be applied
like that!

What to do?

Dr. Ioan TELEAGA RTR-DPC-UET AERO THERMIQUE STRICTEMENT CONFIDENTIEL 18


ERRORS (3)

Between absolute and relative error (2)

 The relative error is an independent accuracy measure in a


problem.
Example:
TEST 1 | ũ - u | = 100
u = 3000
ū = 3100 | ũ - u | / |u| = 1/30

TEST 2 | ũ - u | = 1e-05
u = 0.0003
ū = 0.00031 | ũ - u | / |u| = 1/30

The relative error cannot tell us which TRUE error is


induced!!! But the most used in practice…

Dr. Ioan TELEAGA RTR-DPC-UET AERO THERMIQUE STRICTEMENT CONFIDENTIEL 19


ERRORS (4)

 Definition: The function u has a derivative at the point x0 if the


following limit exists:
u ( x)  u ( x0 )
lim 
not
u ' ( x0 )
x  x0 x  x0

What is happening in numerical case?

 Here begins the crowd world of numerical “definitions”, and let


mathematicians to write many papers in this field.
 Of course each numerical definition is strictly connected/adapted
to the problem to be solved.

Dr. Ioan TELEAGA RTR-DPC-UET AERO THERMIQUE STRICTEMENT CONFIDENTIEL 20


ERRORS (5)

 Consider the following 2D example:


y Δx mesh size
u u ( x0  x, y0 , t )  u ( x0 , y0 , t )
x0 , y0 , t   Δy
x x y0
could be an y0-Δy
approximation (forward)
of the exact derivative x0 x0+Δx
x
u( x0  x, y0 , t )  u( x0 , y0 , t ) Dummy grid
lim
x 0 x

 If one try to reduce the mesh size Δx, also the “error” induced
will be settled down, but will never be zero.
 The error between the exact and approximate derivative is
called truncation error.

Dr. Ioan TELEAGA RTR-DPC-UET AERO THERMIQUE STRICTEMENT CONFIDENTIEL 21


ERRORS (6)

 How this error can be evaluated?

→The answer is by using Taylor expansions, i.e.,

u x 2  2 u
u ( x0  x, y 0 , t )  u ( x0 , y 0 , t )  x  x0 , y 0 , t    x0 , y 0 , t   ...
t 2! x 2
u ( x0  x, y 0 , t )  u ( x0 , y 0 , t ) u x  2 u
 x0 , y 0 , t    x0 , y 0 , t  ERROR
x t 2! x 2
u
 x0 , y0 , t   Ox .
t

 There are infinitely many ways to approximate numerically a


derivative!

Dr. Ioan TELEAGA RTR-DPC-UET AERO THERMIQUE STRICTEMENT CONFIDENTIEL 22


ERRORS (7)

 Backward and central difference approximations


u u ( x0 , y0 , t )  u ( x0  x, y0 , t )
x0 , y0 , t    Ox  or
x x
u ( x0  x, y0 , t )  u ( x0  x, y0 , t )

2x
 
 O x 2

 What about the numerical approximation of the second order


derivative?
 2u   u 
x0 , y 0 , t    ( x 0 , y 0 , t )
x 2 x  x 
u
- Most spread approximation x0  x, y 0 , t   u x0 , y0 , t 
 x x
- Second order error in space x
u ( x0  x, y 0 , t ) u ( x0  x, y 0 , t )
- Used with success in the 
 x x
approximation of the diffusion x
operator in many simulation u ( x0  x, y 0 , t )  2u ( x0 , y 0 , t )  u ( x0  x, y 0 , t )

codes x 2

Dr. Ioan TELEAGA RTR-DPC-UET AERO THERMIQUE STRICTEMENT CONFIDENTIEL 23


ERRORS (8)

 When is necessary to numerically integrate a function?


f (x)
 Answer:
 when an analytical result is unavailable b
 when the function is too complicated
 only few values of the function is given
 f dx
a

0 a b x

 Looking geometrically at the right picture, first idea to approximate


an integral would be to approximate as good as we can the hashed
area! → “Split big area in a sum of small areas” !

b n

 f ( x)dx  a
i 0
i f ( xi ) index i counts the nodes number
between a and b.
a

Dr. Ioan TELEAGA RTR-DPC-UET AERO THERMIQUE STRICTEMENT CONFIDENTIEL 24


ERRORS (9)

 Examples of numerical integration schemes:


f (x)
b

 f ( x)dx  (b  a)  f (a)  O(b  a) b

 f dx
a
b

 f ( x)dx  (b  a)  f (b)  O(b  a)


a
a

0 a b x
ab
b


a
f ( x)dx  (b  a)  f (
2
)  O((b  a)3 )

ba
b


a
f ( x)dx 
2
 [ f (a)  f (b)]  O((b  a)3 )

ba ab
b


a
f ( x) 
3
 [ f (a)  f (
2
)  f (b)]  O((b  a)3 )

Try to picture graphically these schemes!

Dr. Ioan TELEAGA RTR-DPC-UET AERO THERMIQUE STRICTEMENT CONFIDENTIEL 25


ERRORS (10)

 Accumulation error: What is that?

 Answer: at each time step there is an error (total error at that time)
which is automatically “transported” in time to the next time steps
by the numerical method!
 Indeed, sometimes we see that the convergence brakes out after a
while. So, it is because the accumulation error is not anymore
bounded and indeed with each time step increases until the total
error reaches the maximal limit imposed.

Dr. Ioan TELEAGA RTR-DPC-UET AERO THERMIQUE STRICTEMENT CONFIDENTIEL 26


ERRORS (11)

 The advection equation (a transport equation with positive


constant speeds a and b) reads as:
u u u
a b 0
t x y

 unum u u
 a num  b num  0
t x y
Consider that unum = u + E,  (u  E )  (u  E )  (u  E )
 a b 0
where u is the exact solution t x y
and E is the error induced E E E
 a b 0
t x y

 The above equation shows that the error propagation in that case
follow the same transport equation as the original solution.
 In the nonlinear case (Navier-Stokes for example) there is no
explicit error propagation formula no matter which numerical
algorithm is taken into account.

Dr. Ioan TELEAGA RTR-DPC-UET AERO THERMIQUE STRICTEMENT CONFIDENTIEL 27


NUMERICAL SCHEMES (6)

 From theory to numerics…

u
 u   u   p  u  f
t  
    stress extra forces In this case we
convection
treat only this way,
 u  0 and not other
nonlinear
approaches based
Discretization procedure
on Newton
iterations!!!

Linear system (LS) → Ax  b


A = matrix (SPARSE) coefficients
x = unknown variables (u,v,w,p,etc)
b = known data (data at previous time, BC, IC, f)

Dr. Ioan TELEAGA RTR-DPC-UET AERO THERMIQUE STRICTEMENT CONFIDENTIEL 28


LS (1)

 Behind linear systems…


Direct Methods

Ax  b
Preconditioning 1
+
Multigrid xA b
Iterative Methods

 Generalities:
 if x has N entries then A has the dimension N2!
 # of arithmetic operations needed to obtain the solution x is proportional
usually with N3! → How to decrease the computational time?

Computational demand today: Solve the linear system within N iterations!!!

Dr. Ioan TELEAGA RTR-DPC-UET AERO THERMIQUE STRICTEMENT CONFIDENTIEL 29


LS (2)

 Direct Methods
 Gaussian Elimination 0
 Visually speaking:
 # of arithmetic operations: N3/3+N2-N/3 (mult/div) + N3/3+N2/2-5N/6 (add/subst)
 NOT used in practice because the computational time is proportional with N3!

 Standard inverse calculation


 Visually speaking: detA, A* → A-1
 # of arithmetic operations: 4N3/3-N/3 (mult/div) + 4N3/3-3N2/2+N/6 (add/subst)
 USED IN SCHOOL…
 NOT used in practice because the computational time is proportional with N3!

 LU Factorization
 Factorization on the form A=LU
 # arithmetic operation proportional with O(N2)

 Sparse Direct Solvers (new trends): M28, UMFPACK!

Dr. Ioan TELEAGA RTR-DPC-UET AERO THERMIQUE STRICTEMENT CONFIDENTIEL 30


LS (3)

 Iterative Methods (A = ( - L + D - R))


Generating of a
Ax  b sequence xk → x
x0 – initial approximation to x xk:=Txk-1+c
k=1, 2, …
 Jacobi Method
 Gauss-Seidel Method
 Ax = b → xk = (- L + D)-1Rxk-1 + (-L+D)-1b
 STOP criteria: || xk – xk-1 ||/ || xk || <TOL (user tolerance)
 SOR Method (implemented in FLUENT)
 Modification of Gauss-Seidel: (D-ωL)xk = (1- ω)Dxk-1 + ωRxk-1+ ωb
 ω =1 → Gauss-Seidel
 ω >1 → large convergence / ω <1 → « under relaxation » (acceleration of
systems which do not converge with Gauss-Seidel
 CG Methods: CG, BCG, BCGSTAB, BCGSTAB2, GMRES, etc
 Most used in CFD computations!

Dr. Ioan TELEAGA RTR-DPC-UET AERO THERMIQUE STRICTEMENT CONFIDENTIEL 31


LS (4)

 Preconditioning

 Definition: A matrix P is called preconditioner of A iff P-1A has a


smaller condition number then A.
→ It means that it is easier to solve P-1Ax=P-1b instead of Ax=b!!!
→ think that detA ~ 0, how do you get the solution vector x?

 Examples:
 Jacobi Preconditioner:
 P=D
 SOR Preconditioner:
 P = (D/ω+L) ω/ (2-ω)D-1(D/ ω+R), ω in (0,2), usually ω=1.7
 SSOR:
 P = (D/ω+L) ω/ (2-ω)D-1(D/ ω+LT)
 Valid for symmetric matrices
 Implemented also in FLUENT

Dr. Ioan TELEAGA RTR-DPC-UET AERO THERMIQUE STRICTEMENT CONFIDENTIEL 32


LS (5)
Restriction operator
 Multigrid Prolongation operator
 MG
 AMG Grid 1 h
Grid 2 2h
Grid 3 4h

V - cycle W - cycle

→ MG = Multigrid (geometrical) works on a grid sequence


→ AMG = Algebraic Multigrid → looks at the matrix values which are
extreme and do not count them in solving the linear system!!
→ Resolve linear systems (in theory on simple geometries) within
O(N) steps!!! The best for the moment, quiet complicated to be
programmed.

Dr. Ioan TELEAGA RTR-DPC-UET AERO THERMIQUE STRICTEMENT CONFIDENTIEL 33


NUMERICAL SCHEMES (7)

 Overview:
 Usually in CFD the matrix A is sparse (e.g. more zero entries than non-zero)!
 A is always quadratic. For a 1.000.000 grid points the dimension of A is (1.000.000)2!
 The non-zero entries are only the coefficients of the unknown values and the
connections to their neighbors! So, A is never stored as a full matrix. A is stored as a
three vectors:
 1st vector: position in x dir in A
 2nd vector: position in y dir in A
 3th vector: non-zero value of A
 Important to have symmetric matrices… easier to solve the LS
 The type of discretization operators, or in the grid elements together with the overall
numerical scheme chosen have direct impact to the coefficients of the A matrix →
more tuning needed to solve LS! That’s why
 Do not use angles too small
 Discretization lengths in all directions in the same range, and smooth transition of the layers!

Dr. Ioan TELEAGA RTR-DPC-UET AERO THERMIQUE STRICTEMENT CONFIDENTIEL 34


MODELLING (1)

 Energy equation: Boussinesq approach


T
 u  T  T  qs
t
→ transport in time and space through convection and diffusion
→ including heat sources qs
→ connection to NS system: only through the buoyancy force (density
assumed constant outside this force)
→ linear relation between density and temperature
 (T )  ref (1   (T  Tref ))
→ using ideal gas law (p=ρRT)!
→ valid approximation for temperature differences less than 30°C!
→ in many cases is calculated after the calculation of the velocity field, to
decrease the computational time!

Dr. Ioan TELEAGA RTR-DPC-UET AERO THERMIQUE STRICTEMENT CONFIDENTIEL 35


MODELLING (2)

 Turbulence modelling
 “Definition”: a turbulent flow is characterized by a non regular/chaotic movement!
 Models (just few…)
 No model: DNS – usually for small Re numbers…
 Zero-order models (algebraic): ex. Baldwin-Lomax Model
 1 equation models: Spalart-Allmaras model (implemented FLUENT)
 2 equations models: k-ε and variants (well accepted in industry)
 Reynolds Stress Models (RSM)
 LES, VLES
 DES – to treat near boundaries in a RANS view and in other parts as LES. etc

Turbulent solutions give you only mean values instead of point wise…
There are NO exact turbulence models, only approximations…
Always playing/changing the overall viscosity…
Need a lot of coefficients to be tuned (ex. “only” 5 for k- ε model)
LES/VLES/DES new on the market

Dr. Ioan TELEAGA RTR-DPC-UET AERO THERMIQUE STRICTEMENT CONFIDENTIEL 36


FINAL REMARKS (1)

 Grids
 Creation of elements with “good” shape
 Smooth transition areas between areas meshed with different length scales
 For CFD, if possible using TRI instead of QUAD elements
 At one node point there is collected more information, i.e., within TRI philosophy one node has
more neighbors than with QUAD.
 More time is needed in order to assembly the matrix A!!
 Structured or unstructured grids?
 Structured: the final computational matrix A is almost symmetric. The LS solvers are happy to
work with block-structured matrices, indeed less computational time is demanded.
 Structured: more robust software codes which do not need special tuning order to start the
simulation. See for example our PowerFlow!
 Unstructured: produces computational matrices A with big discrepancies in the size of values!
 Unstructured: simplicity in refining the domain in special zones!

Dr. Ioan TELEAGA RTR-DPC-UET AERO THERMIQUE STRICTEMENT CONFIDENTIEL 37


FINAL REMARKS (2)

 Numerical scheme
 For our purposes use ALWAYS a second-order scheme both in time and space
 A first-order scheme is producing in excess numerical diffusion which will spoil the solution
 A higher-order scheme will produce more accurate results, but the price paid is that needs
more computational time and finer tuning of the start-up!
 It is also a must when dealing with turbulence. Each turbulence model is producing a
turbulent viscosity ~ O(h2)!!! Indeed, if using a first-order scheme, it does not mater
which turbulence model is taken the effect on the final solution will be ~0! WHY?

Accuracy RAM demand CPU time


1st-order ~ mesh size / time
scheme step
2nd-order ~ with O(mesh size2,
scheme timestep2) exponentially exponentially
higher-order third-order or higher
schemes exponentially exponentially

Dr. Ioan TELEAGA RTR-DPC-UET AERO THERMIQUE STRICTEMENT CONFIDENTIEL 38


FINAL REMARKS (3)

 About overall viscosity

 tot   num  fluid  turb


 Each numerical scheme produces numerical viscosity (if not, then is unstable…)
 Higher-order schemes produce less viscosity than lower-order schemes (think at the
UPWIND schemes implemented in FLUENT)…
 The schemes based on LBM are producing less numerical viscosity than schemes
based on NS equations…
 Numerical viscosity can spoil the solution (i.e., flattened shock profiles)…
 Small fluid viscosity implies special care with the boundary layers → turbulence
modelling
 Turbulent viscosity is always proportional with O(h2)…
 Sometimes the numerical scheme is producing enough numerical viscosity such that
there is no need to employ a turbulence model… new trend on the market. The
traditionalist turbulence modelling people are very against! Why?

Dr. Ioan TELEAGA RTR-DPC-UET AERO THERMIQUE STRICTEMENT CONFIDENTIEL 39


FINAL REMARKS (4)

 Tuning in case when a transient computation do not start…

 Maybe the grid is not good enough (usually) → check the quality parameters…
 Maybe the time step is too big → try to decrease it (if possible, but not too much) …
 Use a lower-order scheme at the beginning (run for few time steps) and then switch
to higher-order → you will pay in the accumulation error…
 Tune the LS: change the method, preconditioners, MG/AMG steps, etc,
 Make sure that the initial solution x0 is not initialized with 0 → think that at the
beginning Ax0=b0 … → problems in starting the computation of LS → initialize with
1.0-08 for example!
 If BC are too steeply (ex. uInflow=160km/h) try an increasing
boundary profile linearly in time for the beginning… uinflow
 Do not enforce full div-free condition more than the
accuracy of the scheme
 …
0 Tfin time

Dr. Ioan TELEAGA RTR-DPC-UET AERO THERMIQUE STRICTEMENT CONFIDENTIEL 40


TO CONTROL NUMERICALLY A FLUID FLOW IS A HARD TASK
WHICH NEEDS KNOWLEDGES FROM

→ PHYSICS
→ MATHEMATICS
→ MEASUREMENTS
→ PROGRAMMING
→ … BIG BIG WORKING EXPERIENCE!

TO BE CONTINUED…

Dr. Ioan TELEAGA RTR-DPC-UET AERO THERMIQUE STRICTEMENT CONFIDENTIEL 41

You might also like