Upload
cepong89
View
234
Download
1
Embed Size (px)
Citation preview
8/17/2019 Miet 2394 Cfd Lecture 8(2)
1/35
Computational Fluid Dynamics –Lecture 8
Prof. Jiyuan Tu
8/17/2019 Miet 2394 Cfd Lecture 8(2)
2/35
RMIT University 2
Solution Errors--Causes Solution error depends on:
Discretion error -- usually the dominant contribution Equation solver error Choice of computational domain Implementation of boundary and initial conditions
Discretization error depends on: Grid size (overall refinement Grid quality (aspect ratio! ortho"onality Grid density (local refinement
Discretisation formula (lo#$hi"h order
Equation solver is: (usually a minor source of solution error can be source of instability (or poor iterative convergence )
8/17/2019 Miet 2394 Cfd Lecture 8(2)
3/35
RMIT University 3
Sources of errors in CFD
( I) Discretization error (DE
Computer round-off error (%&E
Errors due to physical modelin" (E'
()urbulence modelin" *uman errors + ine,perience
Wrong Boundary Condition
Bad numerical scheme
Wrong computational domain
Bad computational model
Garbage in!
Garbage out!
Mesh
8/17/2019 Miet 2394 Cfd Lecture 8(2)
4/35
RMIT University 4
Sources of errors in CFD
( II) DE-)runcation error
∂
∂∆+
∆
−=
∂
∂ +-
-
.
x
xo
x x
ii
i
φ φ φ φ
∂
∂∆+
∆
−=
∂
∂ +
.
x
T xo
t t
n
i
n
i
i
φ φ φ
)runcation error /irst order
0ocal error Space
)imeGlobal error
The local and global discretization errors
of finite difference method at the third
time step at a specified nodal point
8/17/2019 Miet 2394 Cfd Lecture 8(2)
5/35
RMIT University 5
Sources of errors in CFD
( II) %&E++Di"its1 di"its++Sin"le precision
.2 di"its++Double precision
SP
:
4444.6667 4444.666666
4444.6666
A!" A!"
≠Example:A simple arithmetic
operation performed
with a computerin a single precision
using seven significant
digits
8/17/2019 Miet 2394 Cfd Lecture 8(2)
6/35
RMIT University 6
Sources of errors in CFD
( III)
3o4 of Computations
5ccumulated %&E ↑
↑
As the mesh or time step size decreases,
the discretization error decreases !
but the round-off error increase!
a6or error source in C/D
E'++0aminar /lo#
++)urbulence /lo#
odelin"
8/17/2019 Miet 2394 Cfd Lecture 8(2)
7/35
Solution Integrity
7hy is predictive reliability important 8
Is the computer (#uman$ #ard%are& infallible8 7hat should #e e,pect:
solutions are accurate
' can be validated against reliable eperiments
8/17/2019 Miet 2394 Cfd Lecture 8(2)
8/35
RMIT University 8
Testing Solution
Integrity Set up physical e,periment and measure 9ey data )pensive$ time*consuming
Compare #ith personal e,perience
+e ,no% %#at to epect (most of t#e time&
Compare #ith standard cases; )quivalent to -alidation/
%ely on theoretical foundation )quivalent to -erification/
8/17/2019 Miet 2394 Cfd Lecture 8(2)
9/35
RMIT University 9
8/17/2019 Miet 2394 Cfd Lecture 8(2)
10/35
RMIT University 10
8/17/2019 Miet 2394 Cfd Lecture 8(2)
11/35
RMIT University 11
Computational Solution
C/D is implemented by t#o-sta"e process:
iscretisation ‑ !onversion of t#e governing partial
differential equations into a system of algebraic equations
)quation Solver ‑ iterative solution of t#e algebraic
equations to provide t#e approimate solutions
Overview of the omputational olution "rocess
8/17/2019 Miet 2394 Cfd Lecture 8(2)
12/35
RMIT University 12
(Grid Conver"ence
C/D produces an appro,imate solution solution error 5 eact solution ** approimate solution
(Grid Conver"ence epect solution error 5 $ as $ t 5 refine grid until t#e solution no longer c#anges
Consistency@Stability AB (Grid Conver"ence
#terative convergence
8/17/2019 Miet 2394 Cfd Lecture 8(2)
13/35
RMIT University 13
Comments -- Conver"ence
C&3SIS)E3C @ S)5I0I) AB C&3
8/17/2019 Miet 2394 Cfd Lecture 8(2)
14/35
RMIT University 14
Consistency Definition: As $ y$ 2$ t 55 $ t#e system of algebraic
equations s#ould recover t#e governing partial differential
equation at eac# grid point
Comments: 0est by epanding all nodal values of t#edependent variables about t#e control volume centre
E,ample: ;ass conservation equation
8/17/2019 Miet 2394 Cfd Lecture 8(2)
15/35
RMIT University 15
Taylor Series Expansion about
point )qn (ran,el sc#eme
8/17/2019 Miet 2394 Cfd Lecture 8(2)
16/35
RMIT University 16
/inite Grid Solutions (. Comments: Grid refinement may be restricted by memory si2e or !P? time
@btain t#e most accurate solution %it# fied 9$ 9B$ 9C
Some grids can increase accuracy but increase t#e number of iterations to
convergence of t#e algebraic equation solution )pect solution error to follo% truncation error
0ypical truncation error:
( = 36 &D ∂ E( ρu&3 ∂ E F ( y= 36 &D ∂ E( ρv&3 ∂ yE F
0#erefore refine grid %#ere solution gradients large: boundary layers$ up%ind stagnatn points$ for%ard*facing corners
8/17/2019 Miet 2394 Cfd Lecture 8(2)
17/35
RMIT University 17
/inite Grid Solutions (
Is the "rid fine enou"h8 refine grid until important parameter no longer variant eg force against a %all
Parameter
Value
Number of elements
8/17/2019 Miet 2394 Cfd Lecture 8(2)
18/35
RMIT University 18
E!uation Structure ost industrial fluid flo#s involve si"nificant motion
omentum equations describe three ma6or interactions
(convective& transport****************** motion of fluid
diffusion********************* (turbulent& eddy diffusivity source terms********production of turbulent ,inetic energy
Is solution accuracy sensitive to discretisation of specific
terms 8 (YES
$%&!
xxx
u
t ' ' '
'
∂
φ
Γ
∂
∂
∂
φ
∂
ρφ
8/17/2019 Miet 2394 Cfd Lecture 8(2)
19/35
RMIT University 19
"ig#er $rder Interpolation%I&
!omments:
So far #ave interpolated i.e. depends on local values
9o% interpolateassuming -u/ is positive
( ) E pe
!"" # " =
( ) ( ) E W WW W E pW e !"" !" # "and !"" !" # " ==
8/17/2019 Miet 2394 Cfd Lecture 8(2)
20/35
RMIT University 20
"ig#er $rder Interpolation%II&
(eneral three point interpolation:
and equivalent formula for and
q iscretisation Sc#eme @rder (0.).&
< !entered difference = E*pt up%ind =
E34 ?1!H (4 pt& =
=3E 4*pt up%ind E
[ ] ( )( )[ ] ( ) ($% &x &x ' &x"&& &x")($
&x &x ' &x" &x") "
pW pW pW p
E p p E E pe
+−+−+
++=
W " '&' "(" x"' W e −=∂∂
8/17/2019 Miet 2394 Cfd Lecture 8(2)
21/35
RMIT University 21
'ounded "ig#er $rderSc#eme 3umerical dispersion may appear as #i""les ounded second order scheme: 1n (
8/17/2019 Miet 2394 Cfd Lecture 8(2)
22/35
RMIT University 22
Comments 5bove bounded schemes available in /0FE3) ounded schemes more accurate but less robust than po#er
la# scheme /or fast iterative conver"ence #ith hi"her accuracy! start from
conver"ed po#er la# solution oundin" is effectively introducin" very localised numerical
dissipation
8/17/2019 Miet 2394 Cfd Lecture 8(2)
23/35
RMIT University 23
(nstructured )ridDiscreti*ation
'o#er-la# (segregated eqns. only >ace value obtained from solution toace values obtained t#roug# multi*dimensional reconstruction
FIC scheme( for quad.3#e. cells and segIated eqns. Jig#er*order construction of face values from S@? and
interpolation in mes# direction ;ore accurate for structured mes#es t#at are mainly
flo% aligned
7c
8/17/2019 Miet 2394 Cfd Lecture 8(2)
24/35
RMIT University 24
Second $rder (p+ind %S$(&
0inear reconstruction provides =nd order accuracy on unstructured grids up%ind values obtained from linear$ piece%ise discontinuous
s#ape functions limiting is used to -suppress %iggles/
8/17/2019 Miet 2394 Cfd Lecture 8(2)
25/35
RMIT University 25
Linear ,econstruction 0inear reconstruction provides:
better accuracy t#an stencil*based sc#emes compatibility %it# arbitrary cell s#apes (tetra#edrals$
triangles&
improved accuracy on s,e%ed grids
Comments: uses more
information t#an
stencil*based
sc#eme eample:
diffusion terms
8/17/2019 Miet 2394 Cfd Lecture 8(2)
26/35
RMIT University 26
Structured s (nstructured
5ccuracy: bot# can ac#ieve =nd rder accuracy for t#e convective terms structured grids rely on truncation error reduction unstructured grids rely on linear reconstruction
Economy: structured grids lead to fe%er operations in t#e discretised equations unstructured grids can cover a domain %it# fe%er cells
%obustness:
reliable algorit#ms available for bot# types solution adaption on unstructured grids is less li,ely to affect
robustness limiters can be introduced for bot# to avoid -%iggles/
8/17/2019 Miet 2394 Cfd Lecture 8(2)
27/35
RMIT University 27
'roblem definition turbulent or laminar flo%K steady or transient L is t#e p#ysical model$ eg granular multip#ase$ inaccurate L
Geometry and "rid is t#e imported !A file correct L
oundary Conditions is t#e upstream boundary too close to t#e body L
Solution method is a #ig#er*order sc#eme required L
Systematic rocedure forSolution Integrity -- $erie+
8/17/2019 Miet 2394 Cfd Lecture 8(2)
28/35
RMIT University 28
Define clearly #hat the problem is +#at do you %ant to find outL
+#at are t#e important parameters you need to inputL
+#at %ill be t#e defining c#aracteristics of t#e flo%(eg turbulent #eat transfer L&
0oo9 for computational efficiencies !an you ma,e any simplificationsL
Jo% muc# of t#e real domain do you need to modelL
!an you run any simple cases first to test your modelL
)uidelines – roblem
De.nition
8/17/2019 Miet 2394 Cfd Lecture 8(2)
29/35
RMIT University 29
5ny possibility of import8 A!1S 3 1G)S
5ny simplifications8 SymmetryL
Periodic "oundariesL
Fse >top do#n? approach to "eometry creation
Consider dividin" the domain up into smaller sections formore control over the "rid
a9e use of 6ournal files K
Parametric modelling )asy transport of geometry specification files
)uidelines – )eometry
8/17/2019 Miet 2394 Cfd Lecture 8(2)
30/35
RMIT University 30
)rid /uality Grid aspect ratio:
A) * + x Comments:
9eed to c#oose y small if rapidsolution c#ange in t#e y direction
#f A) ./0 or A) 1 2! possible reduction in accurac+ ma+be poor iterative convergence &or divergence$
Grid distortion: @rt#ogonality ( 5 M deg& desirable Comments:
!#oose grid so t#at 4N deg O O
8/17/2019 Miet 2394 Cfd Lecture 8(2)
31/35
RMIT University 31
Sudden C#anges in )rid Si*e
Comments: !ould occur at bloc, boundaries in multibloc, procedure
!ould occur at duct inlet to a plenum c#amber
E,ample: Mass conser1ation e2uation
Comments: 0.). contains diffusion terms (=nd derivs&**destabilising %#en r < ;a,e sure grid c#anges slo%ly and smoot#ly
iscretisation of =nd derivatives requires very smoot# grid c#anges
8/17/2019 Miet 2394 Cfd Lecture 8(2)
32/35
RMIT University 32
Does your selection of boundary conditions match the real
#orld conditions 8 eg ,$ epsilon c#ange rapidly ust do%nstream
of inlet value specification
Is it possible to limit the domain size by specifyin" the
boundary condition in more detail 8 eg reduce upstream pipe lengt#$ if specify inlet profile
Fse the >patch? command to fill areas after initialization4
)his is particularly useful for free surface problems4 5re the boundaries in the correct locations8
eg are far*field boundaries far enoug# a%ayL
)uidelines – 'oundary
Conditions
8/17/2019 Miet 2394 Cfd Lecture 8(2)
33/35
RMIT University 33
If the residuals are diver"in": isplay t#e contours after initiali2ation. Are t#e initial conditions
correctL
!#ec, t#e models. ;aybe start as laminar and s%itc# to turbulent
later in t#e solution$ for eample. If the residuals initially reduce = then are oscillatory:
1f flo% is assumed steady$ rerun as a transient problem
!ould a different type of boundary condition be more stableL (i.e.
outflo% instead of pressure boundaryL&
!#ec, for %#ic# equation residual is largest
GuidelinesLSolution Conver"ence
8/17/2019 Miet 2394 Cfd Lecture 8(2)
34/35
RMIT University 34
*i"her order differencin" schemes are required foraccuracy Qun t#e solution first %it# default sc#emes$ t#en s%itc# to #ig#er
order once converged
Is the problem #ell-posed 8
o t#e boundary conditions suit t#e problem L
1ncorrect specification of nearby boundary conditions
5dequate "rid resolution 8 istorted volumes solution adaption or revise t#e grid
Jig# gradients ' coarse grid solution adaption
Guidelines L Solution 5ccuracy
8/17/2019 Miet 2394 Cfd Lecture 8(2)
35/35
RMIT University 35
Conclusions
5ssess C/D solution inte"rity p#ysical eperiments personal eperience t#eoretical foundation
E,pect computational solution to conver"e to the e,actsolution as ∆,! ∆y! ∆z! ∆t AAB M
(see, Rgrid * independentR solution&
/inite "rid solutions Avoid *** sudden c#anges in grid si2e
*** large c.v. aspect ratios*** grid distortion
*** large c.v. area variation over domain