Professional Documents
Culture Documents
CFD Analysis Lecture May 2014
CFD Analysis Lecture May 2014
CFD Analysis Lecture May 2014
\
|
|
|
.
|
\
|
=
equal
equal
equal
equal
or Skewness
u
u u
u
u u
min max
180
max
Where
min
is the minimum angle in the above cells,
max
is the maximum angle in the cells.
equal
is the angle between any two edges of an ideal equilateral cell with the same number of
edges. For triangular cell
equal
=60, and for quadrilateral
equal
=90.
Generally 0< Skewness<1, where 0 is the best and 1 is the worst, rule of thumb keep Skewness
below 0.7.
Cause of Error in Modelling Due to Mesh Quality
2. Grid (mesh) quality
2. Element shape (Skewness)
Generally 0< Skewness<1, where 0 is the best and 1 is the worst,
rule of thumb keep Skewness below 0.7.
High Skewness (above 0.7 causes error in the solution)
3. Mesh sensitivity study (mesh independent solution)
It is known that using finer mesh will give more accurate results,
coarse mesh will not give accurate results.
Lets see how increasing the number of nodes
gives more accurate results
0.02
0.02
0.01
0.01 0.01 0.01
With 0.02 distance between nodes
we get 3 nodes
Reducing the distance between nodes
resulted in increasing the number of
nodes to 5
Now lets implement this on a previous example and see what effect
decreasing the distance between nodes (i.e. increasing the number of
nodes) has on solution accuracy
Lets look at previous example
9511 . 0 ) 2 . 0 ( 2 sin ) 2 . 0 ( ) 22 . 0 (
) ( ) (
= = ~
=
A +
t f f
f f
x x x
( ) | | 9899 . 0 ) 02 . 0 ( 2 . 0 2 cos 2 ) 2 . 0 ( ) 22 . 0 (
) ( ) (
= + ~
A
|
.
|
\
|
c
c
+ ~
A +
t t f f
x
x
fx
f f
x x x
........
6 2
3
3
3 2
2
2
) ( ) (
+
A
|
|
.
|
\
|
c
c
+
A
|
|
.
|
\
|
c
c
+ A
|
.
|
\
|
c
c
+ =
A +
x
x
fx x
x
fx
x
x
fx
f f
x x x
1
3
4
2
5
f(x)
x
x
x+x x=0.02
( ) | | ( ) | |
9824 . 0 0075 . 0 0388 . 0 9511 . 0
2
02 . 0
2 . 0 2 sin 4 ) 02 . 0 ( 2 . 0 2 cos 2 ) 2 . 0 ( ) 22 . 0 (
2
2
2
2
2
2
) ( ) (
= + ~
+ ~
A
|
|
.
|
\
|
c
c
+ A
|
.
|
\
|
c
c
+ =
A +
t t t t f f
x
x
fx
x
x
fx
f f
x x x
If f(x)=sin 2x, x=0.2 and x=0.02
At x=0.2, f(x)=sin20.2=0.9511
x+x=0.2+0.02=0.22, f(x)=sin20.22=0.9823
1. If we take the first term only
This correspond to point 3,
error [(0.9823-0.9511)/0.9823]X100= 3.17%
2. If we take the first two terms
Exact solution
3. If we take the first three terms
This correspond to point 4, error 0.775% (better)
This correspond to point 5, error 0.01% much better
1
3
4
2
5
x
x+x x=0.02
f(x)
1
3
4
2
5
x
x+x x=0.02
Now lets take the same example and use closer
node (more nodes) x=0.01 instead of 0.02
9511 . 0 ) 2 . 0 ( 2 sin ) 2 . 0 ( ) 22 . 0 (
) ( ) (
= = ~
=
A +
t f f
f f
x x x
( ) | | 9705 . 0 ) 01 . 0 ( 2 . 0 2 cos 2 ) 2 . 0 ( ) 22 . 0 (
) ( ) (
= + ~
A
|
.
|
\
|
c
c
+ ~
A +
t t f f
x
x
fx
f f
x x x
........
6 2
3
3
3 2
2
2
) ( ) (
+
A
|
|
.
|
\
|
c
c
+
A
|
|
.
|
\
|
c
c
+ A
|
.
|
\
|
c
c
+ =
A +
x
x
fx x
x
fx
x
x
fx
f f
x x x
1
3
4
2
5
f(x)
x
x
x+x x=0.01
( ) | | ( ) | |
96853 . 0 00187 . 0 0194 . 0 9511 . 0
2
01 . 0
2 . 0 2 sin 4 ) 01 . 0 ( 2 . 0 2 cos 2 ) 2 . 0 ( ) 22 . 0 (
2
2
2
2
2
2
) ( ) (
= + ~
+ ~
A
|
|
.
|
\
|
c
c
+ A
|
.
|
\
|
c
c
+ =
A +
t t t t f f
x
x
fx
x
x
fx
f f
x x x
If f(x)=sin 2x, x=0.2 and x=0.01
At x=0.2, f(x)=sin20.2=0.9511
x+x=0.2+0.01=0.21, f(x)=sin20.21=0.9685
1. If we take the first term only
This correspond to point 3,
error [(0.9685-0.9511)/0.9823]X100= 1.8%
2. If we take the first two terms
Exact solution
3. If we take the first three terms
This correspond to point 4, error 0.2%
This correspond to point 5, error 0.003%
Error % if Error % if
If we take case 1
in previous slide
3.176 1.8%
If we take case 2
in previous slide
0.775 0.2%
If we take case 3
in previous slide
0.01
0.003%
f(x)
1
3
4
2
5
x
x+x
x=0.02
x=0.01
x=0.02
x=0.01
Reducing the distance
between nodes (from 0.02
to 0.01) will obviously
result in increasing the
number of nodes in any
model.
0.02
0.02
0.01
0.01 0.01 0.01
From previous example we can conclude that increasing the
number of nodes will provide better accuracy in the solution
(less error)
So how fine the mesh we suppose to use? taking into
consideration that the finer the mesh, the longer the simulation
will take. Longer simulation results in increasing the cost.
This is what you have learned in the lab when you used coarse
mesh the simulation runs very fast
CFD solutions to fluid dynamics and heat transfer problems always
contain errors due to the evaluation of continuous problems using
discrete analysis. In general, these errors can be minimised by
discretising the flow domain into a large number of mesh points
(cells).
In practice, there is a trade off between the accuracy of the solution
and the computing time; hence an optimum number of grid points
have to be used for the simulation domain.
Mesh sensitivity (refinement) investigation has been carried out to
optimise the number of cells used. It is apparent that the more cells
used in the model the more time consumed to complete the
simulation.
So how we can carry out mesh sensitivity study?
1. First start with coarse mesh and run the simulation and record the results
2. Then increase the number of mesh (nodes or cells) and run the simulation and
record the results again.
3. If the recorded results are different than the one in item 1 above, then increase the
number of mesh further and record the result again.
4. Continue doing this (increasing the number of mesh) until you realise that
increasing the number of mesh will not cause any change in the recorded results
5. When you reach this stage means you have reach Mesh I ndependent Solution
which means any increase in the number of mesh will not cause any change in the
results and hence there is NO point in increasing the mesh further.
Example on mesh sensitivity (refinement) investigation
Three types of mesh used in this study. It
can be seen that mesh 1 is the coarse
mesh. In mesh 2 the number of nodes
increased. Mesh 3 has the highest number
of nodes
It can be seen from the figure that the HRR in mesh
1 is different than mesh 2. But when the mesh
increased to 3, the recorded HRR was almost the
same as in mesh 2.
Hence we can use mesh 2 in the simulation because
although mesh 3 has higher number of nodes
however it will make the simulation runs longer
and the results will be the same as in mesh 2.
There is NO point in using mesh 3, hence mesh 2
can do the simulation with same accuracy as 3 but
with shorter time than 3.
This means that in mesh 2 we reached the mesh
independent status in the solution where
increasing the number of mesh further will not
change the results.
Mesh (grid or nodes):Things to remember
Remember to check aspect ration (must be below 5)
Check Skewness (must be below 0.7)
After completing the mesh use the software to check mesh for you, it
is available in ANSYS and other CFD software.
Perform mesh sensitivity (refinement) investigation.
Roughly: If you have 1 million elements (mesh), you need 1GB RAM
allocated in your computer to run the simulation
Meshing Quality
Practical considerations in the meshing can lead to
better accuracy of results and efficient computation.
Aspect ratio
Element shape
Mesh refinement
4. Analysing CFD results against engineering principles
As we have mentioned in previous slides that anyone with some knowledge in
using CFD software can get results.
But the question is Are the results correct?
In CFD, obtaining results do not mean that the results are correct and can be
used.
The first thing needs to be done is to validate the CFD model against experiment
and the CFD results should be in agreement with measurement. If this is done,
this means that the model is correct and can be used for future development
without the need to do another experimental work.
For example you can model a heat exchanger, but first you need to model a heat
exchanger with similar configurations and conditions to a heat exchanger that
has been tested in the lab. You can key-in the boundary conditions that is
measured in the lab, then run the simulation and if you get the outlet
temperatures in agreement with the lab measurement then you can say that your
CFD model has been validated against experiment.
You can also validate your CFD model against another CFD model which has been validated
against experiment.
However, validation is not the final decider whether your CFD model is correct or not. You
need to analyse your CFD results by using basic engineering principles.
For example, we expect that there will be flow recirculation in a duct with a step as follows:
If you did not get this in your model, it means your modelling is wrong!!
Another example, if you model heat exchanger and your modelling results shows that the hot
stream temperature is increasing NOT decreasing then you need to know that your modelling
is wrong.
The above are very simple examples, you can look at the simulation results and analyse it
carefully by using engineering principles before saying that your simulation is correct
5. Selecting & defining the correct conditions
You must make sure that you are defining/selecting the correct boundary
conditions:
1. Check if the flow is laminar or turbulent & choose the right
turbulence modelling.
2. Check if you have defined the boundary conditions correctly
Is the selected fluid air or water.
Symmetry boundary is correctly selected.
Wall boundary correctly selected.
Inlet and outlet boundary are correctly selected and defined.
Does the software solve the right equations for your model
And many more things to consider
Whatever we have mentioned in previous slides is called
Validation & Verification of the CFD model.
Validation & Verification must be done in every modelling
work to make sure that the results are correct.
Validation:
Validation against experiment.
Are the boundary condition appropriate
and correct.
Did you choose the right solver?
Did you validate your results against
correct experimental and/or other
modelling work?
Did you analyse your modelling results
against engineering principles and does
it make sense.
Verification:
Did you perform mesh sensitivity study and
achieved mesh independent solution?
Did you check Grid quality (such as aspect
ration, Skewness, unstructured mesh correctly
developed and usedetc)?
Did you achieve the correct iteration
convergence (selected acceptable error in your
iteration?
Did you choose correct time step?
Did you select correctly whether your solution
is Implicit or Explicit?
Validation & Verification