free surface flow — exposing the hidden nonlinearity

8
COMMUNICATIONS IN APPLIED NUMERICAL METHODS, VOl. 4, 509-516 (1988) FREE SURFACE FLOW - EXPOSING THE HIDDEN NONLINEARITY JAMES A. LIGGETI Cornell University, Iihaca, New York, U.S.A. SUMMARY Most calculations of free surface flow use an inconsistent equation. The inconsistency comes about through the need to apply the boundary conditions on the known boundary instead of on an unknown (advanced time step) boundary. That condition represents a nonlinearity and its treatment should be made consonant with that of the other nonlinearities. Although algebraically difficult, that nonlinearity can be treated in a rational manner with the result that the accuracy is improved. INTRODUCTION Free surface problems, by definition, are characterized by a changing solution region. In contrast to the normal boundary-value problem, part of the boundary conditions must be applied at a moving boundary, the location of which is unknown and part of the solution. That fact constitutes a nonlinearity which is more of an obstacle to the solution than the more obvious nonlinearities often contained in the equations which describe the problem and express the boundary conditions. In the development of a perturbation series which contains linear equations for increasingly higher order terms,' that nonlinearity must be explicitly recognized for the second-order and higher equations. Most numerical methods, however, have ignored it in the calculation. Exposing the nonlinearity can lead to a more logical and accurate calculation. WAVES AND GROUNDWATER Two of the most common free surface calculations are those of water waves (or free surface hydrodynamics in general) and flow in porous media. Both are governed by a simple equation, the Laplace equation, in-which @ is the velocity potential and x and y are the horizontal and vertical co-ordinates, respectively, Both cases have nonlinear boundary conditions that are to be applied to the free surface. For the hydrodynamics problem, the free surface conditions are 1 a@ an at cos p an ony= r\ (3) - - - _ _ ~ - where t is time, B is the Bernoulli constant, g is the acceleration of gravity, q is the elevation of the free surface and is unknown except at the initial time, p is the angle the free surface makes with horizontal, and n is the outward unit normal to the free surface. The first condition expresses the fact that the pressure is constant (usually atmospheric, assuming no surface tension) on the free surface and (3) is the kinematic condition which denotes that the free surface is a material surface. For porous media flow, (2) becomes the much simpler relationship: 0748-8025/88/040509-08$05.00 0 1988 by John Wiley & Sons, Ltd. Received 5 March 1987

Upload: james-a-liggett

Post on 11-Jun-2016

220 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Free surface flow — exposing the hidden nonlinearity

COMMUNICATIONS IN APPLIED NUMERICAL METHODS, VOl. 4, 509-516 (1988)

FREE SURFACE FLOW - EXPOSING THE HIDDEN NONLINEARITY

JAMES A . LIGGETI

Cornell University, Iihaca, New York, U.S .A.

SUMMARY Most calculations of free surface flow use an inconsistent equation. The inconsistency comes about through the need to apply the boundary conditions on the known boundary instead of on an unknown (advanced time step) boundary. That condition represents a nonlinearity and its treatment should be made consonant with that of the other nonlinearities. Although algebraically difficult, that nonlinearity can be treated in a rational manner with the result that the accuracy is improved.

INTRODUCTION

Free surface problems, by definition, are characterized by a changing solution region. In contrast to the normal boundary-value problem, part of the boundary conditions must be applied at a moving boundary, the location of which is unknown and part of the solution. That fact constitutes a nonlinearity which is more of an obstacle to the solution than the more obvious nonlinearities often contained in the equations which describe the problem and express the boundary conditions. In the development of a perturbation series which contains linear equations for increasingly higher order terms,' that nonlinearity must be explicitly recognized for the second-order and higher equations. Most numerical methods, however, have ignored it in the calculation. Exposing the nonlinearity can lead to a more logical and accurate calculation.

WAVES AND GROUNDWATER

Two of the most common free surface calculations are those of water waves (or free surface hydrodynamics in general) and flow in porous media. Both are governed by a simple equation, the Laplace equation,

in-which @ is the velocity potential and x and y are the horizontal and vertical co-ordinates, respectively, Both cases have nonlinear boundary conditions that are to be applied to the free surface. For the hydrodynamics problem, the free surface conditions are

1 a@ an at cos p an o n y = r\ (3)

- - - _ _ ~ -

where t is time, B is the Bernoulli constant, g is the acceleration of gravity, q is the elevation of the free surface and is unknown except at the initial time, p is the angle the free surface makes with horizontal, and n is the outward unit normal to the free surface. The first condition expresses the fact that the pressure is constant (usually atmospheric, assuming no surface tension) on the free surface and ( 3 ) is the kinematic condition which denotes that the free surface is a material surface. For porous media flow, (2) becomes the much simpler relationship:

0748-8025/88/040509-08$05.00 0 1988 by John Wiley & Sons, Ltd.

Received 5 March 1987

Page 2: Free surface flow — exposing the hidden nonlinearity

510 J . A . LIGGE'IT

@ = q ony = q (4) Only the second case, that of porous media, is considered in detail in this paper

THE PATHOLOGY

The same considerations hold for any numerical method of solution. By far the easiest of the solution techniques for free surface is flow is the boundary element method. The outstanding advantage is that the solution grid is only on the boundaries of the region. As the free surface moves, the grid can easily be reformulated without grid entanglement and without distorted elements. In the development that follows, the details of the free surface nonlinearity using the boundary element method are algebraically complex; using a grid method the details would be hopeless entangled in the algebra.

In all cases the application of the boundary element method leads to a set of simultaneous equations in the potential, @, and its normal derivative, d@/an. These equations are of the form

[R]{@} = [L]{d@/dn} ( 5 ) in which [R] and [ L ] are the coefficient matrices and are functions only of the geometry of the solution region. For all solid boundaries, either @ or dWan are known and (5) serves as an equation for the unknown quantity; for the free surface, both are unknown at the advanced time step and the discretized form of (3) and (4) close the set of equations. Discretizing ( 3 ) gives

in which k is the time step (where t=kAt), and 0 ( 0 5 8 ~ 1 ) is a weighting factor which positions the derivative between the time steps.

The usual method of solution is to write (5) at the k + l (unknown) time step assuming that the solution has progressed to the k time step,

[R]{w+~> = [ ~ ] { a @ k + */a n> (7) When (6) is substituted into (7) for the parts of the boundary that constitute the free surface. the remaining unknown on the free surface is the normal derivative at the advanced time step, k + l .

The difficulty is that the geometry is known only at time k ; thus, the [R] and [ L ] matrices are calculated at time k leading to the inconsistent equation

[Rk]{@k+'} = [L"]{d@"+'/dn} (8) Of course, the entire equation can be written at time k , but then the potential at k + l would be calculated from (6) with 8=0. That simple Euler time step would prove to be inaccurate. The inconsistency in (8) is tacit recognition of the nonlinearity involved in applying the boundary condition to an unknown free surface.

Nevertheless, (8) has been successfully used for the solution of many problems in both porous media and hydrodynamics. Occasionally a problem occurs where the method does not work well. The purpose of this paper is to derive a consistent boundary element equation similar to (8). That equation is of the form

[Rk+"]{@k+l} = [Lk+'] {a@k +'/an} (9) where the [R] and [ L ] are computed using the unknown geometry to an approximation which is compatible with a set of linear simultaneous equations. Since the [R] and [ L ] depend on only the geometry of the region, they must be found by integrating along the unknown free surface.

INTEGRATION ON THE UNKNOWN GEOMETRY

A standard technique for the discretization of the boundary elements into a local co-ordinate system is shown in Figure 1 . The point i is the base (source) point and points j and j+l are the nodes on the ends of a linear element (target or field points). Then the boundary integral equation is written

Page 3: Free surface flow — exposing the hidden nonlinearity

FREE SURFACE FLOW 511

I i X

Figure 1. Local and global co-ordinate systems for the element from node j to node j+l. The origin is in the base point, i, with the .$-axis parallel to the element

in which CY is the angle between elements and the local co-ordinate system is shown on Figure 1. Equation (10) has assumed linear interpolation of both @ and aWdn on conforming elements. Collecting terms as coefficients of @ and a@/& yields

aj ( -zy + t,+,Z?) + @j+l(l;l - 5 Z?) (1 1) j = I

in which the I-terms are the integrals2

rlij

1 r l i j

Page 4: Free surface flow — exposing the hidden nonlinearity

512 J . A. LIGGETI

The boundary-element equation equivalent to (9) is

a;"+'@;"" = 7 [@:+l[P + q l S y J + q l + l S y l + l + q j i y , ]

+ @f::[ Tb + T$,SYI + T$/ + I Syj+ I + T$,Syi]

in which the following abbreviations are used:

(17) T" = -111 r, + [ ,+ l I t2

7c = $' - Tb = I" I, -

.Td = -1;' + and the subscripts on the T represent partial differentiation with respect to y,, y,+ or y,. Although the derivatives are taken with respect to the global co-ordinates, the T are expressed in local co- ordinates in (12)-(15). The chain rule is used for the differentiation,

with a similar calculation for the other derivatives. In all there are nine derivatives of the local co-ordinates with respect to the global co-ordinates:

wfll,> t,? &+ 1 )

aO,?Yl>Y,+I) and twelve derivatives of the fundamental integral expressions with respect to the local co-ordinates:

At this point all the terms of (16) are defined. The variables written at time step k+l are replaced according to

Q k + l = @ + A@ (19)

The Sy are zero except where the index indicates a free surface node. On the free surface the Sy are replaced by A@ according to (4). Only first-order terms in the A-quantities are retained. The result is

Page 5: Free surface flow — exposing the hidden nonlinearity

FREE SURFACE FLOW 513

(22)

= elGI - T' + Tb aJ+ I + F -- a@, - i an + F A - + T ~ A - 8'J -

an

in which the A@ are the unknowns and the @ without a superscript are ak, the quantity at the known time level.

Both the fundamental integrals and their derivatives contain singularities when the source point (base point) falls on the target element; that is, when i=j or i=j+ 1. Using the analytic integrations in (12)-(15), the singularities in the integrands cause no problem. When these equations are differentiated, however, many of the derivatives contain logarithms, the arguments of which go to zero, or divisors which go to zero. The limits process yields the following results:

i = j i= j + 1

T;, + Ttj+ I

Ttj+ 1

T;,

1 L -

0 0

1 L

-~

0 1 L

1 L

- -~

0

in which L is the length of the target element. In the first two lines, either quantity alone is hopelessly singular, but 6yl=6yJ when i=j and 6yj=6y,+ I when i=j+ 1 ; thus, the two quantities can be added and the singularities cancel. The same is true of the T" quantities which are summed.

Equation (16) serves in place of the usual boundary integral equation for the unknown at the advanced time step. That equation must be assembled with the free surface and solid surface boundary conditions once the T-terms and their derivatives are used.

LOCAL CO-ORDINATE SYSTEM

In order to complete the definition of the fundamental quantities, the local co-ordinate system (Figure 1) is presented in this section. It is

Expressing the changes in the local co-ordinates in terms of changes in the global co-ordinates yields expressions as, for example,

Page 6: Free surface flow — exposing the hidden nonlinearity

514 J . A. LIGGEIT

Finally, the angle between the straight-line elements is

which also must be differentiated with respect to the global co-ordinate system in a manner similar to (18).

DERIVATION AND CALCULATION

The primary difficulty with the derivations of the final equations is the prodigious amount of algebra, even though the final results are not too long. The process of derivation is made practicable by symbolic manipulation on the computer. In this case MACSYMA was used.3 The primary derivatives were taken directly and checked by expansion of the functions in a Taylor series. The derivatives that appear in the computer program make use of (18) and the similar expressions for the other quantities. They were checked numerically by expressing the fundamental integrals in global co-ordinates and taking the derivatives directly. The results of the latter operation were extremely long and would be inefficient for a numerical calculation, but they served the purpose of providing a nearly independent check, a check that would not have been possible without MACSYMA or a similar program.

Although MACSYMA can perform a number of functions such as integration, differentiation, expansion in a Taylor series, taking of limits, etc., its chief attribute is simply the ability to perform large-scale algebraic manipulation without making a mistake. (That is not to say that one does not make mistakes using MACSYMA. Just as with any computer operation, the integrity of the result is dependent on the accuracy of the input. Also, inappropriate operations lead to inappropri- ate results.) Thus, long algebraic expressions can be manipulated and simplified. Simplification, however, seems to be the Achilles' heel of MACSYMA. There is no mathematically precise definition of simplification; moreover, the program fails to find deeply inbedded factors, or partial factors, which lead to shorter expressions. Finally, MACSYMA will write the expressions into FORTRAN code which can be transferred directly to a program for the numerical computations, thus saving another step which often leads to error. The total process relieves the analyst of the drudgery of the algebra and eases the endless checking of the results.

The computer program using the integration at the advanced time step (SURF) is substantially the same as that of the previous method (FRSURF). The length of the integration subroutine has doubled with, perhaps, four times the previous number of arithmetic operations. Thus, there is a penalty to pay in terms of integration time.

The accuracy is difficult to determine since there are no exact solutions to the nonlinear problem. The computer program prints at each time step the mass error in the step and the accumulation of mass errors, both in absolute value and as a percentage of mass in the system. It obtains these errors by determining the inflow and outflow from the system and integrating under the free surface to find the storage. The mass error is used as an indication of the accuracy of the calculation.

The increase in accuracy appears to compensate for the time increase when using the exposed nonlinear calculation. Figure 2 shows the time step mass error in the calculation of a simple case in which the free surface is initially displaced and then released so that it finally become level. The decrease in the error with time occurs because the free surface displacements become smaller as equilibrium is approached. The accumulated mass error is shown in Figure 3. Both programs were run with a weighting factor of 6=1, as that produced the least mass error in both cases. Incomplete initial conditions were supplied to both programs in that the normal derivatives on the free surface were assumed zero at the initial time; however, the programs performed a zero time step (At=O) to find better initial conditions.

Page 7: Free surface flow — exposing the hidden nonlinearity

FREE SURFACE FLOW

0:o 0:2 014 0:s 1

515

.o

1 Using SURF; Time step = 0.1

Using FRSURF

t ] I 0 I I , I , I I ~ , , , ( , , , , , , , ' 010 0.2 0.4 0.6 0.8 1 .o

Time

Figure 2. Error plot for the old free surface calculation (FRSURF) and the new (SURF). The figure indicates the imbalance of mass at each time step

0 0

K Using FRSURF

L 0 ) -

ln 0- m = ? -

m ' 4 - > 0- e l - Cl 3

.- - -

$ f > -

Time step = 0.1

Time step = 0.05

Time step = 0.01

As Figure 2 shows, the mass error at each step was an order of magnitude less (until it became very small) in the program with the exposed nonlinearity (SURF) when both programs used the same time step. Halving the time step with the older program (FRSURF) slightly more than halved the mass error at each time step, but provided only about a 7 per cent decrease in the accumulated mass error. To decrease the time step error t6 that of the new program requires a time step of approximately one-tenth as much. It appears to be impossible to decrease the accumulated error in FRSURF to the level of that of SURF by simply decreasing the time step.

CONCLUSIONS

When the integration is performed on the advanced time step, fully exposing the nonlinearity that is implicit in the application of the free surface boundary condition to the actual free surface, the error in the calculation is greatly decreased. Somewhat longer computation time is required to evaluate the extra terms; since that time is only a part of the total, the time of calculation is increased by, perhaps, 20 per cent.

Other calculations have indicated that the stability of the new program is somewhat less than the old. The reason is unknown, as the linear stability analysis' applies equally to each.

ACKNOWLEDGEMENTS

This research was supported by the National Science Foundation, grant number ECE-8610119.

Page 8: Free surface flow — exposing the hidden nonlinearity

516 J . A. LIGGETT

REFERENCES

1. J . J . Stoker, Wafer Waves, Interscience, New York, 1957. 2. J . A. Liggett and P. L-F. Liu, The Boundary Integral Equation Method for Porous Media Flow. Allen and llnwin,

3. R . Pavelle, M. Rothstein and J . Fitch, 'Computer algebra', Sci. Amer., 245(6), 136-152 (1981). London, 1983.