Академический Документы
Профессиональный Документы
Культура Документы
North-Holland
515
Mathenlatics,
National
Bureau of Standards.
Washington, D. C. 3234.
U. S. A,
Bl.reau of Standards,
Washington.
D.C. 20234.
U.S A.
Solutions are presented to nonlinear finite difference equations uccd to represent fire-driven buoyant
convection in enclosures. The solutions depend upon the fact that these difference equations permit the
decomposition of the discretized velocity field into solenoidal and irrotational components. The irrotational field
is shown to satisfy a finite difference analog of Bernoullis equation when the density is constant. This leads to a
three-dimensional time-dependent solution to the difference equations. The solenoidal field is shown to possess
steady-state two-dimensional solutions corresponding to a constant non-zero value of the discretized vorticity.
The two solutions, together with results presented elsewhere describing finite difference approximations to linear
internal waves in enclosures, have been used in the development and testing of the computer-based algorithms
used to solve these equations. They have proved particularly useful in assessing the accuracy of finite difference
approximations
to the equations of inviscid fluid mechanics. as well as in debugging the computer codes
implementing these algorithms.
1. Introduction
Over the past few years, the authors have been engaged in a research project to develop,
starting from basic conservation laws, a mathematical model of fire development within a room.
Large-scale convection is an essential component of such a model because this fluid motion
governs the smoke and hot gas transport within a room and also supplies fresh oxygen to the fuel
to sustain combustion. Therefore, development of a mathematical model of buoyant convection
was begun as a first step toward a more complete room-fire model, which would include effects
of combustion chemistry, radiation and smoke dynamics. The mathematical model for convection, the partial differential equations and boundary conditions, are derived in [l].
It is the nonlinear nature of the equations of fluid dynamics that makes them difficult to solve:
analytical tools for the solution of nonlinear problems are very limited. For this reason numerical
techniques have become very widely used; numerical solution of nonlinear equations is the only
systematic method of solving them under a wide variety of conditions. Yet, if these numerical
solutions are to be trusted, it is essential that they be carefully checked to determine their
accuracy.
It is the purpose of this paper to describe specialized solutions to the nonlinear equations
derived in [l] and [2], which were used to verify the quality of the numerical results obtained for
the more general equations. These solutions have been extremely useful, as was the solution
reported in [4], for providing insight into the seleciion of the discretization scheme and for testing
the stability and accuracy of the numerical scheme. Solutions to both the partial differential
equations and to the finite difference equations in two special cases are obtained by a
016%9274/85/$3.30
516
combination
2. Equations
The general problem considered is that of the fluid motion in a rectangular enclosure produced
by a specified heat source. The equations, derived in [l] and rewritten in more convenient form
for numerical integration in 121, are for an inviscid, non-heat-conducting
perfect gas. In the
solutions presented in this paper. density variations are taken to be small. and buoyancy effects
are neglected. Then the effects of density variations do not alter the flow to a first approximation.
The equations describing such a flow fluid are presented below. They are a simplified version
of equations (11) of [2].
ap/at
uap/ax
au/at+7q2-uxo=
(VP,,WP = - [aolaf
-(i/p,)~p,
Z.
t).
(14
Ub)
(1C)
(2a)
o=VXll,
dp,/dt
517
(2b)
Y-1
=?/;-lp(x.
y.z,t)dK
C1
(2
- UQb,
D(x, y. z, t) = (k&))[(v
I
Q(x. y, z, t)=Q,-,$/(&/~)(&/~)
y+ 3, t) - dp,,/dt].
(24
tanh Atexp[-p,(x-x,.)2-~,.(p-J:.)2-XZ];
(24
u= 0
W= 0
and consequently
8p/dn
or 0= 0 at vertical boundaries,
at horizontal boundaries,
the normal derivative of pressure at boundaries is zero
= 0.
(3a )
W )
The equations can be made dimensionless by introducing a length scale equal to the height of the
enclosure, a velocity scale determined by the magnitude of the divergence (or the heat source)
specified in (2d), the ambient density pO and the ambient or initial pressure, p,. When this is
done, the enclosure becomes one unit high, and in the equations above, pn, pm and Q. can be
taken as unity.
In Fig. 1, a two-dimensional rectangular enclosure in dimensionless variables is shown together
with a schematic two-dimensional representation of the spatial grids used for the finite difference
scheme. The grid formed from solid lines represents the basic mesh into which the enclosure is
divided: in general there are I mesh cells in the x-direction, J mesh cells in the y-direction. and
K mesh cells in the z-direction.
Upon this basic mesh, the components of the vector (u, v, w) and the component of the vector
vorticity are defined: the location of the velocity components for a sample mesh cell are also
shown in Fig. 1.
A second grid, formed by joining the center points of the basic grid cells, is that upon which
scalar quantities such as pressure p are defined. In Fig. 1 the pressure at the center of the sample
mesh cell is shown.
The following discretely evaluated functions will denote approximations to the corresponding
solutions to (1) and (2):
l4yik1 u(iEix. (jV:)k
r v(( i - $3x,
,)&y, (k - i)Sz,
jSy,
(k - $Vz,
r&t),
nst),
p:,,Ip((i-#lx.(j-$)Sy.(k-f)Sz.
nat).
(4
R.G. Reh
518
er al. / Difference
Cdculuriotts of CotwecGon
1.0
/
/
/
p,,(-_-____T
__--.---
r----y
I
p,3:_-____t
/I
I
__I___
--.---
<
dilj
Plj . Pij
l4.j
Dij
-1p,*~_-_t___~___t___~__i_
i
I
L jl
6, = l/J
i
Fig. 1. A rectangular
which
the enclosure
z-direction.
variables,
enclosure
is divided.
in dimensionless
There
variables
representation
and
K cells in the
9.
l/K are the mesh cell sizes in the X-, .v- and
whereSx=1/(1oAR),6~=1/(J~BR)andS==
z-directions respectively and where 6t is the time-step size. Such a staggered grid is commonly
used for multidimensional finite difference integrations [S].
In the following two sections, solutions to nonlinear equations (l)-(3) under additional
restrictions are given. Then the discretized approximation to each restricted set of partial
differential equations is also presented and solved. It should be noted that each of the
discretizations chosen to approximate the restricted set of partial differential equations is
compatible with the discretizations chosen in [2] for the more general partial differential
equations describing buoyant convection due to heating. Because of this compatibility, the
solutions given in Section 3 and 4 have been found to be very usefu! for comparison with the
numerical results obtained from the general algorithm described in [2].
3. Irrotational
The nonlinear problem is one in which the density is taken to be constant and the velocity is
assumed to be derivable from a velocity potential. In this section, first the solution to the partial
differential equations under these assumptions will be presented, and then the corresponding
solution for the difference equations is given.
3. I. Continuous solution
We start the analysis by noting generally that the fluid velocity can be written as the a gradient
of a scalar potential. +, ph~s the curl of a vector potential 9:
u=v++vxl/&
(5)
For an irrotational
of Cowectiott
519
(6)
on 0 < x < 1/AR, 0 B y < l/RR, 0 < z < 1. The boundary conditions are found from (3) to be
d+/dn = 0 on all boundaries. When D( x, y, z, t ) is separable, the equation for @ is separable,
and $Bcan be determined either by Fourier series or by Greens functions and complex-variable
techniques in the two-dimensional case. Then the spatial distribution of (p is specified by the
spatial distribution of D and the time dependence of C$is equal to that of D. The velocity field is
found from
u =- vC#L
(7)
The pressure field is found from the dimensionless version of (lb) by noting that the vorticity is
zero. With the density constant and the above definitions for the velocity components in terms of
the potential, (lb) becomes in component form
(-$(gf)=-(&)b+h2).
(g)(g)=-(-$)b+WL
(i)(Z)= -(g$P+h).
where the density p0 in dimensionless
42 3 u2 + v2 + w2 = ( i3+/ax)2
(8a 1
@b)
(8C)
+ ( a+/az)2.
(9)
+ p + ; [ (@/ax)
+ ( a+/aJg2
+ ( a&G-)]
= g(t).
(10)
dyP(x,
y, z, t)=O.
(11)
See the discussion following (8) of [2] concerning this condition. Integration of (10) over the total
volume 0 g x < l/AR, 0 <y < l/BR, 0 < i < 1 and requiring that
~dz~nndx~Rdy
+(x, y, z, c) = 0
(12)
yields for g( t )
g(r) = (AR ~RR)~dz~Rdx~nRdy
0
0
0
(13)
The pressure field is then found from the potential field through (10) where g( t ) is determined
from (13). Comparison of the solution obtained above for the continuous case with that obtained
below for the discretized equations then provides an estimate of the discretiza+ion error for a
specified mesh size.
3.2. Discrete solution
When the density is constant and the discrete velocity components are derivab!e from a
discretized potential, a solution to the difference equations can be obtained by a procedure
520
analogous to that used above to obtain a solution to the partial differential equations. First,
reference should be made to Fig. 1 where the discretized potential is defined at the center of a
grid cell. Then, the discretized velocity components and the potential are determined by the
relations
Substitution
l<k<K.
of these relations into the discrete version of (Id), yields for 1 < i < I. 1 <j <J,
1
-(+
&x2
1
II
I+ 1.,x,-2~~,~+~~-,.,,)+~(~~.,+,.~-2~~,,+~.,-,.~)
+; . 1. A
=
=
#,.I
and
#,./ + I .h
and
#,.K+,
G.,h
forO<j<J,O<k<K,
(16a)
#..Lh
forO<i<I,O<k<K,
wd
#,.I(
forO<i<I,O<j<J,
(16c)
=
=
(4::
Il,h 1 =
t1
v,;h+\
I --
1. ,A
1
26~[(4:I,+,.h)l-(4::r)i]
) - (q:;k)2]
- &( P::
I.
,h -
P :, A,)
1
-,(P::,+Lh-P:;h)
I1 + I
)2?
1th
(174
(17b)
WC)
where
sz
6t
f 2St
for n = 1,
for 17> 1.
Wa)
)* + ( qy, ) + ( $yk )
and
etc.
The upper bracketed values in (18) are the ones to be chosen during a first-order. explicit starting
time step whereas the lower value is to be chosen for a leap-frog time step. In this form. therefore.
(17) and (18) can be used to represent succinctly both first-orde? and leap-frog time steps. It is
important to note that the time step may be reduced during the computation to avoid violating
the stability criterion,
When this is done, the time-marching algorithm is restarted with the values of the dependent
variables at the last successful time step used as initial conditions. A first-order time step is then
taken using the new time step size to obtain values of the dependent variables at two levels. and
then the leap-frog is resumed. We substitute definitions 34) into (17) and define a potential
(20)
as in (18) to take account of the different
Then (17) become
O/~+Clr.,,
- ip::,*,,)/~
+ G::l.,nY
g;
I(
+P::,+,.L
cm
+ 9 (#/A ) + P:,k 1) = 0.
- @;:.k+,)/6+
-
(21a)
= 0,
- @/Y,+,*,)/~ + !?(4::,+1.J
- I( C#$ - @;;$6
(1/W{(~~/?+,
+#+,.,A
a;;,)/is +
i ( q$
1(9::.,.J2
+p::.r,+1
) + p:;J } = 0.
(2lc)
- q:,
(22) is
)/s +
;( #/A ) + p;;,
= g.
of i. j and k
02)
analogue of (11)
cw
and require
(24)
Then
or
Therefore, once the discretized potential has been determined from (15). the discretized pressure
field is obtained from (22) using (26) to determine 8 and using (27) for ~4~~~
). The solution
procedure outlined above has been carried out, namely (15) was solved n~Imerically using 8
three-dimensio~~al Poisson solver and then the velocity field was determined from (14) and the
pressure field from ~22) The results in the two dimensional case were compared with those
computed from the algorithm described in f2], when. in this algorithm, the perturbation density
#, and the vorticity wy#were specified to be zero. The parameter in the pressure solver described
in 121. which determined the accuracy to which the linear algebraic system for the discretized
pressure is solved, was taken to be E = IQ? This value was chosen as a reasonable compromise
given the machine accuracy (36 bits) of the NBS UNIVAC 1200 and the iterative nature of the
pressure solver. Agreement up to a few tens of time steps, between dependent variables (both
s~~ntp~~nentsof v&city and pressure) determined by the two different procedures, was found to a
few parts in 10 _a Accuracy of the nuntcrical procedure described in (21 was found to degrade
slowly, bring a few parts in 10 - s after a few hundred time steps.
It is interesting to describe the physical content of the problem discussed in this section. When
the density is taken to be constant. the driving function D( x, _L z, t) can no longer be assumed
to result from heating and cannot be interpreted as a source of specific volume, Rather, D(x, y,
I.- t ) must be interpreted as a distribution of sources and sinks of fluid in an enclosure. With this
interpretati~?i~ the potential flow. with no outflow or inflow at the boundaries of the enclosure,
has some interesting features, which are described briefly below.
The fornt of D( .Y, _r, 2, t ) used for these calculations is defined by (20) and (2d) with Q(x, y9
2, t ) given by (2e). (For the solutions shown below, Q is centered aiong floor of the enclosure.)
Since the ~ontinu~~us potential is given by (6), with the corresponding velocities given by (7), and,
since Q and therefore D is separable in time, the spatial dependence of the potential and the
velocity components remains the same throughout the history of the problem. The function D(x,
j. z. f 1 represents sources of fluid of greatest strength at the center of the heat source Q and
decreasing in strength as the distance from the center increases. At some distance from the center,
the sources become sinks so that the integral of the sources (and sinks) over the enclosure is zero.
Therefore. the velocity field is one describing flow from the heat source to the remainder of the
enclosure as shown in Fig. 2 for all times during the history of the flow.
523
of the vertical
coordinate).
coordinate.
The vertical
locations (in
locations
as a
The flow field is from the source to the sinks; the spatial pattern
flow.
In contrast, the pressure changes dramatically during the flow. During the early portion of the
flow, all nonlinear manifestations can be neglected, and in (lo), p s - &#I/&. The potential $I
will behave qualitatively like the negative of the source function D; i.e., where the source is
maximum (at the center of the heat source) the potential is minimum. and the pressure is
highest, as shown in Fig. 3. Hence the pressure is maximum where D is and decreases to negative
values away from the heat source Q. Later in the flow, when the source is asymptoting to its
final value, the nonlinear terms dominate and @/at becomes relatively small in (10). At any
particular time g( t ) is a constant, and (10) becomes approximately
The term in square brackets is the magnitude of the velocity squared. This equation states that
the pressure is minimum where the velocity magnitude is largest, and this velocity magnitude is
largest where the gradient of the heat source Q is maximum. Figure 4 shows contours of
constant pressure late in the flow when the heat source is asymptoting to its final value.
+ ao/ay
= 0
are derivable from a vector potential of one component.
(29)
the stream
524
Fig. 3. Contours
CdadUtim~
of
of the two-dimensional
potential
flow. Contours
greater
than the mean pressure are shown as solid lines, while those below the mean are dashed. The pressure is maximum
where the distribution
function
#. (see (5))
II = a$+5ys.
(30)
I = - aijJ/a.u.
; a( 12 + 1) )/as
Ja(u
+ UC3= -(l/p,,)ap/$v.
+ rq/$v
become
(31)
is defined by
- au/i)?* = - CJ,.
(32)
Define
H = p//l+, + 1( 12 + I: )
and substitute
for
14
(33)
i)ff/as+oa~/aA-=o. ~~H/i)~~+c~3~/;3~*=0.
(34)
c3= +h
then (34) become
(3( H + i,lc,)/&u
= 0.
a(
H+b;Cl)/ay=O.
525
Fig. 4. Contours
of constant
of the two-dimensional
potential
flea.
Contours
greater
than the mean pressure are shown as solid lines. while those below mean are dashed. Nute that the pressure is negative
where the sources are and positive away from the sources in contrast to Fig. 3. The change in charyctrr
Bernoulli
or
H + h# = C = constant
(36)
where C is evaluated, for example, by requiring that the mean value of p, integrated over the
enclosure be zero.
Equation (32) becomes
v2$=
-h
(37)
and
(u
I
- u:_,,,)/Sx + (I$ -
q,._
,)/6_r= 0
(33)
( #:,
q,
_ , )/6_L
( $:, -
(40)
gJ:_ 1. ,)/6x.
1 1
,o:I,_,)+,,(P::l.,-p::)=0.
0 -
-!(r:,,q,+(II,,
(4la)
where
q, = ( r;, , , - (y, )/6x
r;
- ( 14;:, + , - 14;;)/6_r.
= 1 ( ry, + r:, ,. , ) .
(424
Wb)
(42c)
6x-
1
+ K-
1.1) +Q
ll
(4 , . /+1 -W,+#,-11.
(43)
and
11;. = (l//2S*,*)(q:,, , -a/(,
,).
(44)
(1; = -(1/2S-~)(~:+,.,-~:-,.,).
(l/&r)[
+l[
~(Y:l,,,)2+P:l,+,/Pl,-
w:,(l/2s.~~)(~:.,+, -#J
,.,)+w::,_,(l/2s-~)(~:+~.,-,
-#Y-,.,-J]
=O,
(45a)
-&.,-I)]
=O* (45b)
Lkc/)?-P::h]
\)+a:-
,.,(1/2~.r~)(~:-,.,i,
(46)
~(4:;) +P::/po
+ 34 c, + +: I./ + #: . , , + 4: , . , _ , ) = C = constant.
(47)
The constant in this equation is evaluated by requiring that the mean value of p,, over all mesh
points be zero (to make it compatible with the general definition of this quantity in the algorithm
described in [2]).
To determine a solution to the nonlinear difference equations, therefore, the discretized
Helmholtz equation obtained by combining (43) and (46)
WW(~:+
-L/J:,++::,_,)=
-/I
(49)
0.8-
0.6 -
0.4-
0.2-
0.0-
I.1DX
I
Fig.
5. Horizontal
function
velocity
direction
velocity
of horizontal
component
as a function
location
of vertical
0.8
1.0 u
positions.
The
positions
0.6
at three vertical
is displayed,
of the component.
0.4
0.2
0.0
coqxnent
the positions
at which each
the magnitude
and
velocity component
is
represented by a solid curve to the right of its dashed line. and a positive vertical component by a solid curve above its
dashed line. The
flow
field is rotating
representing
a stirring
in the lectangular
with
greatest velocities
region.
with boundary conditions that $,, = 0 on the boundaries, i = 0. I and j = 0, J, is solved using a
software package such as the one develop by Swarztrauber and Sweet in [6]. From this solution
for the stream function, the velocities are determined from (40) and the pressure from (47). This
solution procedure involves analytical and numerical techniques totally independent of the
numerical algorithm described in [2].
The steady-state solution to the difference equations was used to test the algorithm of [2] by
using the values as initial conditions to the code (for both initial time levels) with the heat source
set to zero and the perturbation &nsity also set to zero. The computer code was then allowed to
take several hundred time steps, and the values after different numbers of time steps were
compared. It was found that there was no instability in the algorithm. The solution replicated
itself very well, with a slow degradation in the number of significant figures with which the
solution was able to duplicate itself as the number of time steps increased. Initially. the solution
after a few time steps agreed with the exact solution to a few parts in the sixth significant figure.
as expected from the tolerance set on the pressure solver. After four hundred time steps. the
agreement was to a few parts in the fourth significant figure. representing a degradation which we
felt was reasonable.
In Fig. 5 we present plots of the horizontal velocity as a function of vertical location at three
horizontal positions and of the vertical velocity as a function of horizontal location at three
vertical positions. This figure shows a flow field which is rotating in a clockwise direction with
the greatest velocities at the edges and smaller velocities in the interior. The flow field represents
stirring in a rectangular tea cup with no dissipative effects of viscosity. Horizontal velocity plots
at a specified horizontal position do not agree with vertical velocity plots at the corresponding
vertical location due to details in the graphics package used to display the data.
5. Concluding
remarks
calculations
of flow
fields generally
are specialized:
both
and
the
529
References
VI R.G. Rehm and H.R. Baum, The equations of motion for thermally driven, buoyant flows, J. Res. Nut. Bur.
Sturtdurds 83 (3) (1978) 297-308.
PI H.R. Baum, R.G. Rehm, P.D. Barnett and D.M. Corley. Finite difference calculations of buoyant convection in an
enclosure. Part I: The basic algorithm. SIAM J. Sci. Statist. Comput. 4 (1) (1983) 117- 135.
131 J. Lewis and R.G. Rehm. The numerical solution of a nonseparable elliptic partial differential equation by
preconditioned conjugate gradients, J. Res. Nut. Bur. Sturtdurds U (5) (1980) 367-389.
VI H.R. Baum and R.G. Rehm. Finite difference solutions for internal waves in enclosures. SIAM J. Sci. Stutist.
Conzput. 5 (4) (1984) 958-977.
151 F.H. Harlow and A.A. Amsden, Fluid dynamics, a LASL monograph. Los Alamos Scientific Laboratory Report
LA 4700. Los Alamos, NM, June 1971.
WI P. Swarztrauber and R. Sweet, Efficient FORTRAN subprograms for the solution of elliptic partial differential
equations, NCAR-TN/IA-109.
July 1975.