0% found this document useful (0 votes)
132 views23 pages

Time-Dependent Boundary Conditions For Hyperbolic Systems, II

High order methods
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
132 views23 pages

Time-Dependent Boundary Conditions For Hyperbolic Systems, II

High order methods
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

JOURNAL OF COMPUTATIONAL PHYSICS 89, 439461 (1990)

Time- Dependent Boundary Conditions


for Hyperbolic Systems, II
KEVIN W. THOMPSON

Center for Turbulence Research, Space Science Division,


NASA Ames Research Center, Moffett Field, California 94035

Received March 24, 1989; revised August 4, 1989

A previous paper introduced the concept of nonreflecting boundary conditions for


hyperbolic equations in more than one dimension. This paper develops a general boundary
condition formalism for all types of boundary conditions to which hyperbolic systems are
subject (including the nonreflecting conditions). The formalism is described in detail, and
many examples are provided for common problems in hydrodynamics, including solid wall
and nonreflecting boundaries. c 1990 Academic Press, Inc.

1. INTRODUCTION

This paper presents a unified formalism for the treatment of boundary conditions
for systems of hyperbolic equations. This treatment is intended to encompass all
possible boundary conditions for first-order hyperbolic systems in any number of
dimensions. A general theory of boundary conditions is given first, which is then
followed by a more detailed exposition for common problems in computational
fluid dynamics.
This paper differs from earlier work in that it attempts to unify all types of
physically reasonable boundary conditions into a single formalism. The resulting
formalism makes possible a “cookbook” approach to boundary conditions, in
which new boundary “recipes” may be derived from the formalism, and old ones
are simply looked up as needed. The latter portion of this paper (Section 3.2) begins
a compendium of boundary conditions for problems in fluid dynamics.
The central concept of this paper is that hyperbolic systems of equations
represent the propagation of waves and that at any boundary some of the waves are
propagating into the computational volume while others are propagating out of it.
The outward propagating waves have their behavior defined entirely by the solu-
tion at and within the boundary, and no boundary conditions can be specified for
them. The inward propagating waves depend on the solution exterior to the model
volume and therefore require boundary conditions to complete the specification of
their behavior. This paper describes how to decompose hyperbolic equations into
439
0021-9991/90$3.00
Copyright ?‘ 1990 by Academtc Press. Inc.
All nghfs of reproductmn in any form reserved
440 KEVINW.THOMPSON

wave modes of definite velocity and then how to specify boundary conditions for
those modes which require them.
The paper begins with theory and ends with practice. Section 2 looks at the
problem of boundary conditions for general hyperbolic systems. Section 3
represents several common boundary conditions for fluid dynamics problems.
Finally, Section 4 describes the complete numerical solution of the fluid equations
with boundary conditions.

2. INITIAL BOUNDARY VALUE PROBLEMS FOR HYPERBOLIC SYSTEMS

Let U(x, t) be a vector of m components Ui, each of which is a time varying field
defined in a finite n dimensional volume V. The general behavior of U is described
by a hyperbolic set of m first-order differential equations in the II spatial coordinates
xk and time t. The time dependent solution for U is completely determined by
(i) the governing differential equations; (ii) the initial values for U in Y; and
(iii) the time dependent boundary conditions on the boundary of Y”.
Some ambiguity exists as to what exactly constitutes a boundary condition. This
paper presents the following conceptual model: a boundary condition consists
of a single mathematical expression of information which (i) is external to the
calculation, i.e., cannot be obtained solely from knowledge of U within Y’“; and
(ii) contributes to, but does not by itself define, the values of XJ/dt along the
boundary. In other words, the boundary conditions contain whatever information
is needed to completely specify au/at, and which cannot be obtained from informa-
tion within Y.
It is important to separate the concept of boundary conditions from that of the
boundary treatment. The boundary treatment is the complete algorithm for deter-
mining the values of XJ/dt along the boundary of *Y-,and incorporates information
from within -Y- as well as the boundary conditions. One must have a boundary
treatment at all boundaries of the computational domain when obtaining a solution
for U within Y. However, in the case of hyperbolic equations, the number of
boundary conditions required at a given point on the boundary ranges from 0 to
m and may vary with time and position as the solution evolves (e.g., an initially
subsonic and outward-directed flow may become supersonic at some later time,
reducing the number of boundary conditions from one to zero).
Another important point is that at any time t the boundary conditions contribute
only to the determination of XI/at at the boundary, and never define U itself. For
example, a boundary treatment which explicitly sets the normal velocity of a fluid
to zero at a wall boundary is not allowed in this model. Instead one would set the
normal velocity to zero in the initial data and then specify boundary conditions
which would force the time derivative of the normal velocity to be zero at all times.
One advantage of this approach is that it decouples the boundary treatment from
the time integration of the differential equations, so that the integration may be
performed without reference to any special behavior at the boundaries.
TIME-DEPENDENT BOUNDARY CONDITIONS, II 441

2.1. Conservation Laws


