Professional Documents
Culture Documents
Prof. Jiyuan Tu
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
RMIT University 2
.2 di"its++Double precision
A!"
≠
Example
A!"
:
A simple arithmetic
operation performed
with a computer
in a single precision
using seven significant
digits
RMIT University 5
Solution Integrity
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/
RMIT University 8
timesteps&
RMIT University 9
dataad
RMIT University 10
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
RMIT University 11
(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
RMIT University 12
Comments -- Conver"ence
C&3SIS)E3C @ S)5I0I) AB C&3<E%GE3CE
(-8a )quivalence 0#eorem/&
C/D solution obtained on a finite "rid
9o computer po%erful enoug# to allo% $ t 5
RMIT University 13
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#e
dependent variables about t#e control volume centre
E,ample: ;ass conservation equation
RMIT University 14
!omments:
As $ y 55 t#e original governing equation is
recovered
Sc#eme (<& is ( = $ y= &$ i.e. #alving t#e grid si2e$
reduces t#e truncation error by four
)pect solution error to reduce li,e truncation error
!ounter**eample: u>ort**>ran,el
RMIT University sc#eme 15
RMIT University 16
Parameter
Value
Number of elements
RMIT University 17
E!uation Structure
ost industrial fluid flo#s involve si"nificant motion
omentum equations describe three ma6or interactions
ρφ u ' φ ∂ φ
Γ ! &%$
∂t ∂ x' ∂x ' ∂x '
!omments:
So far #ave interpolated "e = # ( " p !" E ) i.e. depends on local values
9o% interpolate
assuming -u/ is positive
RMIT University 19
1n (<4& evaluate
($*
ounded FIC scheme:
H H H
choose ) = ( − 0" p '($ − " p #or *'/ < " p < $-,
H H H
= −0" p '($ − " p #or − ,-* < " p < , ($/
= ,-.* other+ise
RMIT University 21
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
<ery lar"e literature on bounded schemes (particularly if shoc9
#aves e,pected
/lu, corrected transport
(nstructured )rid
Discreti*ation
'o#er-la# (segregated eqns. only
>ace value obtained from solution to< !onv*iff equation
Second-order up#ind ( S@?
>ace 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
flo% aligned
n s c<
c7 c f
RMIT University 23
RMIT University 24
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
RMIT University 25
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/
RMIT University 26
RMIT University 27
)uidelines – roblem
De.nition
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
RMIT University 28
)uidelines – )eometry
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 for
more control over the "rid
a9e use of 6ournal files K
Parametric modelling
)asy transport of geometry specification files
RMIT University 29
)rid /uality
Grid aspect ratio:
A) * + x
Comments:
9eed to c#oose y small if rapid
solution 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$
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
RMIT University 31
)uidelines – 'oundary
Conditions
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
RMIT University 32
GuidelinesLSolution Conver"ence
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
RMIT University 33
RMIT University 34
Conclusions
5ssess C/D solution inte"rity
p#ysical eperiments
personal eperience
t#eoretical foundation
RMIT University 35