CARVER, Pseudo Characteristic Method of Lines Solution of First Order Hyperbolic Equation
CARVER, Pseudo Characteristic Method of Lines Solution of First Order Hyperbolic Equation
CARVER, Pseudo Characteristic Method of Lines Solution of First Order Hyperbolic Equation
North-HollandPublishing Company
M.B. CARVER
Atomic hnerg? o/Canada I.td., Chalk River Nuclear Laboratories. Chalk River, Otltario KOJ IJO, Canada
l This paper was presented at the 3rd IMACS International Symposium on Computer Methods for Partial Differential
Equations held at Lehigh University, Bethlehem, Pennsylvania, USA, on tune 20-22, 1979.
30
MB. Carver i Pseudo-charactrristic method of iincs 31
finite difference method of lines evolves with However, by transformation, equations (5) may be
[Al=[Il, otherwise, if (2) is applied in an implicit written in a form to which the application of (6)
weighted residual sense, a finite element method of gives entirely stable results.
lines evolves, and [Al is banded and symmetric except
for the particular case of upwind weighting'. It is convenient to change variables to s = gh and
c = /s such that the matrices now become
In either case, the resulting ODES may be integrated
by an efficient digital algorithm which will normally
vary the time step as integration progresses to obtain $ = [j, Al = E ;], G1 = [;x] (7)
optimal compliance with an imposed tolerable error
-1
limit. Performing a similarity transform BA B to extract the
diagonal eigenvectors gives:
The method of lines is extremely flexible as it com-
prises an infinite number of combinations of spatial
approximation functions and integrators, any of which
may be applied to the same equation system. The (8)
equations are programmed in general form, and the
appropriate combinations are selected to operate on
the equations to produce the solution.
Expanding (8) gives the characteristic form
In particular, for hyperbolic equations, a number of
directionally weighted schemes may be developed.
c e + 2 + ("+c)(c g + E) + gcyx = 0 (94
Several of these, including upwind Lagrangian, Hermite,
spline, and weighted residual are reviewed for "se
with the advective equation in reference 3.
c g - g + (u-c)(c $ - E) + gcyx = 0 (9b)
This paper extends the same approach to coupled PDE
systems by identifying the characteristic directions The requisite directional weighting for equations (9a)
and transforming the resulting matrix equations into and (9b) is now dictated by the sign of (u+c) and
an explicit form. (u-c) respectively. Following Hancox et al' one can
assign a directional difference scheme for the spatial
THE PSEUDO-CHARACTERISTIC METHOD OF LINES derivatives of each equation, invert the B matrix and
integrate the equations
(a) Incompressible Fluid Flow
Gt = -B-?J?B@~ - G} (10)
For simplicity, the method is first illustrated for
two equations describing the flow of fluid over an
It is a simple matter, however, to obtain an explicit
isolated ridgelo. If m is the mass flux, h, the
definition of $I which is fully equivalent to (10) by
depth, and y is the local slope of the ridge, these
performing the katrix inversion analytically. When
equations ma? be written in conservation law form as
derivatives originating from (9a) and (9b) are des-
ignated + and -, to show differentiation will be in
g [@I + 2 [F($)l = D(0) the direction dictated by the component along (u+c) or
(u-c) respectively, this gives
where
~+;(~+~,+*(&+&)+
+ - + -
$+],Fz [f+'],D=[-p]
+~(~-~)++&+)+ghyx=O
- - + -
the primitive form follows directly,
g+? (s+$)
au +g+c,
+ - + -
(5) +z$&_&, +$(&-$) =o (11)
ah+h&+"ah=, + - + -
at ax ax
Using both symmetric and assymmetric differentiation Note that only terms involving (u+c) and (u-c) have
formulae, Heydweiler and Sincovecg were unable tn been directionally differentiated, y, is not a depend-
obtain stable solutions to equations (5) until they ent variable.
added an arbitrarily large second derivative artificial
dissipation term to each of the equations (5). One may now solve equations (11) directly by the
Principally this is because it is impossible to method of lines, incorporating any suitable direc-
develop a rationale for assigning a directional bias tional approximation to the derivatives, such as (6)
to any spatial derivative term in the primitive form or the higher order methods reviewed by Carver and
of equation (5). In fact, waves propagate in both Hinds3.
directions and the obvious upwind difference scheme
used for single equations. the simplest form of which It is instructive first to apply the simplest first-
expresses terms such as order formula (6) to equations (11). Thus if
aw (w~-wi_l)
Q =s uipi - P~_~~)/Ax (6) -= and a~
&J
=
(wi+l-wi)
(12)
ax+
ax
AX AX
2 2
2 + " $ + $- + cAx q + ++ = ghyx
c ax c ax The similarity transform again produces the character-
c istic form. D=O is now used merely for brevity.
(14)
2 2
g + c2 +- + u & + ucAx 2 + cAx Q = 0
a a
ax Bz$+"Bx@=BD
c c ax axf
Note that equations (14) are now the primitive form of
the equations (5) plus explicitly defined dissipative (19)
terms, all expressed to second-order accuracy.
Similar expressions may be derived starting with
or
higher-order expressions in place of equations (13).
In particular, the two most accurate explicit formu-
au ap au ap
lations reviewed in reference 3 may be used readily (r x + s + (u+c)( P x + jy) = 0
with equations (14). They are the four-point upwind
Lagrange form
=2 ap _ g
at + (C 2 zap - ix,
ax = 0 (20)
&"(I)) = SI(U(I-2SI) - 6U(I-SI)
-p-+-+ au ap (-c)(-pg+g) = 0
+ 3U(I) + 2U(I+SI))/6Ax (15) at at
and the three-point upwind Hermite expression Explicit equations for au/at, etc. may now be obtained
by inverting the B matrix and assigning the subscripts
&J(I)) = sI(u(I+sI) + 4U(I) +, ., - to derivatives to be computed according to the
directions dictated by the (u+c), u, (u-c) vectors
respectively.
- SU(I-SI))/4Ax - + 2 (U(I-SI)) (16)
2
. Houghton
The example used by - and Kasahara. and Heydweiler g + ;(g + g) + %(& + $-)
and Sincovec will be used. This is equations (5) with + - + -
100
X COOROINRTE X COOROINRTE
The correct formulation of boundary conditions in W.T. Hancox and S. Banerjee, "Numerical Standards
systems of conservation equations causes considerable for Flow Boiling Analysis", Nucl. Sci. & Eng. 64
concern, as the number, location, and form of boundary (1977) 106.
restraint is not always apparent from the physics or
the mathematics, and an incorrect formulation will D.H. Herron and D.U. Von Rosenberg, "An Efficient
obviously destroy the solution. One recourse is to Numerical Method for Solution of Convective
avoid the problem altogether by banishing the bound- Transport Problems with Split Boundary Condi-
aries to infinity, and while this has been done in tions", Chem. Eng. Sci. -21 (1966) 337.
references 9 and 11 for the two examples quoted here,
such an approach is not helpful for applied problems. J.C. Heydweiler and R.F. Sincovec, "A Stable
Difference Scheme for the Solution of Hyperbolic
Although the presence of three first-order equations Equations Using the Method of Lines", J. Comp.
in three variables suggests that three boundary Phys. z (1976) 377.
restraints are required, in fact this is not so. The
number and nature of the boundary conditions is dic- D.D. Houghton and A. Kasahara, "Nonlinear Shallow
tated by the flow configuration at any given instant, Fluid Flow Over an Isolated Ridge", Comm. Pure &
or more particularly the number and direction of the Appl. Math. -XXI (1968) 1.
characteristics at each boundary. Thus, a straight
flow through situation in a pipe requires two boundary G.A. Sod, "A Survey of Finite Difference Methods
conditions at the inlet, and one at the outlet, a for Systems of Nonlinear Hyperbolic Conservation
closed pipe with outflow requires one at each end, and Laws", J. Camp. Phys. 11, 1 (1978) 1.
a pipe experiencing inflow through both ends at any
given instant requires four conditions, these numbers R. Vichnevetsky et al., "Mean Square Measure of
being the number of outward pointing characteristics the Effect of Artificial Viscosity", Advances in
at each boundary for each situation, or equally the Computer Methods for Partial Differential Equa-
number of simple directional difference analogs(l2) tions II, R. Vichnevetsky, Editor, IMACS Press,
which are not satisfied within the pipe. It is thus Rutgers Univ. (1977) 119.
obvious that any scheme which is to cater for possible
flow reversal must not only represent this adequately
in the differencing scheme, but must also permit
dynamic change in the number and type of boundary
conditions. The pseudo characteristic method permits
both these operations to be performed automatically.
CONCLUSION