The analysis performed here follows that of references [ 1,2]. The starting point
is a first-order hyperbolic system of m equations in m unknowns, in a space of n
dimensions. The case where n = 3 is considered below.
The unknowns we wish to solve for comprise a solution vector of m components.
It is usually the case that the choice of unknown variables is not unique; for exam-
ple, in fluid dynamics we might choose the conservative variables (denoted by 6)
or the primitive variables (denoted by U), as in Section 3. While the definition of
conservative variables is unique (e.g., momentum is conserved, while velocity is
not), the primitive variables are selected for convenience, as many formulations are
possible.
The choice of conservative variables is often made to preserve exactly the
conservation properties of the system in the interior of Y. However, the boundary
condition analysis is greatly simplified when the primitive variables are used, so
1 will begin with the conservative variables and describe the transformation which
connects the two representations. The reader who is interested only in the primitive
forms may skip the initial and final steps of this analysis, which describe the trans-
formation from conservative variables to primitive variables and back.
Let U be the vector of m conserved quantities tii, which obey the equation
86 dF’ c3F2 dF3
l+z+-+&-+b=o, (1)
. , ax, 3

where Fk is the vector of fluxes in the kth coordinate direction and fi is a vector
of inhomogeneous terms which do not involve derivatives of any of the components
of u.l
Other equations may be required to close the system, such as algebraic relations
between the variables (including equations of state), constraint equations (such as
V. B = 0 in magnetohydrodynamics [S]), or other differential equations (such as
V2@= 47cGpfor the gravitational potential in self gravitating systems). However,
such auxiliary equations do not alter the boundary condition analysis, although
they are required by the solution process as a whole.

2.2. Characteristic Analysis


The conservation laws of the previous section may be converted to an equivalent
set of wave equations, which represent nonlinear waves propagating at charac-

’ For example, D may contain source terms, such as heating, cooling, or gravitational forces; or it
may contain inhomogeneous terms from the breakup of divergence terms, such as

which is required by the form of Eq. (1) at the boundaries.


442 KEVIN W. THOMPSON

teristic velocities, which in turn are functions of the local solution and generally
vary in space and time. These characteristic velocities are given as the solutions to
an eigenvalue problem below.
The equations of one-dimensional fluid dynamics may be put into a characteristic
form in which the waves propagate in a single well-defined direction because only
one direction is available. However, no unique direction of propagation exists in
multidimensional problems [3,4], because the coeffkient matrices involved are not
simultaneously diagonalizable. Fortunately, the boundary condition analysis only
requires that any one coordinate direction be diagonalizable at a time, and this may
always be done.
Let the vector of primitive solution variables be U, and let the conservative
vector U depend only on fields which are contained in U (for example, the
definition of total energy density should not depend on the gravitational potential;
this requirement simplifies the analysis, as shown below for the equations of fluid
dynamics.) Then we may write [ 1]

where P is a Jacobian matrix of elements

(3)

Similarly, we may write

t!&k!?$ k = 1, 2, 3, (4)
k k

where the matrix Qk has elements

Consider now the characteristic analysis for the x1 direction. (The other
directions are similar). All terms not involving x, derivatives of Uj are carried along
passively and do not contribute in any substantive fashion to the analysis; therefore
we may lump them together and write

(6)

Transform Eq. (6) into primitive form by multiplying it by P- ’ and using (4),
which gives
f.XJ
i'r+A1~+A2~+~'~+J-l2 (7)
I 3
TIME-DEPENDENT BOUNDARY CONDITIONS. II 443

or
au
,.r+A1g+C=O, C=A’~+A’E+D, (8)
I 2 .3
where
Ak 5 P-‘Qk, CsPp’C, D=P-‘f+i (9)
The m left and right eigenvectors of A’ will be taken as fi and r,, and satisfy
ITA’ = &I,‘, A’ri = E$ri, i= 1, .... m, (10)

where the eigenvalues Ibi are given by


det(A’-H)=O, (11)
and where the left and right eigenvectors are mutually orthogonal:
lIT .‘j=d;,. (12)

The eigenvalues are real and are ordered so that I, < 2, d . . . d 2,. (A system of
equations of the form of (7) is defined to be hyperbolic if the eigenvalues of the
coefftcient matrices Ak are real.)
A diagonalizing similarity transformation may be generated for A’ by forming
the matrix S such that its columns are the right eigenvectors r,, and its inverse S ‘,
whose rows are the left eigenvectors f:. The similarity transformation is then

%‘A%= A, (13)

where A is the diagonal matrix of eigenvalues: /ii, = 0 for i #j, Ati = 2, for i = j.
Applying this transformation to Eq. (8) gives

(14)

whose m components are

The boundary condition analysis is made more convenient if we define a vector 2


of components g as

L+i,r:~ (16)
,I
444 KEVIN W. THOMPSON

Thus Eq. (14) may be written

(17)

or, in component form, as

Ifg+2q+rrc=o, i = 1, .... m.

The purpose of this analysis is to rewrite the original system of Eqs. (1) in a form
which contains the quantities g, as it is these quantities which we will use to
specify boundary conditions. Equations (17) and (18) are the starting point for the
boundary treatment.

2.3. Boundary Treatment


