Chapter 8: Finite Volume Method For Unsteady Flows: Div Div Grad S Div Div Grad S T
Chapter 8: Finite Volume Method For Unsteady Flows: Div Div Grad S Div Div Grad S T
Unsteady Flows
Ib hi Sezai
Ibrahim S i
Department of Mechanical Engineering
Eastern Mediterranean University
Spring 2008-2009
8.1 Introduction
The conservation law for the transport of a scalar in an
unsteady flow has the general form
∂
( ρφ ) + div( ρ uφ ) = div(Γ grad φ ) + Sφ ((8.1))
∂t
by replacing the volume integrals of the convective and
diffusive terms with surface integrals as before (see section
2.5) and changing the order of integration in the rate of
change term we obtain:
⎛ t +ΔΔt ∂ ⎞ t +ΔΔt
⎛ ⎞
∫CV ⎝ ∫t ∂t
⎜ ( ρφ ) dt ⎟
⎠
dV + ∫t ⎝A
⎜∫ n ⋅( ρ u φ ) dA ⎟ dt
⎠ (8.2)
t +Δt
⎛ ⎞ t +Δt
= ∫ ⎜ ∫ n ⋅(Γ grad φ )dA ⎟ dt + ∫ ∫ Sφ dVdt
t ⎝A ⎠ t CV
ME555 : Computational Fluid Dynamics 2 I. Sezai – Eastern Mediterranean University
1
Introduction
Unsteady one-dimensional heat conduction is governed by the equation
∂T ∂ ⎛ ∂T ⎞
ρc = ⎜k ⎟+S (8.3)
∂t ∂x ⎝ ∂x ⎠
In addition to usual variables we have c, the specific heat of material
(J/kg/K).
∫w ⎢⎣ ∫t ∂t ⎥⎦
ρ c dt dV = ∫t ⎢⎣⎜⎝ ∂x ⎟⎠e ⎜⎝ ∂x ⎟⎠w ⎥⎦ ∫t S ΔVdt
kA − kA dt + (8.5)
ME555 : Computational Fluid Dynamics 3 I. Sezai – Eastern Mediterranean University
I equation(8.6)
In ti (8 6) superscript
i t ‘o’
‘ ’ refers
f to t temperatures
t t att time
ti t.
Temperatures at time level t+Δt are not superscripted
Eqn(8.6) could also be obtained by substituting
∂T TP − TP0
=
∂t Δt
So, first order (backward) differencing scheme has been used. If we
apply central differencing to rhs of eqn (8.5),
t +Δt
⎡⎛ TE − TP ⎞ ⎛ TP − TW ⎞⎤ t +Δt
ρ c (TP − T ) ΔV =
P
0
∫ ⎢⎜ ke A ⎟ − ⎜ kw A ⎟ ⎥ dt + ∫ S ΔVdt
⎣⎢⎝ ∂xPE ⎠ ⎝ ∂xWP ⎠ ⎥⎦
t t
(8.7)
ME555 : Computational Fluid Dynamics 4 I. Sezai – Eastern Mediterranean University
2
To calculate the integrals we have to make an assumption
about the variation of TP, TE and TW with time, we could use
temperatures
at time t, or
at time t+Δt
or combination of both.
Integral of temperature TP with respect to time can be written
as; t +Δt
IT = ∫ TP dt = ⎡⎣θ TP + (1 − θ )TP0 ⎤⎦ Δt (8.8)
t
Hence
θ 0 1/ 2 1
1
IT TP0 Δt
2
( )
TP + TP0 Δt TP Δt
3
Now we identify the coefficients of TW and TE as aW and aE and write equation
(8.10) in familiar standard form:
a pTP = aW ⎡⎣θ TW + (1 − θ ) TW0 ⎤⎦ + aE ⎡⎣θ TE + (1 − θ ) TE0 ⎤⎦ (8.11)
+ ⎣⎡ aP0 − (1 − θ ) aW − (1 − θ ) aE ⎦⎤ TP0 + b
where
aP = θ ( aW + aE ) + aP0
and Δx
aP0 = ρ c
with
Δt
aW aE b
kw ke
S Δx
δ xWP δ xPE
For θ = 0 Æ explicit scheme
0 < θ < 1 Æ implicit scheme, for θ = 0.5 Æ Crank-Nicolson scheme
θ = 1 Æ Fully implicit scheme
4
All coefficients should be positive Æ aP0- aW - aE >0
or if k = const. and δxPE= δxWP=Δx this condition can
be written as
Δx 2k (8.13a)
ρc >
Δt Δx
Or
( Δx )
2
Δt < ρ c (8.13b)
2k
q y sets a stringent
This inequality g maximum limit to the
time step size and represents a serious limitation for
the explicit scheme.
Not recommended for the explicit scheme problems.
ME555 : Computational Fluid Dynamics 9 I. Sezai – Eastern Mediterranean University
⎡T + T 0 ⎤ ⎡T + T 0 ⎤ ⎡ a a ⎤
a pTP = aW ⎢ W W ⎥ + aE ⎢ E E ⎥ + ⎢ aP0 − W − E ⎥ TP0 + b (8 14)
(8.14)
⎣ 2 ⎦ ⎣ 2 ⎦ ⎣ 2 2⎦
Where aP = 1 ( aW + aE ) + aP0 − 1 S P
2 2
And Δx
aP0 = ρ c
Δt
aW aE b
kw ke 1
Su + S PTP0
δ xWP δ xPE 2
ME555 : Computational Fluid Dynamics 10 I. Sezai – Eastern Mediterranean University
5
Schemes with ½ ≤ θ ≤ 1 are unconditionally stable for all values
of time step Δt.
However, for physically realistic results all coefficients should
be positive, then, coefficients of TP0 should be positive, or
⎛ a + aE ⎞
aP0 > ⎜ W ⎟
⎝ 2 ⎠
Which leads to
Δx 2
Δt < ρ c (8.15)
k
This time step limitation is only slightly less restrictive than (8.13)
associated with the explicit method
The method is based on central differencing Æ Second order
accurate in time
Is more accurate than explicit method
6
8.3 Illustrative examples
Example 8.1
A thin plate is initially at a uniform temperature of 200 ºC. At a certain time t=0 the
temperature of the east side of the plate is suddenly reduced to 0ºC. The other
surface is insulated. Use the explicit finite volume method in conjunction with a
suitable time step size to calculate the transient temperature distribution of the slab
and compare it with the analytical solution at time (i) t = 40s, (ii) t = 80s and (iii) t =
120 Recalculate
120s. R l l the h numerical
i l solution
l i using
i a time
i step size
i equall to the
h limit
li i
given by (8.13) for t = 40s and compare the results with the analytical solution. The
data are: plate thickness L=2cm, thermal conductivity k = 10 W/m/K and ρc = 10 x
106 J/m3/K.
Solution: the one–dimensional transient heat conduction eqn is
∂T ∂ ⎛ ∂T ⎞
ρc = ⎜k ⎟+S
∂t ∂x ⎝ ∂x ⎠ ((8.17))
The initial and boundary conditions:
T = 200 at t =0
∂T
= 0 at x = 0, t > 0
∂t
T = 0 at x = L, t > 0
ME555 : Computational Fluid Dynamics 13 I. Sezai – Eastern Mediterranean University
7
The time step for the explicit method is subject to the condition that
ρ c ( Δx )
2
Δt <
2k
10 ×106 ( 0.004 )
2
Δt <
2 × 10
Δt < 8 s
ME555 : Computational Fluid Dynamics 15 I. Sezai – Eastern Mediterranean University
8
ME555 : Computational Fluid Dynamics 17 I. Sezai – Eastern Mediterranean University
9
ME555 : Computational Fluid Dynamics 19 I. Sezai – Eastern Mediterranean University
10
8.4 Implicit Method for Two-and Three- dimensional Problems
11
8.5 Discretisation of transient convection-diffusion equation
12
One-dimensional flow Two-dimensional flow Three-dimensional flow
⎡ ⎛ F ⎞ ⎤ ⎡ ⎛ F ⎞ ⎤ ⎡ ⎛ F ⎞ ⎤
aW max ⎢ Fw , ⎜ Dw + w ⎟ , 0 ⎥ max ⎢ Fw , ⎜ Dw + w ⎟ , 0 ⎥ max ⎢ Fw , ⎜ Dw + w ⎟ , 0 ⎥
⎣ ⎝ 2 ⎠ ⎦ ⎣ ⎝ 2 ⎠ ⎦ ⎣ ⎝ 2 ⎠ ⎦
⎡ ⎛ F ⎞ ⎤ ⎡ ⎛ F ⎞ ⎤ ⎡ ⎛ F ⎞ ⎤
aE max ⎢ − Fe , ⎜ De − e ⎟ , 0 ⎥ max ⎢ − Fe , ⎜ De − e ⎟ , 0 ⎥ max ⎢ − Fe , ⎜ De − e ⎟ , 0 ⎥
⎣ ⎝ 2⎠ ⎦ ⎣ ⎝ 2⎠ ⎦ ⎣ ⎝ 2⎠ ⎦
⎡ ⎛ F ⎞ ⎤ ⎡ ⎛ F ⎞ ⎤
aS − max ⎢ Fs , ⎜ Ds + s ⎟ , 0 ⎥ max ⎢ Fs , ⎜ Ds + s ⎟ , 0 ⎥
⎣ ⎝ 2⎠ ⎦ ⎣ ⎝ 2⎠ ⎦
⎡ ⎛ F ⎞ ⎤ ⎡ ⎛ F ⎞ ⎤
aN − max ⎢ − Fn , ⎜ Dn − n ⎟ , 0 ⎥ max ⎢ − Fn , ⎜ Dn − n ⎟ , 0 ⎥
⎣ ⎝ 2 ⎠ ⎦ ⎣ ⎝ 2 ⎠ ⎦
⎡ ⎛ F ⎞ ⎤
aB − − max ⎢ Fb , ⎜ Db + b ⎟ , 0 ⎥
⎣ ⎝ 2 ⎠ ⎦
⎡ ⎛ F⎞ ⎤
aT − − max ⎢ − Ft , ⎜ Dt − t ⎟ , 0 ⎥
⎣ ⎝ 2⎠ ⎦
ΔF Fe − Fw Fe − Fw + Fn − Fs Fe − Fw + Fn − Fs + Ft − Fb
ME555 : Computational Fluid Dynamics 25 I. Sezai – Eastern Mediterranean University
The volumes and cell areas given in section 8.4 apply here as
well.
Other schemes such as linear upwind or QUICK may be
incorporated into these equations by substituting the
appropriate expression for the coefficients as will be
demonstrated in the following example
13
8.6 Worked example of transient convection-diffusion using QUICK differencing
the source distribution defined by Figure 8.8 applies at times t>0 with
a=-200,
a= 200 b=100,
b=100 x1= 0.6m,
0 6m x2= 0.2m.
0 2m Write a computer program to
calculate the transient temperature distribution until it reaches a steady
state using the implicit method for time integration and the Hayase et
al variant of the QUICK scheme for the convective and diffusive
terms and compare this result with the analytical steady state solution
14
The velocity is u=2.0m/s and the cell width is Δx=0.0333 so F=ρu=2.0
and D=Γ/δx=0.9 everywhere. The Hayase et al formulation gives φ at
cell faces by means of the following formulae:
1 (8.33)
φe = φP + ( 3φE − 2φP − φW )
8
1
φw = φW + ( 3φP − 2φW − φWW ) (8.34)
8
The implicit discretisation equation at a general node with Hayase’s et al
QUICK scheme is given by
ρ (φP − φP0 ) Δx ⎡ 1 ⎤
+ Fe ⎢φP + ( 3φE − 2φP − φW ) ⎥
Δt ⎣ 8 ⎦
⎡ 1 ⎤
− Fw ⎢φW + ( 3φP − 2φW − φWW ) ⎥
⎣ 8 ⎦
= De (φE − φP ) − Dw (φP − φW ) (8.35)
ME555 : Computational Fluid Dynamics 29 I. Sezai – Eastern Mediterranean University
15
The Analytical Solution
Under the given boundary conditions the solution to the problem is as
follows:
a0
φ ( x) = C1 + C2 e Px − ( Px + 1) (8.41)
P2
∞
⎛ L ⎞⎡ ⎛ nπ x ⎞ ⎛ nπ ⎞ ⎛ nπ x ⎞ ⎡ 2 ⎛ nπ ⎞2 ⎤ ⎤
−∑ an ⎜ ⎟ ⎢ P sin ⎜ ⎟+⎜ ⎟ cos ⎜ ⎟ ⎢P + ⎜ ⎟ ⎥⎥
n =1 ⎝ nπ ⎠ ⎢⎣ ⎝ L ⎠ ⎝ L ⎠ ⎝ L ⎠ ⎢⎣ ⎝ L ⎠ ⎥⎦ ⎥⎦
with ρu a0 ∞
an ⎡ 2 ⎛ nπ ⎞2 ⎤
P=
Γ
; C2 = + ∑
P 2 e PL n =1 e PL
cos ( nπ ) ⎢P + ⎜ ⎟ ⎥
⎝ L ⎠ ⎥⎦
⎣⎢
a0 ∞ ⎡ 2 ⎛ nπ ⎞ 2 ⎤
and C1 = −C2 + P 2 + ∑ an ⎢P + ⎜ ⎟ ⎥
n =1 ⎢⎣ ⎝ L ⎠ ⎥⎦
( x1 + x2 )( ax1 + b ) + bx1
and a0 =
2L
2 L ⎪⎧⎛ a ( x1 + x2 ) + b ⎞ ⎛ nπ x1 ⎞ ⎡ ⎛ ax1 + b ⎞ ⎛ nπ ( x1 + x2 ) ⎞ ⎤ ⎪⎫
an = 2 2 ⎨⎜ ⎟ cos ⎜ ⎟ − ⎢a + ⎜ ⎟ cos ⎜ ⎟⎥ ⎬
n π ⎩⎪⎝ x2 ⎠ ⎝ L ⎠ ⎣⎢ ⎝ x2 ⎠ ⎝ L ⎠ ⎦⎥ ⎭⎪
ME555 : Computational Fluid Dynamics 31 I. Sezai – Eastern Mediterranean University
16
8.7 Solution procedures for unsteady flow calculations
8.7.1 Transient SIMPLE
The continuity equation in a transient two-dimensional flow is given by
∂ρ ∂ ( ρ u ) ∂ ( ρ v ) (8.42)
+ + =0
∂t ∂x ∂y
Th integrated
The i t t d form
f off this
thi eqn over a two-dimensional
t di i l scalar
l c.v. is
i
(ρ P − ρ P0 )
ΔV + ⎡⎣( ρ uA )e − ( ρ uA ) w ⎤⎦ + ⎡⎣( ρ uA )n − ( ρ uA )s ⎤⎦ = 0 (8.43)
Δt
The equivalent of pressure correction equation (5.32) for a two-dimensional
transient flow will take the form
aP pP′ = aW pW′ + aE pE′ + aS pS′ + aN p′N + b
aE = ( ρ Ad )e aW = ( ρ Ad ) w aN = ( ρ Ad ) n aS = ( ρ Ad ) s (8.44)
aP = aw + ae + as + an
( ρ Po − ρ P )ΔV
(
b = ρu* A ) (
w
) ( ) (
− ρ u * A + ρ v* A − ρ v* A +
e s
) n Δt
ME555 : Computational Fluid Dynamics 33 I. Sezai – Eastern Mediterranean University
17
ME555 : Computational Fluid Dynamics 35 I. Sezai – Eastern Mediterranean University
18
In equation (8.46) the superscript n-1 indicates the previous
iteration and in equation(8.47) superscript 0 represents the
previous time level. We immediately note a clear analogy
between transient calculations and under-relaxation in
steady state calculations. It can be easily deduced that
ai , J ρi0, J ΔV
(1 − α u ) = (8.48)
αu Δt
This formula shows that it is possible to achieve the effects
off under-relaxed
d l d iterative
it ti steady
t d state
t t calculations
l l ti from
f a
given initial field by means of a pseudo-transient
computation starting from the same initial field by taking a
step size that satisfies (8.48).
19