Page 175 - Computational Fluid Dynamics for Engineers
P. 175
162 5. Numerical Methods for Model Hyperbolic Equations
ej+ij denotes an average value of e for cell i + 1, , etc. Also Eq. (5.6.2) is
j
treated as an equation for solving Uij as the unknown.
Equation (5.6.2) can be applied to the continuity, momentum and energy
equations. Since for the continuity equation, Q s — 0, Eq. (5.6.2) becomes
d
Qij , (gM)»+ij ~ (gtt)t-ij , (ev)ij+i ~ (g^kj-i _ n fKK<i*\
- -^
~df + 2k + 2h " U (5 b j
since U = Q, e = QU and / = gv. Similarly the ^-component of the momentum
equation can be written as
2
2
d, x , (su ) i+ij - (eu )j-ij , (guv)jj +1 - (euv^j-i _ pj-ij -pj+ij
dt [0U)ij+ 2k + 2h ~ 2k
(5.6.14)
and the energy equation as
9 , „ . , (Etu)i+ij - (Etu)i- ltj (Etv)ij+i - (E tv)ij-i
{Et)ij + +
di 2k 2h
_ (Ptt)j-lj - {pu)j+lj , (pv)i,j~l - (pv)i,j+l / C R I C X
~ 2k + 2h ( 5 b 1 5 j
- '
The solution of Eqs. (5.6.12) to (5.6.14) together with the ^-component
equation can be obtained conveniently with an explicit time-marching solution
based, for example, on a standard Runge-Kutta numerical integration with
respect to time. As in time-marching solution, the flowfield is assumed to be at
n
n
time t . In Eqs. (5.6.12) to (5.6.14), the right-hand sides are evaluated at t ,
thus they are known. These equations are of the form
d
^)" = C ( 5 A M )
with C denoting a constant which is different for each conservation equation.
This equation represents a system of first-order ordinary differential equations in
t that can be integrated conveniently with a fourth-order Runge-Kutta method
described in Chapter 12 to calculate the values of Uij at the next time step,
n+l
t as shall be discussed in some detail in Chapter 12.
Example 5.5. Use the finite volume method with (a) central and (b) upwind differencing
to solve the one-dimensional steady convection and diffusion equation
« {u4>)= *( f) 0 <X<L
v
dx ax \ ax J (E5.5.1)
0(0) = 1 «A(L) = 0
where u = 2.5 and v = 0.1. Compare your results with the exact solution </>(#)
4>(x) — 4>(0) exp(ux/u) — 1 (E5.5.2)
4>{L) - <f>(0) = exp(uL/z/) - 1