As in the previous papers [l, 51, the problem of implementing boundary condi-
tions is reduced to the problem of computing the appropriate values for the g
terms introduced above. The techniques for determining the z terms are shown
below, but first we will consider what to do with these terms once they are known.
Given the values for L$, multiply Eq. (17) by S (i.e., solve for XJ/dt in Eq. (17)
either analytically or with a suitable numerical method), giving

If only the primitive time derivatives are required, then we simply put (8) for the
definition of C back into (19) and we are done, as dU/& is now completely defined.
If, on the other hand, we want the conservative derivatives, then we multiply
Eq. (19) by P to obtain

(20)

at the x, boundaries.
The only terms which contain spatial derivatives in a direction normal to the
boundary occur in the 3 terms, where they are taken care of by the boundary
conditions described below. The remaining terms in (20) involve derivatives in
directions transverse to the boundary and may be evaluated just as in the interior
of Iv. (The same is true for the corresponding terms in the primitive equation
in (19))
TIME-DEPENDENT BOUNDARY CONDITIONS, II 445

2.3.1. Practical Solution for au/at


The boundary conditions described below define the values of 6p. However, in
order to solve for lNJ/& in Eq. (19) we require the product d = SY, although we
are given S I and 2. Thus we need to solve the system of equations
S-‘d=eY (21)

for d. Problems in fluid dynamics normally involve simple enough matrices that
Eq. (21) can easily be solved by hand. More complicated problems, such as in
magnetohydrodynamics (MHD), are too difficult for (21) to be solved analytically,
and require numerical solutions.

2.4. Boundary Conditions


The purpose of boundary conditions is to supply whatever information is needed
at the boundaries of the computational volume in order to complete the definition
of the behavior of the system. The number of boundary conditions which may be
imposed depends on the physics of the problem and may not be specified
arbitrarily. This sometimes frustrating fact is a consequence of the wave nature of
hyperbolic equations. Detailed discussions of this property are given in [2], [ 11,
and [3]. This paper simply states the appropriate rules.
Each eigenvalue %iobtained above represents the characteristic velocity at which
a particular wave mode propagates (such as advection waves, sound waves, and
Alfven waves). At a point on (say) the x, boundary, some number of the charac-
teristic velocities describe outgoing waves, while some of them describe incoming
waves. The behaviour of the outgoing waves is completely determined by data con-
tained within and on the boundary of Y, while the behavior of the incoming waves
is specified by data external to and on the boundary of V. The number of boundary
conditions which must be specified at a point on the boundary is equal to the number
of incoming waves at that point. We specify boundary conditions which determine
the values of -Iz:for incoming waves, and compute from definition (16) the values
of g for outgoing waves.
Let the volume V be defined by ai < ?cid hi. Then at all points with coordinates
(a,, x2, x3), compute dci from definition (16) for all cases where I,,< 0 and specify
from the boundary conditions the values of those Z for which %,> 0. Similarly, at
all points with coordinates (b,, x2, x,), compute z from definition (16) for all
caseswhere i, > 0, and specify from the boundary conditions the values of those 6”:
for which i, < 0. Note that the determination of -4c:from (16) will require one-sided
derivative approximations.
If the problem under study is sufficiently complicated, the number of boundary
conditions required at any point on the x, boundary may change with time, and
the number required at any time may vary with position on the boundary. Thus a
boundary treatment may have to respond to spatial and temporal changes in the
solution and adjust the number and type of boundary conditions as appropriate.
446 KEVIN W.THOMPSON

Some problems, however, are sufticiently simple that one set of boundary condi-
tions may be specified for all time. (The flow of a fluid next to a solid wall is such
a case.)
While the number of boundary conditions required is rigidly governed by the
interior solution, the type of each condition is not. The researcher has considerable
freedom to impose physically appropriate boundary conditions. The following
sections provide several examples of useful boundary conditions for common
problems in fluid dynamics.

3. FLUID DYNAMICS

The choice of conservative versus nonconservative forms of the fluid equations


depends on the problem to be solved. I will not discuss the relative merits of the
two approaches here, but will describe how to construct boundary conditions for
either case.The definitions of the Y: are independent of the choice of approach; the
choice of approach determines what to do with the L& once they are computed.

3.1. Conservative Equations


The fluid dynamics equations, in conservative form and rectangular coordinates,
are

~+~(Pu,)+~(Pu2)+~(Pu3)=0, (22)
1 2 3

~+~I(e+P)u,l+~[(rfp)u2l+~L(e+p)u3l-p 5 Ukgk=o, (23)


1 2 .3 k=l

am, a
~+~(m,~,)+~(m,~,)+~(m,~,)+~-~g,=O~ (24)
I 2 3 1

am, a
t+~(m2u,)+~(m2u2)+~(m2ul)+~-pg2=O; (25)
I 2 3 2

-;i;+r(m3u,)+~(m3u,)f~(m3u3)+~-pg3=0.
am, a (26)
I 2 3 3

where
3

e=kp C u~+E, (27)


k=l

P-(7- lb, (28)


mk=p”kj (29)
a@
(30)
gkr -ax,'
TIME-DEPENDENT BOUNDARY CONDITIONS, II 447

and where p is the mass density, p is the thermodynamic pressure, E is the thermal
energy density, y is the (assumed constant) ratio of specific heats, rnk is the xk direc-
tion momentum density, e is the total energy density (kinetic + thermal), @ is the
gravitational potential field, and g, is the gravitational acceleration. For many
problems @ and g, are specified functions of position, usually time independent.
For problems involving self-gravitating fluids, @ is obtained by solving Poisson’s
equation :
V2cD= 471Gp, (31)
where G is the gravitational constant.
The inclusion of gravitational fields introduces some ambiguity in the definition
of the total energy density, depending on whether one includes the gravitational
potential energy term p@ in the definition of e in (27). The gravitational potential
is omitted from the total energy for the following reasons:
1. Adding p@ to (27) requires putting p &S/at on the right side of Eq. (23),
which is difficult to evaluate for time varying gravitational fields.
2. The inclusion of a spatially varying field (CD)in the definition of the conser-
vative variable vector ij (in the e component), when that field does not appear as
a component of the primitive vector U, invalidates Eqs. (2) and (4). We would have
to replace these equations by
aU au aZra@
(32)
nt=px+z57t’
and
aFk au aFk a@
k = 1, 2, 3.
zg- -Q” &+zcix,’
(33)

While this substitution can be made, it seemsmore trouble than it is worth and will
not be done here.
The fluid equations given here are in the conservative form of (1 ), with

PUI PU2

(e+p)ul (e + PI ~2

mlul+p , F2S m2ul


mlu2 m2u2+p

mlu3 ‘i i m2u3 (

PU3 0
(e + P) ~3 -PC:=, Ukgk
F3 E m3u1 OE -Pgl
-Pgl

m3u2
m3u3 + p ’ i -Pi?2

- Pg3
448 KEVIN W. THOMPSON

Define the primitive vector U as

(35)

Then the Jacobian matrix P = &?/XJ of (3) is


1 0 0 0 0
fc:=, u: ll(Y - 1) PUI P42 P43

UI 0 p 0 0 (36)
u2 0 0 P 0

P= i u3 0 0 0 P 1

The primitive equations are then found to be


ap ap ap ap (37)
37+%3y+U’~+“‘~+p
1 2 3

ap ap ap ap
at+% ~+Uz~+“‘-gy+YP (38)
1 2 3

au, au,
li+u,2+u2gl+ 243z + -1 -ap - g, = 0, (39)
1 2 3 P axI

au2
~+u,~+u2~+u3~+~~-g2=o, (40)
I ’ 2 3 pax2

au3 au3 1 ap
x+u,g+u22+ u,dXj+---g3=0. (41)
1 2 pax3

Now we may set up the boundary condition analysis for the x1 direction. Write
Eqs. (37)-(41) as

(42)

as in (8), where A’ is

UI 0 P 0 0
0 Ul YP 0 0
u, , (43)
0 0 0 u*o
0
A’= i 0 0
l/p 0 00 u,
0i
TIME-DEPENDENT BOUNDARY CONDITIONS, II 449

and the C vector contains all remaining terms which do not involve elements of
au/ax1
The eigenvalues of A ’ are

E,, = u, -c, A2 = /I, = 2, = 24,) &=u, +c, (44)

where c is the speed of sound:

c==-.YP (45)
P

The left eigenvectors may be written

q= (0, 1, --PC, O,O),


1; = (2, - 1, 0, 0, 01,
1: = (0, 0, 0, 1, 01, (46)
1: = (0, to, 0, 11,
1; = (0, 1, pc, 0,O).

Eigenvalues 2, and I,, are the velocities of sound waves moving in the negative and
positive x1 directions; A2 is the velocity for entropy advection; while lb3and & are
the velocities at which u2 and u3 are advected in the x, direction.
Next form the quantities L$ from Eq. (16), and get

(47)

These definitions may be inverted to give


450 KEVIN W. THOMPSON

ap 1 Y2 1 - .L$ - &Yr
-=-T
ax, c [ u,+z ( u,+c+u,-c 11 ’
ap
_1
ax, -4”5
z
-( 2 u,+c+u,-c >’

(48)

Multiplying Eq. (42) by the left eigenvectors gives Eqs. (17) and (18). The
similarity transformation matrix S-l has as its rows the left eigenvectors l,? given
in (46), while the vector 3 has its components given in Eq. (47). The produce SY
which is required in Eq. (19) has the components

This result may be obtained by setting up and solving Eq. (21), or by substituting
Eqs. (48) for W/ax, in terms of 64 into the terms A’ XJ/ax, of Eq. (42). Either
way we end up with the primitive equations in the form

ap 1 s+;(g+g) +u2g+u3-+p
z+c’ iI3 (Z+Z)=o, (50)
[ I 2

ap 1 ap ap
~+IjM+%)+%~+%aX+.lP (Z+Z)=o, (51)
2 3
au
u1+1(~-~)+U2~+u3~-~,=o,
at 2pc
(52)
2 3

au2
~+Y3+u2~+u3~+---p2=o.
1 ap (53)
2 3 Pax2
au3
~+94+u2~+u3~+=-g3=o. (54)
2 3 P ax3
TIME-DEPENDENT BOUNDARY CONDITIONS, II 451

If only the primitive equations are desired, we can stop at this point. Otherwise
multiply the vector of Eqs. (50)-(54) by P to get (20) as

ap
;1+4 +~(P"')+~(P%~=o~ (55)
2 3
ae 1( C3 d >4+ - 4
z+2 + PU, 4 + pu2 4 + PU, 4
k=l Y-1

+$ C(f+P)u21+$ [(e+p)u31-p i ukgk=oy (56)


2 3 k=l

~+u,d,+pd,+~(m,u,)+~(m,u,)-pg,=O, (57)
2 3

~+u2d,+pd,+~(m,u,)+~(mlu,)+~-W,=O, (58)
2 3 2

~+u,d,+pd,+~(m,u,)+~(m,u,)+~i--Pfi,=O, (59)
2 3 3

where the di are defined in Eq. (49).


The fluid equations are written and evaluated in the above form at the x,
boundaries. The calculation of the g quantities depends on the boundary
conditions and is described below.

3.2. Boundary Conditions


Now we consider boundary conditions for only the x1 direction, as the other
directions are handled similarly. Let the solution domain in the x1 direction be
a, <x, 6 b,. For all points in a, <x, < 6, (the interior), solve Eqs. (22)-(26) or
(37)-(41) as written. For all points on x, =a, or x, = b, (the boundaries), solve
Eqs. (55)-(59) or (SO)-(54). The inhomogeneous and transverse derivative terms in
the boundary equations are evaluated by the same approximation methods as in
the interior.
The quantities z. are determined as follows: when the characteristic velocity Ai
points out of the solution volume, compute the corresponding dz:from its definition
in (47), using one-sided derivative approximations; when 1, points into the solution
volume, specify the value of g from the boundary conditions. Several useful
boundary conditions are derived below.
3.2.1. Slip Wall Boundary Conditions
At a slip wall (frictionless wall), the normal velocity component is zero at all
times, while the transverse velocities may be nonzero. Thus the initial data must
have u,I~,=~,=u,I~,=,,,=O.

581/89/Z-14
452 KEVIN W. THOMPSON

At xi =6i, II, = -c, L2=A3=&=0, and A,=c. Hence LZsmust be computed


from its definition in (47). Characteristic velocities 2 through 4 are zero, so the
choices for L??*through Yd are ambiguous; however, setting L& = L$ = J& = 0 is
consistent with the definitions in (47) and makes senseon physical grounds. Setting
J& = 0 means that the only entropy changes at b, are due to transverse advection,
while setting YX = L$~= 0 similarly means that the only changes to u2 and ug at b,
are due to the transverse terms in (53) and (54) which is reasonable at a frictionless
wall.
Y1 definitely represents an incoming wave, so we must specify its value. We do
so by requiring that ur( x, + = 0 for all time. Inspecting Eq. (52) we seethat ui will
remain zero if we set 9, = L&Z5 - 2pcg,. The slip wall conditions are
x1 = a, (24,= 0) x, =b, (2.41
=O)

(60)

3.2.2. No-Slip Wall Boundary Conditions


At a no-slip wall, not only is the normal velocity component zero, but friction
causes the transverse velocity components to be zero as well. The initial data must
have all velocity components zero at the wall, and the boundary conditions are
chosen to keep the velocity zero at all times.
We still have SC;,Y2, and L& as given in the previous section, but now choose
J& and dz),to force u2 = u3 = 0 at the wall. From Eqs. (53) and (54) we see that the
necessary conditions are L& = g, - (l/p) ap/ax, and L$ = g, - ( l/p) ap/&c,, where
ap/ax, and ap/ax, must be computed using the interior derivative approximation
methods, becausethey are in the transverse directions. The complete list of boundary
conditions is
x,=a, (u,=u,=u3=0) x,=b, (u,=u,=u,=O)

(61)
-rq=g2-lAk
Pax2
A+g2-;$
Y+--$ T4=g,--1c?p
Pax,
25 = 3, + 2pcg,
TIME-DEPENDENT BOUNDARY CONDITIONS. II 453

3.2.3. Free Boundary Conditions


The boundaries of a computational domain often do not coincide with walls, but
are simply the edges of some finite region, across which the fluid is free to flow.
I will call these free boundaries. The flow direction and velocity at a free boundary
will exhibit a wide range of behavior, depending on the local solution. The number
and type of boundary conditions required may vary from time to time or place to
place along the boundaries, even for one particular problem. Because the
appropriate boundary conditions are so problem dependent, it is not possible to
provide an exhaustive list, but a few useful examples and their derivations are given
below. Deriving boundary conditions is often simpler than determining which
conditions one ought to impose, and experimentation is usually necessary.

3.2.4. Supersonic Inflow

Supersonic inflow at x1 = b, is characterized by a1 < -c, so that all Ai < 0.


Consequently we must specify all values of L$ from boundary conditions.
Supersonic inflow is most often implemented as a steady state or near steady
state boundary condition, the latter case being one in which only the transverse
derivative terms may introduce a time dependence at the inflow boundary. If we
allow the transverse terms to have such an effect, then the near steady state
conditions are

x, = a, (24,> c) x1 = 6, (u, < -c)

% = -Px, z = -PGT1 (62)


22 = 0 92 = 0

x3= g2 -%=g,

=%=s3 %= g3

=% = P%l dc; = PQl

The initial data must also specify supersonic inflow at the boundaries, in order
to be consistent with the boundary conditions.

3.2.5. Supersonic Outflow

Supersonic outflow at x, = b, is characterized by u1> c, so that all Ai > 0. Conse-


quently we can specify no boundary conditions at all, and the evolution of the flow
at the boundary is determined completely by interior data. In this case we simply
compute all & values from their definitions in (47), using one sided approximations
to the derivatives.
Supersonic outflow at x1 = a, has uI < -c, so that all ii < 0, and all g values are
computed from their definitions in (47).
454 KEVIN W. THOMPSON

3.25. Subsonic Outflow


Subsonic outflow at xi = 6, is characterized by 0 < u1 < c, for which A1< 0 and
AZ-5 > 0. Thus we compute ZZ- 5 from their definitions in (47) and specify 9’i
according to some boundary condition. While there is no unique choice for Zi, the
following possibilities are often useful.
3.2.6.1. Nonreflecting boundary condition. This condition was described in some
detail in [l] and was first introduced correctly (for nonlinear equations) by
Hedstrom [6]. The nonreflecting boundary condition demands that the amplitude
of an incoming wave be constant in time. This condition is equivalent to stating
that there is no incoming wave, as it is the variation in amplitude which constitutes
wave motion.
If we drop the transverse terms, then the first component of (18) is the charac-
teristic equation

($-Pcg+%+Pcg,=o, (63)

where the expression in parentheses represents the time derivative of the amplitude
of the characteristic wave (see, for example, Whitham [3], or Landau and
Lifshitz [7], for a discussion of characteristic waves and Riemann invariants). The
wave amplitude remains constant if we set 9r = -peg,.
Thus the nonreflecting boundary condition for subsonic outflow is
xl=a, (-c<u,<O) x,=b,(O<u,<c)
(64)
=% = PQYl % = -peg,

with all other 9 i values being computed from (47).


Nonreflecting boundary conditions are well suited for problems in which a
rarefaction wave propagates out of the boundary and into a previously undisturbed
medium, or in general for problems in which nothing useful is known about the
external solution and the suppression of incoming waves seems like a reasonable
choice of boundary condition.
3.2.6.2. Force-free boundary condition. For some problems the nonreflecting
boundary condition is inappropriate. The “correct” solution implicitly contains an
incoming wave which must not be suppressed.This situation most often arises when
the real solution exterior to the model volume is changing in time and must
communicate its behavior to the interior through the boundaries.
In the absence of more knowledge about the exterior solution, one approach to
this case is to apply a boundary condition which sets to zero the sum of all forces
acting on the fluid in the direction normal to the boundary. This choice effectively
eliminates all normal terms except the advective term uI &,/ax,, so that a fluid
element at the boundary is simply advected outward at the fluid velocity.
TIME-DEPENDENT BOUNDARY CONDITIONS, II 455

From Eq. (39) we see that imposing a zero net force in the x1 direction requires
that

(65)

which gives the boundary conditions


x1=a, (-c<u,<O) x1 = 6, (0 < u1-c c)
(65)

A good example of when the force-free condition is useful is the case when a
pressure equilibrium (or other zero net force) exists at the boundary. A pressure
equilibrium is maintained by the propagation of sound waves, which serve to
equalize the pressure across the boundary; therefore the exterior solution must
communicate this equilibrium to the interior. In this case fluid elements follow
“ballistic” trajectories. The homologous expansion of a uniform gas [ 1] is such a
problem, for which the nonreflecting boundary conditions destroy the pressure
balance.
3.2.6.3. Constant pressure boundary condition. There are some problems for
which a particular constraint must be satisfied. This section describes the case
where the pressure is known to be constant at the boundary. Other such conditions
may be handled in a similar fashion (as was the case of zero normal velocity
previously).
It is usually the case the one wants ap/at = 0 in the absence of transverse effects,
but not otherwise. This condition is satisfied if & + 5?‘r= 0, giving
x,=al (-c<u,<O) x,=b, (O<u,<c)
(67)
q= -9, g = -g

3.2.7. Subsonic Znjlow


Subsonic inflow at x1 = b, is characterized by -CC ui ~0, so that A,-,<0 and
A, > 0. Thus we compute Y5 from its definition in (47) and must specify the other
3 from boundary conditions. The value of .Yi may be determined by any of the
methods in the previous sections, or any other similar condition. This section will
focus on the determination of LZ*, -rt;, and YZ.
3.2.7.1. Nonrejlecting boundary conditions. For most problems of subsonic
inflow, nonreflecting boundary conditions work well enough in the specification of
9 2-4. T2 describes the inflow entropy, so setting SC;=0 states that the inflow
456 KEVIN W. THOMPSON

entropy is constant in the x, direction. Setting L& = g, and gb = g, will hold the
u2 and u3 velocities constant in the absence of tangential effects.

x1=a, (O<u,<c) x1=b, (-c<u,<O)

Yi from Section 3.2.6


(68)

dc; from Section 3.2.6 -4c;= A5

Note that any of these conditions may be used in conjunction with any of the
conditions from the previous sections.
3.2.7.2 Constant massjlux. Some problems assume mass flux pu, at the inflow
boundary. If the correct mass flux is specified initially, then it will be maintained at
later times if

-$m,)=p~+u,
$0,
From (50) and (52), ignoring tangential effects, we get

2u,Lz2 + (2.4,- c) 2, + (241+c) 25 = 2pc2g,, (69)

which gives
x,=a, (O<u,<c) x,=b,(-c<u,<O)

6/; = ~C~PC2~,-2U,~-~U,-C~Y,1 Yl =- 1 [2pc*g,-2u,~-(u,+c)~]


1 u1-c
(70)

assuming that T2 has been specified. If Y: is not known, then we might specify L?,
(or Y,,) from one of the methods of Section 3.2.6 and solve for P2 from (69) as
x,=a,(O<u,<c) x,=b,(-c<u,<O)

Iri=~c2Pc~g~-(u~-c)~-(u~+c)~l spz = $ [2pc2g, - (Id1 -c) q - (u, + c) qtp53


1 1
(71)
TIME-DEPENDENT BOUNDARY CONDITIONS, II 457

Note that (70) could be used as an outflow boundary condition in principle,


since it involves 9, and Y5. In practice, however, one normally wishes to fix the
mass flux at an inflow boundary, not an outflow boundary.

4. NUMERICAL IMPLEMENTATION

Space limitations preclude a comprehensive set of computational examples for all


the boundary conditions described in this paper. However, I will present a general
numerical solution for a system of fluid dynamics equations, including the
implementation of the boundary formalism. The reader is referred to the previous
paper [l] for sample problems.
The complete implementation breaks down into two parts: the calculation of
time derivatives based on the current solution and the integration of time
derivatives to obtain a future solution.

4.1. Computing the Time Derivatives


Let the computational volume -Y- be defined by a,< x, 6 b,, 1= 1,2,3. For
simplicity, discretize the solution on a uniform grid with grid spacings
Ax1= (b, - a,)/N,, so that x,, = a, + i Ax,, i = 0, 1, .... NI, with X~ = a, and x,~, = b,.
Thus the interior points in the Zth direction are denoted by 0 < i < N,, while the
boundary points have i = 0 or i = N,. Any function f = j-(x1, x2, x3) is represented
in discrete form as fVk ~f(x,~, xy, x~~).
The calculation of time derivatives in the interior consists simply of approxi-
mating the spatial derivatives in Eqs. (22)-(26) or (37t(41) with some suitable
numerical scheme, and evaluating the inhomogeneous terms, at the interior points.
Of the many approximation methods available, finite difference methods are the
simplest and will be used here. The accuracy of a finite difference method is
described by its order of convergence, i.e., by the power of Ax at which its error
vanishes in the limit as Ax -+ 0. The higher the order, the more accurate the
approximation.
A globally second-order accurate scheme may be achieved by using the
approximations

af
- i= 1, .... N, - 1; (72)
ax, ijk =l-(fi+ljk-L-ljklr
2 Ax1

(73)

(74)

and similarly for the x2 and x3 directions.


458 KEVIN W. THOMPSON

A globally fourth-order accurate scheme may be achieved by using the


approximations

af
-ax zL [8(~+1jk-fi~Ijk)-(fr+2ik-fr--jk)l,
I i,k 12 Ax,
i = 2, .... N, - 2; (75)

fi =& C18(fi,k-fOlk)-9(f2jk-fOjk)+2(f~j~-fOjk)l; (76)


1 OJk I

af
- =L [2(fijk-f~jk)+6(f2jk-f?ik)-(f?ik-f?ik)1; (77)
axl Ijk 6 Axl

af
=L [2(fN~jk-fN~-~jk)+6(fN~-~~k-fN~-~jk)
ax, N,-ljk 6Ax,

-(fN,-I]k-fN,-3jk)l; (78)
af
=L [18(fNljk-fNI~Ijk)-9(.fN,,k-fN,-2jk)
dx, N,Jk 6 Ax,

+2(fh’ljk-fNI-3jk)l; (79)

and similarly for the xz and x3 directions.


The global order of convergence may be one greater than the order of con-
vergence of the approximations used at and near the boundary. Thus Eqs. (72)-(74)
will yield a globally second-order scheme,even though Eqs. (73)-(74) are first-order
accurate; similarly, Eqs. (75t( 79) will yield a globally fourth-order scheme, even
though Eqs. (76)-(79) are third-order accurate. In each case the order of the scheme
away from the boundaries is one higher than the order at and near the boundaries,
and the global order is the same as that of the scheme away from the boundaries.
It is sometimes the case that using boundary approximations which are the same
order as the interior scheme (second or fourth here) will lead to an unstable
solution, which is why the boundary approximations are of lower order than the
interior approximations in the above formulas.
At the x1 boundaries (i = 0 or i = N,) the fluid equations are put in the form of
(50)-(54) or (55)-(59). The transverse derivatives and inhomogeneous terms are
evaluated with the same approximation methods used for the interior, as these
quantities do not require information external to the model volume for their
evaluation.
The normal (x,) derivatives are subsumed into the definitions of the -4L:
quantities. Those L$ for which the corresponding characteristic velocities Ai are
directed out of the model volume are evaluated from their definitions in (47), using
one-sided approximations (73), (74), (76), or (79) for the spatial derivatives.
The remaining z values are determined from the boundary condition formulas of
Section 3.2.
TIME-DEPENDENT BOUNDARY CONDITIONS, II 459

Complications arise at corner points, where two or three coordinate directions


require boundary conditions simultaneously. In this case (supposing that all three
directions are involved) we perform the characteristic analysis for each coordinate
direction, and obtain quantities ~2’~and 4 for the x2 and x3 directions which are
analogous to L$ for the x1 direction. The x2 and x3 derivatives are then replaced by
the appropriate linear combinations of ~2’~and J+$quantities. The values of ~2; and
J$$are then determined by one-sided derivatives or boundary conditions, depending
on the values of the corresponding characteristic velocities pi and vi in the x2 and
x3 directions. (Note that p1=u2-c, ~2=~3=~4=u2, p5=u2+c; v1=u3-cc,
v2=vj=vq=u3, v,=u,+c.)

4.2. Integrating the Time Derivatives


The solution is discretized in time as well as space. Given the solution at the
current time step n, where t = t”, we wish to compute the solution at time step
n+l, where t n+’ = t” + At. The time step size At must normally be less than a
certain upper limit, which is described below, and usually varies during the course
of the calculation.
Having computed the time derivatives da,/dt (say) at all grid points, we are
free to integrate the time derivatives from time t” to time tnf ’ with any suitable
ordinary differential equation solver. The constraints on the integrator to be used
are that it must be stable for reasonable time steps and must be sufficiently accurate
for the purpose at hand. The accuracy of a time integration method is also
described by its order of convergence, i.e., by the power of At at which its error
vanishes in the limit as At+ 0. The higher the order, the more accurate the
integration.
For time dependent calculations the accuracy of the numerical solution to a
system such as the fluid dynamics equations is described by the global convergence
rate. If we let Axl+ 0 and At + 0 while keeping Ax,/At constant (i.e., at a fixed
Courant number), then Ax, cc At and the norm of the error in the solution at any
fixed time also goes to zero as some power of At, that power being the global order
of convergence. If the spatial derivative approximations and the time integration
have different orders of convergence, then the global order of convergence is the
lesser of the two. Thus it is desirable to match the orders of convergence of the
spatial derivative and time integration schemes for optimum accuracy and
efficiency. Otherwise some effort is wasted in the calculation of some quantities to
excessively high accuracy.
An exception to the matching rule occurs when the purpose of the calculation is
to achieve a steady state solution, for which the preceding time dependent solution
is of no interest. In this case one should choose a simple (and consequently fast)
low order time integration scheme to minimize the calculation time required. Once
a steady state has been achieved, the time derivatives are zero and the order of the
time integration is irrelevant, and the global order of convergence is simply the
order of the spatial derivative approximation.
460 KEVIN W. THOMPSON

One of the simplest and most efficient fourth order time integrators is the classic
fourth-order Runge-Kutta method, which may be written

nj:,r=pk+‘nt-
2
duvk
dt

(or similarly for U, if a nonconservative (primitive) form has been chosen for the
fluid equations). This scheme should be used along with the fourth-order spatial
derivative approximations to achieve a globally fourth-order convergent calcula-
tion. (For a suitable second-order integrator, see Cl].) Note that d~ok/dtl@” refers
to the time derivative of U at the grid points (xii, xzj, x~~) as computed from the
intermediate step solution a(-).
The time step At is given by

l’liikl + ctjk + b,ijkl + cijk + b+kl + cijk


(81)
Ax, Ax2

where (T (the “Courant number”) may be given any value <2.0612..., which is the
maximum stable limit [2]. Values of (T= 0.5 or CJ= 1 are conservative and normally
work well.

5. CONCLUSION

This paper has presented a unified framework for specifying boundary conditions
for systems of hyperbolic equations. The framework is flexible enough to encompass
virtually any type of boundary condition. Many useful conditions have been
derived for common problems in computational fluid dynamics.

ACKNOWLEDGMENTS

This work has been done in part under the auspices of a special NASA astrophysics theory program
which supports a joint Center for Star Studies at NASA Ames Research Center, U. C. Berkeley, and
U. C. Santa Cruz. This work has also been supported by the Center for Turbulence Research, a joint
program between NASA Ames Research Center and Stanford University.
TIME-DEPENDENT BOUNDARY CONDITIONS, II 461

REFERENCES

1. K. W. THOMPSON, J. Comput. Phys. 68, 1 (1987).


2. K. W. THOMPSON, Lecture Series in Computational Fluid Dynamics, NASA Technical Memo
TM100010 (Government Printing Ofice, Washington, DC, 1987).
3. G. B. WHITHAM, Linear and Nonlinear Waves (Wiley, New York, 1974).
4. R. COURANT AND K. 0. FRIEDRICHS, Supersonic Flow and Shock Waves (Springer-Verlag, New York,
1948).
5. T. C. VANAJAKSHI, K. W. THOMPSON, AND D. C. BLACK, J. Comput. Phys. 84, 343 (1989).
6. G. W. HEDSTROM. J. Comput. Phys. 30, 222 (1979).
7. L. D. LANDAU AND E. M. LIFSHITZ, Fluid Mechanics (Pergamon, Elsmford, NY, 1959).

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy