Presentation

advertisement
Computational fluid dynamics
Indo-German Winter Academy-2008
Ankush Sharma
B.Tech 3rd Year, Civil Engineering
IIT Roorkee.
Course # 2
(Numerical methods and simulation of engineering
Problems)
Mentor: Dr. Suman Chakraborty, IIT Kharagpur
Dr. Vivek V. Buwa, IIT Delhi
1
Overview
y What is CFD?
y Conservation equations
y Determination of Flow Field
y Vorticity Approach
y Preliminary Variable approach
y
y
SIMPLE Algorithm
SIMPLER Algorithm
y Conclusion
2
What is CFD?
y Analysis of system involving fluid flow, heat transfer and
associated phenomena such as chemical reactions by
means of computational-based simulation.
y APPLICATIONS:
y Aerodynamics of aircraft and vehicles
y Hydrodynamics of ships
y Hydrology and oceanography
y Power plant:combustion in IC engines and gas turbines.
y Meteorology
3
Advantages
y Substantial reduction to lead times and costs of new
designs.
y Ability to study systems where controlled experiments
are difficult or impossible to perform.
y Ability to study systems under hazardous conditions.
y Practically unlimited level of details of results.
y Can produce extremely large volumes of results at
virtually no added expenses.
4
Complexities
y Lack of proper knowledge of boundary conditions.
y Lack of knowledge of physical properties .example
includes change of density with temperature.
y Tremendous complexity of the underlying behaviour
which includes a description of fluid flow.
5
Conservation Equations
y Conservation of mass
y Conservation of momentum
y Conservation of energy
6
General principle of
conservation
source
In
out
Rate of ((in- out)+generation of flux)=time rate of change inside
control volume.
Φ(x,y,z,t) : Dependent variable, stand for different quantities like
mass fraction of chemical species, enthalpy or like temperature,
velocity component
7
Conservation of mass
y Rate of increase of mass in a fluid element= net rate of
flow of mass into fluid element.
8
Conservation laws
Equation
Ф
Ґ
S
Continuity equation
1
0
0
Momentum
conservation
u
μ
-
Energy
conservation
i
k/Cv
-p div u
9
Inference from Conservation
laws
y Conservation equations are governed by partial
differential equation.
y These equations can be represented as a general equation
for the variable φ.
y Analytical Solutions exist for few cases and many a times
complex.
y Thus numerical methods have to be applied to obtain the
solutions employing φ as primary unknown.
10
Special features of Navier
Stokes equation
y Coupled , non-linear, partial differential equation.
y Primary unknowns –pressure and velocity.
y No explicit equation discussing pressure.
11
A perspective of Finite volume method
for solving Naviers Stoke equation
y Fundamentally convection-diffusion equation.
y It differs from convection-diffusion equation in the
manner that velocity field is unknown.
y Pressure gradient which is also an unknown ,appears as
the source term.
y Some more general considerations are required after
preliminary method of solving equation.
12
Determination of flow field
y Flow field needs to be calculated from appropriate
governing equations.
y Velocity component is governed by momentum
equations.
y Difficulties :
y Convective term of momentum equation containing
non linear quantities.
y There is no(transport or other) equation for pressure.
y When correct pressure field is substituted in the
momentum equation the resultant velocity field satisfies
continuity equation.
13
Vorticity Based Methods
y This involves eliminating the pressure gradient term from the
momentum equation by cross differentiating the two
components of the momentum equation (in a 2-D flow) and
subtracting them.
y Considering momentum equations for 2-D Incompressible flow
y
1
y
2
14
Continued…..
y
&
,
The stream function ψ(x,y) equation
This gives rise to the following equation involving Vorticity
vector ‘ζ’.
15
y MERITS:
y Pressure term is eliminated.
y Equations need to be solved to get values of ψ and ζ.
y DEMERITS:
y Difficulty to specify boundary conditions for vorticity thus
causing trouble to get a converged solution
y Pressure is required for calculation of density and other fluid
properties.
y Extraction of pressure from vorticity offsets computational
saving.
y Cannot be extended to 3-D situations for which a stream
function does not exist.
16
Primitive Variables Method
y To overcome the shortcomings of the vorticity method
primitive variable method is used.
y Here the dependent variables are the velocity components
and pressure.
y Need to solve the velocity equations and the continuity
equation simultaneously.
y Main task is to convert the indirect information in the
continuity equation into direct algorithm for the
calculation of pressure.
17
interpolation of the Pressure
Gradient Term
W
w
P
e
E
•Integration of pressure gradient over control volume
Pw- Pe
•Assuming linear profile:
Pw -Pe = (PW + PP )/2 – (PP + PE )/2 =(PW – PE )/2
•Hence momentum equation contains the pressure difference
between alternate grid points.
18
y Case 1:
100
y Case 2;
100
100
100
100
100
10
100 10
100
y The formula predicts any zig-zag pressure field as
uniform pressure field if difference between pressures
at nodes is same.
19
interpolation of the Continuity
Equation
y1-D case with constant density, the continuity equation
can be written as: du/dx=0
y Integrating over CV gives ue-uw=0
y Assuming piecewise linear profile for velocity
ue-uw=(uE+uP)/2 –(uW+uP)/2 =(uE-uW)/2 =0
y uE-uW=0
20
500
100
500 100
wavy-velocity field
y Again the continuity equation wants the equality of
velocities at alternate grid points
y Where is the Flaw?
y The flaw is the problematic interpolation of pressure
gradient at the control volume face.
y
u=100
21
POSSIBLE REMEDIES:
y Using the same grid with higher order pressure
interpolation schemes.
y STAGGERED GRID
y The difficulties described above can be resolved if we
arrange the velocity components on a different grid . This
grid is called the staggered grid.
y Velocity components are calculated on staggered grids
centered around the cell faces.
y Pressure is evaluated at the main grid points.
22
Staggered Grid
u
V
V
V
V
Staggered
grid
Main CV
y
2-D staggered grid
Dotted line represents the
Staggered Grid.
Velocity Components lie
on the faces of CV
23
Advantages of Staggered
grid
y Its faces are coincident with main grid points where
pressure values are known so no pressure interpolation
required.
y Discretized Continuity equation will contain difference of
adjacent velocity components.
y Pressure difference between two adjacent grid points
becomes the driving force for the velocity component
located between them.
24
Discretisation of Momentum
Equations
y Discretised x–momentum equation
for the staggered CV shown in the fig:
ae ue = Σanb unb + b + (PP-PE )Ae
y subscript ‘nb’ represents neighboring
terms.
y Discretised y–momentum equation
for the staggered CV shown in the fig:
Fig: A 2-D staggered
CV
an un = Σanb unb + b + (PP -PN )An
25
How to solve for the
pressure?
y Need to formulate a governing equation for pressure.
y Algorithms may be devised to fulfill that requirement:
y SIMPLE
y SIMPLER
26
SIMPLE Algorithm(Semi-Implicit
Method for Pressure-Linked Equations)
y Guess the pressure field(say p*).
y Obtain velocity field from the value of p*,donated by
u*,v*,w*.
y They are related by the following momentum equations :
y ae ue * = Σanb unb * + b + (PP *- PE *)Ae
y an vn * = Σanb vnb * + b + (PP *- PN *)An
y at wt * = Σanb wnb * + b + (PP *- Pt *)At
y find a way of improving these guessed values p* such that
the resulting value of velocities satisfy the continuity
equation.
27
Velocity correction
y Discretised momentum equation
y
ae ue = Σanb unb + b + (PP -PE )Ae
ae ue*= Σanb unb*+ b + (PP*-PE*)Ae
ae (ue –ue*)= Σanb (unb - unb*) + ((PP -PP *)-(PE - PE *))Ae
y ae ue ` = Σanb unb` + (PP`- PE`) Ae
y If effect of neighbours is neglected
ue = ue* + de ( PP` - PE`)
vn = vn* + dn ( PP` - PN`)
wn = wn* + dt ( PP` - Pt`)
where di = Ai /ai
28
Pressure correction
y We get the correction for pressure from the continuity
equation.
y Substitution of corrected velocities in the discretised form of
continuity equation** gives the equation of the following form
y ap pP `= aE p`E + aW p`W + aN p`N+ aS p`S + aT p`T + aB pB`+B
where a$ = ρ$d$ A# , A# = Area perpendicular to line p#
aP=aE+aw+aN+as+aT+aB , B= f( u*, v*, w*)
y This is the required pressure correction equation.
29
SIMPLE ALGORITHM
Keep the
corrected p
as p*
NO
YES
30
Points to be noted:
y We have neglected the term Σanbunb'in the velocity
correction equation which enables to cast the pressure
equation in a general conservative form.
y The algorithm is called semi implicit because we have
dropped the term Σanbunb'which represents the indirect or
implicit influence of the pressure correction on velocities.
31
Points to be noted:
y On convergence all the corrections tend to zero and there
is no error induced on dropping Σanbunb'for obtaining
pressure correction equation and the term b must go to
zero as is clear from pressure correction equation.
y For high pressure flows the pressure correction formula
should accommodate density correction term.
y Pressure obtained is a relative variable as an outcome of
this algorithm and not a absolute quantity.
32
Drawbacks of SIMPLE
y Approximation of the pressure correction by neglecting
the term Σanbunb‘in the SIMPLE algorithm leads to a rather
exaggerated pressure correction.
y Due to the omission of the neighbouring velocity
corrections, pressure correction has to take the entire
burden of correcting the velocities.
y This does a pretty good job of correcting velocity it does a
poor job of correcting pressure.
y Hence we have to do many iterations before convergence
could result.
33
SIMPLER: Revised SIMPLE
y Pressure correction term overcorrects pressure,so for
evaluation of pressure we devise separate governing
equation.
y Velocity field is still calculated using pressure correction
formula
y Obtaining the Pressure equation:
y The momentum equation can be written as :
Ue=(∑anbunb+b)/ae + de ( pP – pE )
where de=Ae/ae
34
y Define ûe ( pseudo velocity ) =( Σanb unb + b)/ae
y Ûe can be calculated if neighbouring velocities are known ,so
we start with guessed velocity field.
y Hence the velocity is :
ue = ûe + de ( pP – pE )
y Now if we substitute this velocity field in the discretised
continuity equation we get the following pressure equation.
ap pP = aE pE + aW pW + aN pN + aS pS + aT pT + aB pB + b
where all a’s are same as before.
Hence B=f(û, v, ŵ)
y Hence we have an extra pressure equation to solve exact
pressure.
35
SIMPLER Algorithm
NO
YES
36
SIMPLER V/S SIMPLE
y Although SIMPLER has been found to give faster
convergence than SIMPLE, computation effort per
iteration increases.
y It involves solving the pressure equation.
y Calculation of û, v̂ and ŵ which is not there in SIMPLE.
y However since SIMPLER requires fewer iterations for
convergence, the additional effort required is justified.
37
Conclusion
y Naviers Stoke equations are coupled non linear systems of
partial differential equations for which analytical solution are
difficult.
y Pressure gradient appears as an extra term though there is no
governing equation for pressure.
y Ψ, ζ eliminates pressure gradientbut it is restricted to 2-D
uncompressible flow.
y Difficulties with pressure interpolation at CV faces may be
overcome with:
y Higher order interpolation for pressure gradient.
y Staggering –difficult in case of irregular geometry
y SIMPLE and SIMPLER provide iterative methods for pressure,
velocity coupling through continuity equations.
38
39
Download