COMPUTER MODELLING OF FLOWS WITH A FREE SURFACE

BY

LIU JUN

OCTOBER 1986

THESIS SUBMITTEDFOR THE DEGREEOF DOCTOR OF PHILOSOPY IN THE FACULTY OF ENGINEERING UNIVERSITY OF LONDON

AND

FOR THE DIPLOMAOF MEMBERSHIPOF IMPERIAL COLLEGE

COMPUTATIONALFLUID DYNAMICS UNIT ROOM 440 MED BUILDING IMPERIALCOLLEGE OF SCIENCEAND TECHNOLOGY EXHIBITION ROAD LONDON SW7 2AZ UK

\ ¶9

rJýý'id 1

ABSTRACT

This thesis is about an experimental and theoretical investigation of the flows with a free surface.

A literature review of the current status of the subject is provided, which gives an up-to-date account of some of the most popular methods in present-day use.

A simple experiment is devised so as to allow the sloshing of water in a tilted tank to be examined. Motion pictures and still photographs, recording qualitative behaviours of the flow under various operation conditions, are obtained.

A novel mathematical model, of the volume-tracking category, has been developed to follow the movement of the free surface which separates one fluid from another. Use has also been made of the tried and tested particle-tracking method to do the same job.

Experimental verification is given of the computer simulation for the sloshing of water. The satisfactory agreement found between numerical prediction and experimental evidence, in particular with respect to the sloshing frequency, the wave amplitude and the free-surface profile, is proof that the present procedures perform well in revealing the physical phenomena of concern. 2

Two mathematical models are subsequently used to simulate a free-surface flow classic-the broken dam problem-for which both analytical and experimental information are available for comparison with the calculated results. The positive outcome of the comparison promotes further confidence in the methods employed.

Finally, the capability and flexibility of the new model, that is, the scalar-equation method, are further explored as it is applied to obtain solution to the drainage of a cylindrical pipe under both normal gravity and weightlessness conditions. Where possible, the resulting predictions are compared with the experimental data and good agreement is again demonstrated between them. 3

PREFACE

I became a member of the Computational Fluid Dynamics Unit of Imperial College in January 1984. This thesis reports the main outcome of my research between then and October 1986.

The research subject has been the computer modelling of free-surface flows, with special reference to those in which the gravitational force predominates.

During the first ten months of my stay I was engaged in familiarizing myself with the PHOENICS computer code of Spalding[43]. Works of this period included the prediction of laminar flow over a plane symmetric sudden expansion[22], laminar flow in a driven square cavity[23] and simulation of flow around a blunt body in a supersonic stream[24].

Having completed the initial period, a programme of research was embarked upon which began with the conduction of a literature review of the subject of free-surface flows. The work that followed was concerned with the study of shallow water flow which is analogous to the theory of compressible gas flow. This subsequently led to the introduction of the so called 'variable blockage' method suitable for deep water flow[25].

The main research then started with the development and evaluation of a novel mathematical model for the computation of free-surface flows. The new method, namely the scalar- 4 equation method, and the existing particle-tracking method were applied to various practical flow situations.

Owing to the lack of experimental information which is available for the validation of the mathematical models, a simple experiment concerning the sloshing motion of a liquid in a titled tank was conducted. To permit comparison of numerical solution with experimental evidence, three important parameters including the sloshing frequency, wave amplitude and free-surface profile were collected in the form of visible pictures.

It was after the completion of the above in October 1986 that I started writing this thesis.

I would now like to express my gratitude to all those who have contributed to my studies at Imperial College.

First and foremost, I am deeply grateful to my supervisor, Professor D Brian Spalding, for his proficient guidance and continual inspiration. His interest in and criticism on my work have always been a great impetus to the successful completion of this thesis. Furthermore, he has taught me much on the subject of technical report writing. I have indeed been fortunate to have had the opportunity and privilege of working with him.

I am also indebted to Drs ASC Ma and WM Pun for their many useful suggestions on both technical and non-technical 5 matters. Their willingness to help is greatly appreciated.

I am very thankful to the rest members of the staff of the CFDU who were ever ready to provide help in different matters. I am most grateful to Mr Bob King for his great help in all aspects of my experimental programme; his friendship and endeavour in the laboratory are greatly acknowledged. For the assistance with various administrative affairs I am grateful to Mrs Frith Oliver and Mrs Catherine Webb. Thanks are also due to Mr Peter Dale for computer support.

The day-to-day exchange of ideas with other students, post-doctoral researchers and visiting scholars has been most beneficial. These include Dr MJ Andrews, Mr M Dzodzo, Mr SB Jia, Mr A Ruprecht, Dr QH Qin, Dr L Sabotinov, Mr F Villasenor, Dr ZY Wu and Dr ST Xi. To all of them go my thanks.

The friendship with Drs D Assimacopoulos and H Sugita has been particularly valuable. I have very much enjoyed knowing both of them.

Space does not allow me to list all the names of individuals who were behind this work one way or another. However, I cannot fail to acknowledge the friendship of my fellow-countrymen studying at Imperial College and other educational establishments in the United Kingdom.

Finally, I wish to thank the Tangkakji Trust, Hong Kong, for providing the financial support over the past three years and the State Education Commission for making it all possible.

October 1986 London Liu Jun 7

TABLE OF CONTENTS PAGE NO.

ABSTRACT 1 PREFACE 3 TABLE OF CONTENTS 7 LIST OF FIGURES 11 1 INTRODUCTION 15 1.1 The Problem 15 1.2 Practical Relevance 16 1.3 Objectives of the Present Study 17 1.4 Outline of the Present Investigation 18 1.5 Layout of the Thesis 19

2 LITERATURE REVIEW 21 2.1 Introduction 21 2.2 Computational Methods 22 2.21 Surface-Tracking Methods 22 2.22 Volume-Tracking Methods 25 2.23 Moving-Grid Methods 30 2.3 Experimental Study 31 2.4 Pros and Cons of Various Methods 35 2.5 Closure 38

3 MATHEMATICAL FORMULATION 40 3.1 Introduction 40 3.2 The Governing Equations 41 3.21 The Assumptions 41 3.22 The Continuity Equation 41 8

3.23 The Momentum Equation 43 3.24 The Scalar-Property Equation 44 3.25 The General Differential Equation 44 3.3 Auxiliary Information 45 3.4 Closure 46

4 SOLUTIONPROCEDURE 48 4.1 Introduction 48 4.2 Formulation of the Finite-Domain Equation 49 4.21 Generation of the Finite-Domain Grid 50 4.22 Derivation of the Finite-Domain Equation 52 4.3 Solution of the Finite-Domain Equation 55 4.31 Overview 55 4.32 Operational Sequence 56 4.4 Interface-Tracking Calculation 57 4.41 The Particle-Tracking Method 58 4.42 The Scalar-Equation Method 65 4.5 Closure 75

5 EXPERIMENTALSTUDY 78 5.1 Introduction 78 5.2 Experimental Set-up 79 5.21 Apparatus 79 5.22 Procedure 84 5.3 Experimental Results 84 5.4 Discussion 86 5.5 Closure 95

6 PREDICTIONOF EXPERIMENT 96 9

6.1 " Introduction 96 6.2 The Problem 97 6.3 Physical Conditions 100 6.4 Computational Details 102 6.41 Grid-Cell-Size Selection 102 6.42 Time-Step-Size Selection 105 6.43 Convergence 105 6.5 Presentation of Results 106 6.6 Discussion of Results 107 6.7 Closure 121

7 COLLAPSE OF A LIQUID COLUMN 123 7.1 Introduction 123 7.2 The Problem 124 7.3 Physical Conditions 125 7.31 Flow Configurations 125 7.32 Initial and Boundary Conditions 125 7.4 Computational Details 126 7.41 Grid-Cell-Size Selection 126 7.42 Time-Step-Size Selection 127 7.43 Convergence 129 7.5 Presentation of Results 129 7.51 Hydrodynamic Results 129 7.52 Free-Surface Profiles 132 7.53 Wave Heights and Wave Front Locations 135 7.6 Discussion of Results 136 7.61 Comparison with Analytical Solution 136 7.62 Comparison with Experimental Evidence 145 7.7 Closure 148 10

8 DRAINAGE OF A CYLINDRICAL TANK 149 8.1 Introduction 149 8.2 The Problem 150 8.3 Computational Conditions and Details 152 8.31 Computational Conditions 152 8.32 Computational Details 153

8.4 Presentation of Results 155 8.5 Discussion -of Results 155 8.51 Results in Normal Gravity 155 8.52 Results in Weightlessness 161 8.6 Closure 165

9 CONCLUSIONS 16 6 9.1 Introduction 166 9.2 Achievements 166 9.3 Recommendations 168

REFERENCES 173 NOMENCLATURE 182 APPENDICES 185 Appendix A The PHOENICS Q File 185 Appendix B The PHOENICSGROUND 191 Appendix C The Particle-Tracking Method Subroutines 200 Appendix D The Scalar-Equation Method Subroutines 221 11

LIST OF FIGURES PAGE NO.

Figure 4.1 A two-dimensionalCartesian control volume 50

Figure 4.2 Locations of variables and their control volumes 52

Figure 4.3 Determination of a particle velocity from the flow field 59

Figure 4.4 Assignment of fluids in a free-surface cell 63

Figure 4.5 Area segmentation-calculation of area occupied by marked fluid in a free-surface cell 63

Figure 4.6 Solution sequence 64

Figure 4.7(a) The original interface separating two regions and the associated scalar values in neighbouringcells 66

Figure 4.7(b) The reconstructedinterface using a piecewise-polynomialapproximation 66

Figure 4.8 p-4 formula 69 12

Figure 5.1 Schematicsof the experimental apparatus 80

Figure 5.2 Photographsof the experimental apparatus 81

Figure 5.3 Photographsof run 4 87

Figure 5.4 Photographsof run 5 90

Figure 5.5 Photographsof run 9 93

Figure 6.1 Definitionsketch for sloshing of a liquid in a tank 98

Figure 6.2 Grid-independent test 104

Figure 6.3 Predictionof the free-surface profile forrun2 108

Figure 6.4 Predictionof the free-surface profile for run 5 115

Figure 6.5 Velocity vectors for run 5 119

Figure 6.6 Streamline patterns for run 5 120

Figure 7.1 Definition sketch for collapse of a liquid column on a floor 124 13

Figure 7.2 Grid-independent test 128

Figure 7.3 Velocity vectors for the rectangular section column 130

Figure 7.4 Streamline patterns for the rectangular section column 131

Figure 7.5 Predictionof the free-surface profile for the rectangularsection column 133

Figure 7.6 Predictionof the free-surface profile for the square section column 138

Figure 7.7 Predictionof the free-surface profile for the semi-circularsection column 142

Figure 7.8(a) Z versus T for the square collapsing column 146

Figure 7.8(b) H versus T for the square collapsing column 146

Figure 7.9(a) Z versus T for the semi-circular collapsing column 147

Figure 7.9(b) H versus T for the semi-circular collapsing column 147 14

Figure 8.1 Drainage of a tank 151

Figure 8.2 Predictionof the free-surface profile

in normal gravity when Vo =10.08(m/s) 157

Figure 8.3 Prediction of the free-surface profile

in normal gravity when Vo =16.88(m/s) 158

Figure 8.4 Prediction of the free-surface profile

in normal gravity when Vo = 20.80(m/s) 159

Figure 8.5 Comparisonof predictionswith experimentaldata in normal gravity. 160

Figure 8.6 Predictionof the free-surface profile

in weightlessnesswhen VO=1 0.08(m/s) 162

Figure 8.7 Predictionof the free-surface profile

in weightlessnesswhen VO=1 6.88(m/s) 163

Figure 8.8 Predictionof the free-surface profile

in weightlessnesswhen Vo =20.80(m/s) 164 15

1 INTRODUCTION

1.1 THE PROBLEM

Free-surface phenomena are characterized by the presence of a distinct surface which separates one fluid from another. All share the common feature that the domain of interest has an unknown boundary, whereupon discontinuities exist in one or more variables.

In this category of flows, those with two fluids having a density ratio of as large as pertaining to water and air stand out with the characteristics that both restoring and inertial forces are important. This results in a complex, yet often fascinating, interplay between potential and kinetic energies.

Two problems arise in tackling the flows with such attributes-the evolution of the free surface in time and the determination of the flow field in space. The complexity of the subject is associated with the knowledge of the free-surface location in conjunction with the satisfaction of the appropriate boundary conditions and field equations, all preferably simultaneously. Thus, direct numerical solution is often called for. 16

1.2 PRACTICAL RELEVANCE

Free-surface phenomena surround us at almost every turn, ranging all the way from modern civilization to primitive nature. They accur in the loss-of-coolant accident in a water-pressurized nuclear reactor; they appear in the space vehicle where efficient use of onboard liquid requires control over such processes as refuelings of propellant tank and life-support system; they also emerge in the enviromental flow in which the gravitational effect predominates; just to name a few.

Some typical examples include among others:

1) Generation of surface waves around or above a moving surface vessel or a submarine.

2) Generation of surface waves in lakes or harbours as a result of earthquakes.

3) Spreading of pollutant over a large body of water due to leakage on a ship hull.

4) Filling or draining of a tank with a liquid, especially in space. under low gravity condition.

5) Sloshing of a liquid in a partially filled moving container. 17

1.3 OBJECTIVES OF THE PRESENT STUDY

The main purposes of the present investigation 'are:

1) to knowledge obtain a general of -the current status of research in the area of free-surface flows.

2) to develop and validate a mathematical model which is capable of predicting free-surface flows of various kinds.

3) to to utilize an existing . mathematical model simulate the flows of same and to judge the new model by comparison.

These are achieved by means of:

1) conducting a comprehensive literature survey.

2) performing a simple, yet informative, experiment for the sloshing of a liquid in a tilted tank and comparing the experimental results with the predictions to assess the physical realism of the mathematical models.

3) demonstrating the potential of the numerical methods by making use of them in the simulations of two additional free-surface flows-the broken 18

dam problem and the pipe drainage problem.

1.4 OUTLINE OF THE PRESENT CONTRIBUTION

The present contribution consists of two parts.

(A) Computational Work

The computation is performed with the computer programme PHOENICS-84[39]. In order to follow the track of the free surface, a fluid marker equation representing the conservation of a scalar variable is solved. Special care is taken in the replacement of the partial differential equation by its finite-difference counterpart so that the smearing by numerical diffusion of a sharp free surface can be lessened to an acceptable level. This is fulfilled by the adoption of a set of subroutines that incorporate the Van Leer scheme for advection, as an attachment to the PHOENICS-84 main programme. A linear formula is devised so relating the value of the scalar variable to the properties of the fluid. The reformulation of the continuity equation allows the simultaneous solution of the two fluids involved and as a consequence implicit imposition of the free-surface boundary conditions. This model, as will be seen later, proves to be an invaluable tool for the study of the flows in question, and thus constitutes the major contribution of this research. In addition, the existing particle-tracking method for the numerical visualization of a flow has also been used with a view to supplementing and comparing the scalar-equation 19 method.

(B) Experimental Work

A simple experimental rig which enables the sloshing motion of a liquid in a tilted tank to be examined, has been constructed. By virtue of a flow-visualization technique, important features including the sloshing frequency, wave amplitude and free-surface profile have been recorded on both motion pictures and still photographs. These provide a sound base upon which the validation of the mathematical models is established.

1.5 LAYOUT OF THE THESIS

The whole thesis is divided into nine chapters of which this introduction is the first.

In Chapter 2, a comprehensive review is provided of the theoretical and experimental works on the subject of interest.

In Chapter 3 are presented fundamental equations governing the physical problem under consideration, together with the auxiliary information needed to complete the mathematical specification of the problem.

Chapter 4 outlines the numerical solution procedure embodied in the PHOENICS-84 computer code. Two interface-tracking 20 methods: the scalar-equation method and the particle- tracking method, and how they are incorporated into the main body of the programme, are also described in this chapter.

Chapter 5 describes an experimental investigation that has been conducted as an addition to earlier experiments for free- surface flows.

In Chapter 6, computations are made based on the experimental flow and comparison of the prediction with experimental results is carried out.

Chapter 7 contains an application of the two numerical methods to a free-surface flow classic-the broken dam problem-to evaluate their physical reality and numerical accuracy.

The applicability of the scalar-equation method is further explored in Chapter 8 by putting it to use in the study of drainage of a pipe under both normal gravity and weightlessness conditions.

Finally, Chapter 9 ends the thesis with a summary of the principal achievements of the research and recommendations for future work. This is followed by lists of References and Nomenclature, along with appendices which supplement the information in the chapters that precede. 21

2 LITERATURE REVIEW

2.1 INTRODUCTION

This chapter reviews and compares the methods that are currently available for the study of flows with moving interfaces. It is biased toward numerical approaches because of the author's preference. Experimental investigations, however, are also included for completeness.

According to the manner in which the governing equations are tackled in the computational domain, there exist three major categories of approach: finite differences, finite elements, and boundary-integral equations. Lack of space has precluded coverage of the methods belonging to the last two categories, the emphasis of the present review is therefore on the formulations and techniques of finite-difference methods.

The approximation of irrotational motion is often satisfactory for free-surface flows of practical importance. This circumstance is particularly fortunate because the existence of a velocity potential and an energy integral (the Bernoulli equation) considerably simplifies the computation of these flows, and in particular the time evolution Of the 22 free-surface configuration. Yeung[51] has given an up-to-date account of some of the most popular methods employed in computing potential flows. The present review is thus further confined to the 'full Navier-Stokes' methods, i. e. to those which take into account the viscous effects.

The remainder of this chapter contains four sections of which the first gives an overview of the presently available computational techniques. This section is further divided into three subsections under the headings: 'surface-tracking methods', 'volume-tracking methods' and 'moving-grid methods'. This is then followed by an account of the previous experimental works on the subject in Section 2.3. Section 2.4 compares the performance and applicability of the various methods. Finally, a summary of the achievements is provided in Section 2.5.

2.2 COMPUTATIONAL METHODS

2.21 SURFACE-TRACKING METHODS

In surface-tracking methods the interface is specified by an ordered set of imaginary points; between these points its position is approximated by an interpolant, usually a piecewise polynomial. This time-dependent interface divides the flow domain into connected regions in which different fluids exist.

(A) Height-Function Method 23

An imaginary point may be represented by its distance from a reference surface as a function of position. Hirt et al[17] determined the location and shape of the interface through a height function h= h(x,t) by assigning values of h to discrete values of x. The time evolution of this height function is governed by a kinetic equation expressing the fact that the interface must move with the local flow field

- antat+ uaniaN=v X2.1ý where u and v, evaluated at the interface, are the velocity components in the x and y directions respectively. This approach has often been found in use for the calculation of water waves[31].

(B) Particle-Tracking Method

Instead of using a continuous function to define the interface, one can also work with a parametric representation [13,29,34]. A string of imaginary particles is spread along the density interface, each particle is denoted by coordinates xp

The and yp, with associated velocity components up and vp. variation of the particle position with time is determined by the following Lagrangian equations:

axp/at= up (2.2) ayp/at= vp (2.3) 24

Using an explicit integration, these equations are represented sequentially as

n+1 n xp = Xp + upöt (2.4)

n+1 n yp = yp + VpSt (2.5) where St is the size of the time step. n and n+1 denote the values at the start and end of the n+1 th time step respectively.

The particle velocity at the interface is computed by appropriate interpolation from the surrounding grid. The particles are linearly ordered and connected; individuals may be deleted or added for the optimum resolution. A density distribution can be determined at each time step from the position of the interface. This density field is useful in the calculation of momentum transfer for the solution of velocities and pressures.

Numerous works emphasising different aspects of the flows have been published in the literature. With the aid of the GALA algorithm[42], Maxwell[29] was able to apply the particle-tracking method to the predictions of some typical free-surface flows. The agreement between computed results and experimental data proved to be excellent for the phenomena investigated, namely the collapse of a liquid column on a flat floor, the rise of a bubble through a stationary liquid, and the run-up of a solitary wave along a 25

vertical wall. Awn[5] extended Maxwell's original work to describe the movement of the flame-front, i. e., the interface between burned and unburned gases. The particles are moved with velocities calculated from superimposure of burning velocity and unburned cold gas velocity. Wu[50] recently by some modification employed the same technique in his study of flame propagation, with the emphasis on the mechanisms responsible for the inception of instabilities. Using the same mathematical model, Andrews[4] investigated the Rayleigh- Taylor instability occuring in a tilted rectangular box and Villasenor[49] the Kelvin-Helmholtz instability occuring in a tilted long duct. Finally, Castrejon[8] used it as a flow- visualization technique in his work on natural convection in an annular cylinder.

2.22 VOLUME-TRACKING METHODS

In volume-tracking methods the interface is specified by the common boundary of two regions adjacent to each other. The region is identified by its possession of fluid markers of a particular kind. The reconstruction of actual surface shape requires knowledge of distribution of fluid markers in the area under concern.

(A) The Marker and Cell Method

One of the earliest volume-tracking methods is the Marker and Cell (MAC) method of Harlow and Welch[14]. Marker particles are scattered initially to identify' each fluid region 26 in the calculation domain. These particles are transported in a Lagrangian manner along with the fluids. Their presence in a computational cell indicates the presence of the marked fluids. Surfaces are defined as lying at the boundaries between regions with and without marker particles. The the interface is the actual -location of reconstructed using ti marker particle densities in the mixed cells. The interface recovery scheme may also use the distribution of markers in the surrounding cells to obtain a more accurate profile.

The MAC method since its invention has undergone extensive use and development, aiming at simulating free-surface flows under different conditions. It was first applied to the calculation of the collapse of a liquid column in[14]. Hirt and Shannon[16] found the inadequancy of the original boundary condition approximation and made a simple modification to include the complete normal stress condition. Chan and Street[9] in their modelling of the nonlinear properties of finite-amplitude water waves noticed that a well-shaped wave surface profile became ragged after only a few time steps of computation. The error was seen to originate from the crude treatment of free-surface boundary conditions. Several improvements were made accordingly, including: imposing an exact normal stress condition at the free surface, calculating the velocity field outside the flow region through extrapolation from the interior, and employing a more accurate interpolation formula for obtaining the marker velocity. As a demonstration of the modified method, the run-up of a solitary wave on a vertical wall was predicted 27 and the resulting solution was in excellent agreement with experimental data. Nichols and Hirt[33] further ameliorated the MAC method by incorporating an appropriate tangential stress condition at the surface. To illustrate the influence of this inclusion, a number of typical free-surface flows were calculated and good agreements were found between experimental data and theoretical results.

While all the above works were concentrated on promoting the accuracy of the free-surface boundary conditions, Pracht[36] investigated the numerical stability constraints inherent in the MAC method when it is applied to flow problems in a low Reynolds number range. The study confirmed that the MAC method is restricted to flows for which the Reynolds number must be greater than one. This follows from the fact that the original finite-difference equations of the MAC algorithm are written in explicit form. To eliminate the restrictions thus imposed, Pracht used a fully implicit scheme for the discretization of the differential equations. The properties of this version of MAC were demonstrated by several calculational examples. Deville[12] noticed that Pracht's implicit iterative procedure, although unconditionally stable, is time-consuming. The 'realization - of this fact led him to experiment the applicability of four finite-difference schemes within the framework of the MAC method. Judging from the criteria of accuracy, efficiency and ease of programming, he claimed that the ADI Douglas-Rachford

scheme should be adopted for the numerical integration of the governing equations at low Reynolds numbers. 28

The MAC was later superseded by the SMAC (Simplified Marker And Cell)[2]. The primary advantages of SMAC over its predecessor are that the boundary conditions for the Poisson equation for mass conservation in SMAC are homogeneous; and that there are no ambiguities in the region of inflow and outflow boundaries and corners. The basic difference between SMAC and MAC is that the former does not solve for the pressure field directly and hence has fewer boundary conditions to complicate the programming logic. The simplicity of boundary condition treatment lends SMAC more readily to efficient solution techniques.

(B) The Volume of Fluid Method

With the MAC method, one utilizes several marker particles in a cell to define the region occupied by fluid. The actual location of the interface is then determined by some additional computation based on the distribution of markers within the cell. This procedure is somewhat inconsistent with the customary practice to use only one value in each cell of a grid for each dependent variable defining the fluid state. This recognition led Hirt and Nichols[18] to design the fractional volume of fluid (VOF) method which on one hand provides the same information as is available in the MAC method, and on the other requires only one storage word for each grid cell.

Let a function F be defined, of which the value is unity at any point occupied by fluid and zero otherwise. The average value of F in a cell then represents the fractional volume of the cell 29 occupied by fluid. the interface occurs in the cells with fractional values.

The volume fractions are updated during the calculation according to the appropriate advection equation

aFiat+ uaF/ax+ vaF/at=0 (2.6)

This equation states that F moves with the fluid, and is the partial differential equation analogy of marker particles. In a Lagrangian grid, the equation reduces to the statement that F remains constant in each cell, thus serves solely as a flag identifying cells that , contain fluid. In a Eulerian grid, the equation indicates that the flux of F moves with fluid through cell boundaries.

For the purpose of imposing satisfactory boundary conditions, the real interface position must be reconstructed cell wise at each time step using the fractional volumes of the cell under consideration and its nearest neighbours. There are as many fractional volume reconstruction schemes as there are practitioners. Within each cell, the volume regions can be represented by unions of rectangles, triangles, or regions bounded by piecewise-polynomial surfaces. The curvature of the interface can be estimated using finite-difference approximates based on the neighbouring fractional volumes. The best reconstruction algorithm depends on the application and the importance of subgrid scale structure. For example, Chorin[10] modified the original SLIC algorithm by allowing 30 for multiple rectangles in a cell and developed a SLICer one for flame propagation. Barr and Ashurst[6] then combined the ideas of slope determination in the VOF method with Charin's modifications and have one of the SLICest methods in use for turbulent flame- propagation.

The VOF method and its variants have been successfully applied to different flow situations in which the fluids are subject to one or more moving interfaces. Nichols and Hirt have chosen six calculational examples, for which either experimental or analytical information is available for comparison with the computed results, to illustrate the accuracy and capability of the VOF method as it is embodied in the SOLA-VOF code[18].

2.23 MOVING-GRID METHODS

In moving-grid methods the original grid system can be adjusted to approximate the interface. The governing equations are then solved on the new distorted grid treating the grid points on the density interface as a moving boundary. In this manner, undesirable numerical mixing between the different fluid regions is reduced or avoided.

(A) Local Adjustment Methods

When using either a surface or volume tracking method, if the reconstructed interface is continuous, then at each time step an adjustment in the underlying grid location can be made in 31

the vicinity of the interface. Each grid point within one half cell spacing of the interface is moved to the nearest position horizontally or vertically where the interface intersects a grid line. The interface is now well approximated by the cell edges diagonals the distorted The and on new mildly grid. .- discrete approximations to the partial differential equations at the few irregular grid points near the interface are easily derived for each time step[19]. Alternatively, the concept of the cell 'porosities' can be used modifying the regular Cartesian or polar grid cells in the proximity of the interface[25].

(B) Lagranaian Methods

The next logical step is not to have a separate algorithm to track the interface, but to subdivide in the first place the initial regions into discrete elements with cell boundaries aligned with the interfaces. The governing equations are then solved cell by cell throughout the domain of interest, and the cell edges are all treated like part of the interfaces and, therefore, will continue to track the interface. As new interfaces are created, new cells are added or existing cells readjusted; as the volume of existing cells tends to zero, they are combined or deleted. In this way numerical diffusion across the interface is eradicated, and varying size structures that move with the solution are easily tracked.

2.3 EXPERIMENTAL STUDY 32

It is well known that adequate understanding of a complex physical phenomenon is enhanced by, and generally dependent upon, the combined use of experimental and theoretical techniques in support of each other. The most reliable information about a physical process often comes from actual measurements. The physical realism of a numerical model designed for the simulation of practical phenomena can only be checked by comparing the computed results with experimental data. A brief review of the experimental information available in the title-subject area is given below.

The collapse of liquid columns of different configurations was experimentally studied by Martin and Moyce[28]. Results for this problem had been reported for the positions vs time of the water column height and leading edge of the water as it flows out on a flat floor. The authors also presented photographs for a rectangular section column, however, they did not specify the times to which the photographs relate. Maxwell performed a similar experiment, in which data for the height of water column, location of wave crest and wave amplitude were collected.

Street and Camfield[47] studied the motion of a solitary wave travelling toward a vertical wall. Among other things, they measured the wave run-up ratio as a function of the ratio of wave height to fluid depth. The same authors also studied the deformation of two-dimensional, solitary wave approaching a sloping beach[7]. 33

Observations and experiments on 'head-on' collisions between two solitary waves of equal amplitude travelling in opposite directions were conducted by Maxworthy[30]. He reported the magnitude of the spatial phase shift in the wave trajectories for several values of initial wave amplitude. Also provided in his study are the maximum amplitudes attained by the waves, with the initial wave amplitude being a parameter, for wave-wave interaction and end-wall reflexion. Wave profiles traced from a moving-picture sequence of the interaction of a simple wave with the tank end wall for a moderate initial amplitude were presented.

With the development of space programme, the sloshing phenomena of liquid in a moving container have attracted the attention of many scientific workers. Abramson[l] in a monograph provided a rather comprehensive summary of both analytical and experimental studies on the general subject as it relates particularly to space technology applications. An integrated view of theoretical and experimental data on the dynamic behaviours of liquids in moving containers of a variety of geometrical configurations under various flow conditions was supplied.

Lubin and Springer[27] studied the formation of a dip on the free surface of an initially stationary liquid draining from a cylindrical, flat-bottomed tank through an axisymmetrically placed circular orifice. The observation has been made of the height of the liquid surface in the tank at which the dip forms as a function of the volume flow rate, drain radius, and liquid 34

properties. The experiments were conducted not only with water in contact with air but also with other liquids placed on top of the water. Kaleel and Steven[20] did an ' experiment to study the drainage of a liquid from flat-bottomed, cylindrical tanks in both zero and normal gravity. Results were obtained over a range of outlet sizes, flow rates, liquid properties and initial liquid heights. The free-surface centreline height, the value of which is a function- of time, was measured and graphically presented. The liquid residual, which is by definition the quantity of liquid remaining in the tank when gas is initially injected into the outlet line, was also experimentally determined and plotted. Experiments concerning the unsteady free-surface 'flow of a Newtonian fluid issuing vertically upwards from a tube in the base of a vertical cylindrical cavity were conducted by Smith and Wilkes[41]. The authors published photographic records of the free-surface profiles and photographic measurements of point velocities in a unsteady flow field.

An experimental investigation was carried out by Labus and Dewitt[21] to determine the free-surface shape of circular jets impinging normal to sharp-edged disks in zero gravity. They measured the coordinates for the profiles of the free surface.

Hydrodynamic processes involving complicated free-surface configurations are frequently encountered in pressure the suppression pools used in nuclear reactors. Anderson et al[3] have made a detailed experimental study of a series of 35 small-scale models. A so called Massachusetts Institute of Technology (MIT) Experimental Test Facility in which the pressure suppression pool is approximated by a cylindrical container with a single axisymmetical vent extending into the water pool was employed in their studies. Much experimental data obtained with various system parameters is available: a source of excellent test data for the assessment and validation of numerical simulation methods.

Spiers et al[46] considered the entrainment of Newtonian liquid films onto a vertical plate which is continuously withdrawn at a steady speed from a liquid bath with a free top surface. Experimental results were obtained for film thichnesses over a wide range of fluids. They are schematically presented by plotting a dimensionless thickness parameter versus Capillary number Ca.

Experiments on steady water flow over both a symmetric and an unsymmetric bed profile were performed by Sivakumaran et al[40]. The authors presented their observations in a number of ways including free-surface profiles over the bed profiles, the bed pressure distributions over the bed profiles, and the local Froude numbers versus dimensionless bed curvature for the symmetric bed. Both subcritical and supercritical flow regimes were examined in their studies.

2.4 PROS AND CONS OF VARIOUS METHODS

In the foregoing sections a summary has been made of the 36 existing methods for the study of flows with moving interfaces. The virtues and defects of various methods will now be discussed with the emphasis on the numerical approaches.

It is argued that while the experimental investigation is valuable in providing the most reliable information on a physical process under consideration, the cost of running full-scale equipment is often prohibitively expensive, if not impossible. The second reason for demur is that very few of the flow phenomena for which numerical modelling is now being performed are amenable to the experimental approach at all. Examples of this kind are: the loss-of coolant accident in a nuclear reactor; combustion of pulverized coal in a furnace; and enviromental flows in which gravitational effects predominate. Finally, there are serious difficulties of measurement in many circumstances, and the results are not free of instrument errors.

The height function method is the simplest to implement, and its use is extremely economic since it requires only an one-dimensional storage array to record the surface elevation, but the interface deformation is severely limited because this representation breaks down if the curve becomes multivalued with respect to the reference line. The parametric representation does not suffer from this limitation and is only slightly more complicated to implement. It can also provide the fine resolution and detail needed to track small-subgrid-scale structures in the 37

interface. Unfortunately, there is one serious drawback with this method. When two surfaces intersect, or when a surface folds over itself, the marker points must be reordered. This reordering process is usually very intricate, if not impossible. Besides, coordinates for each particle have to be stored and for the sake of accuracy it is necessary to IN-nit the distance between neighbouring points to less than a certain magnitude. Therefore, more storage is required with this method.

The volume-tracking methods offer the distinct advantage of logic eliminating all the - problems associated with surface interactions. It is thus true that methods of this category have a wider range of applications. Clearly, however, the volume-tracking methods are less capable than the surface-tracking methods in resolving subgrid-scale information.

Use of the MAC method and its variants increases significantly the storage requirement because of the large increase in the number of point coordinates that must be stored. Further, some additional calculations based on the distribution of markers are needed to determine the actual location and shape of the interface and to move all markers to the new positions.

The volume of fluid (VOF) method has been developed as an effort to seek an alternative which shares the merits of the MAC method without an excessive use of computer resources. 38

The VOF offers a volume-tracking method with minimum storage requirements. It can simply and accurately account for the interactions of many different smoothly varying interfaces. The method is also applicable to three- dimensional computations, where its conservative use of stored information is highly appreciated. With the VOF method, the careful solution of an extra equation for the evolution of fractional volume field is required.

Moving-grid methods can be used to track the location, account for changes in the interface topology, and resolve small-scale structures in the interfaces. To prevent the grid from tangling and thus destroying the accuracy of the calculation, a dynamic data structure must be introduced so that the moving grid points may change their nearest neighbours during the computation. Also, new points are added when the grid becomes sparse or a new interface appears, and grid points are removed when they are more dense than necessary for an accurate resolution. All these complicate the programming logic.

2.5 CLOSURE

Most numerical methods designed for solving the flows with moving interfaces are based on either following the contact surface using marker points, calculating the fractional volume of each region separated by the surface as it passes over a fixed reference grid, or moving control volumes aligned with the surface. 39

Experimental investigations of the relevant physical phenomenon are reviewed. They provide the necessary information to assess the reality of the numerical models.

Each method has its own merits and demerits-the best choice depends on the problem which requires solution. In order Pf increasing flexibility and computational complexity, they are the surface-tracking methods, then the volume-tracking methods and finally the moving-grid methods. 40

3 MATHEMATICAL FORMULATION

3.1 INTRODUCTION

The study of a fluid dynamics problem can begin when the physical laws governing the phenomenon have been expressed in mathematical form, generally in terms of differential equations. These physical laws include the conservation of mass, momentum and scalar properties, together with any auxiliary relations necessary to accomplish the mathematical formulation.

The physical laws are very general by themselves; however, in the interests of computational efficiency and convenience, it is sometimes justifiable to neglect some of the mechanisms which are only of secondary importance in the flow being considered. This chapter therefore describes the equations suitable for free-surface flows and states the assumptions necessary to arrive at them.

In stead of producing complete derivation, the purpose of this chapter is rather to develop familiarity with the forms and meanings of the equations. The initial and boundary conditions which are required to obtain a unique solution to the problem 41

are also discussed.

3.2 THE GOVERNING EQUATIONS

3.21 THE ASSUMPTIONS

It is assumed at the outset that:

1) The flow is laminar and two-dimensional.

2) The fluids are incompressible.

3) The properties of the fluid remain constant within itself.

4) Surface tension force at the interface is negligible.

5) The free surface moves only with the convective velocity.

Realization of each above assumption will be discussed in relation to the particular equation to which it applies.

3.22 THE CONTINUITY EQUATION

The partial differential equation governing the conservation of mass can be written as: 42

ap/at+ a(pu)/ax+ a(pp)/ay + Pýv/y =0 (3.1 where p is the density, t stands for time, u and v represent the x and y components of velocity in a Cartesian coordinate or z and r components of velocity in a cylindrical coordinate. The choice of the reference frame is determined by the value of ý: C=0 corresponds to a Cartesian space and C=1 corresponds to a cylindrical geometry. Equation (3.1) can also be written in the equally-valid alternative form:

D(Inp)/Dt + au/ate + Dv/ay + ýv/y =0 (3.2) where the 'substantial derivative' D/Dt is defined by the operator a/at+v"grad, and v denotes the velocity vector.

The fact that the density has disappeared from the 'divergence' term in equation (3.2) saves one from the difficult task of determining an average density for each cell boundary near the fluid interface. The evaluation of D(Inp)/Dt, however, merely requires knowledge of how the densities of identified particles of fluid vary with time, which is much easier to obtain. Indeed, when the fluids are incompressible, as is effectively the case for most free-surface flows of practical importance, equation (3.2) reduces to

(3.3) au/ax+ May + ýv/y=o which implies that knowledge of the densities is immaterial 43 to the continuity equation, this being identical in form to that for a single uniform-density flow.

The numerical procedure built upon equation (3.3) is called GALA and is now available as an option in the PHOENICS-84 computer code. Use of the GALA algorithm renders it possible to solve the hydrodynamic variables over the entire flow domain and as a consequence to impose boundary conditions on the free surface implicitly.

3.23 THE MOMENTUM EQUATION

The conservation of momentum for a two-dimensional, laminar, constant-property flow under unsteady condition is given by the following Navier-Stokes equations:

pm(3u/at + uau/ax + vau/ay) = -ap/ax + pm Fx + N.(a2uiaX2 + a2uiay2 + Cau/yay) (3.4)

pm(av/at + uav/ax + vav/ay) = -DP/ay + pmFy

+ ga2v/aX2+ azviay2 + ý(av/yay - v/y2)] (3.5) where p is the fluid dynamic pressure, µ is the fluid dynamic viscosity, Fx and Fy are the x and y components of external

body force, and pm is the density of fluid mixture, of which

the value is calculated from the formulae given in the next chapter. 44

It may be noted that the left-hand side of equation (3.4) contains terms representing both the transient and convective transport of momentum, while the pressure gradient term, the diffusion term and the body force term appear on the right-hand side. The y-direction equation, (3.5), is of the same form as equation (3.4) with the exception of the presence of the centrifugal force v/y2.

3.24 THE SCALAR-PROPERTY EQUATION

In the presence of the velocity field (u,v), the conservation of a scalar variable cb is expressed as:

P[a(Diat+a((Du)iax + a(rvb)/ray] =sO + I.r (D (a2(Diax2 + a2(Diay2) (3.6) where r=y when ý=1 and r=1 when ý=0. The quantity S(D on the right-hand side is the rate of generation of the scalar property per unit volume. r, is the coefficient of dissipation.

3.25 THE GENERAL DIFFERENTIAL EQUATION

An inspection of equations (3.3), (3.4), (3.5) and (3.6) reveals that they, though are deduced from different physical laws, obey a general equation, of which the form in vector notation is: 45

a(Pi5)iat+ div(pvi5) = div(r grads) + S15 (3.7)

where 15is a generic variable. The content of the generalized

source term S,5 is specific to a particular meaning of 15.

The four terms in the general differential equation are the transient term, the convection term, the diffusion term and the source term. It is evident that the present source term contains all other terms which do not conform to the nominal terms. This manipulation casts any particular equation into

the standard form. The concept of the general 15 equation enables us to formulate a universal numerical procedure, due to be described in the next chapter.

3.3 AUXILIARY INFORMATION

In addition to the equations presented above, the establishment of a- complete mathematical model also needs some auxiliary information. In the case of free-surface flow, this contains the kinetics of the free surface and the satisfaction of the initial and boundary conditions. Details of how the free surface is moved inside the flow domain and its interaction with the main solution procedure are delayed to the next chapter. Of the initial and boundary conditions, the former refers to the assignment of values of the dependent variables at the time when the computation starts while the latter refers to the specification of their values at the edges 46

of the flow domain.

Physical boundaries of the following types will be encountered in the present study: impervious walls, planes of symmetry, inlet and outlet boundaries.

At a wall which is stationary and impervious, all velocity components are zero, so are the fluxes of any scalar properties through the wall. At a plane of symmetry the velocity component normal to it is zero, so are the normal gradients of all the other quantities. The inlet and outlet boundary conditions are problem dependent.

Apart from these 'conventional' boundary conditions, it is also necessary to set conditions on the free surface. Its explicit treatment, however, is avoided because of the use of the GALA algorithm, the concepts of which have been explained before.

The initial conditions are specified from known flow configurations. They include the initial values of the flow variables O's, the initial position of the free-surface marker particles and the initial distribution of the scalar fluid flag.

3.4 CLOSURE

In this chapter we have briefly described the equations that govern two-dimensional, laminar and unsteady flows with a free surface. A 'standard form of equation applicable to any 47 generic fluid variable has been presented. Account has also been given of the auxiliary information which is necessary to accomplish the specification of the physical problem.. 48

4 SOLUTION PROCEDURE

4.1 INTRODUCTION

From the previous chapter we may see that the flow problem under consideration is governed by a set of highly nonlinear and strongly coupled partial differential equations, along with some necessary auxiliary information. Only in very limited situations are they amenable to the analytical solutions, and a numerical solution approach is usually required. The tasks of this chapter are to present the numerical solution procedures that have been used for the solution of these equations and to describe the interface- tracking techniques that have been used for the tracking of free surfaces.

The governing equations are solved with the aid of the PHOENICS-84 computer programme which embodies a fully- conservative, fully-implicit, finite-volume formulation of the differential equations. The solution procedure as it is built into the code is an extension to the well-known SIMPLE algorithm of Patankar and Spalding[35] and has been widely described by Spalding[44]. What follows, therefore, is only a brief outline of the method for the sake of completeness and 49 easy reference.

It should be pointed out that PHOENICS-84, on its own, is not equipped with the necessary numerical means to keep track of a moving free surface inside the flow domain. It is thus essential to make use of the facilities provided by the programme for the attachment of user-generated coding sequences. The development of the new scalar-equation method for a regional track of the free surface is a major contribution of the present investigation and will be described below in great detail.

For the purpose of comparison, the existing particle-tracking method developed by Maxwell for the computation of free-surface flows is also described. It is incorporated into the main solution procedure of PHOENICS to have a direct track of the free surface.

The rest of this chapter is composed of five sections in which the whole solution procedure is detailed. The first of these, Section 4.2, describes the formation of the finite-domain grid and the formulation of the finite-domain equation. Section 4.3 outlines the calculation of the flow field. This is followed by Section 4.4 where a full account is given of the evolution of the free surface. Finally, in Section 4.5, the main features of the solution procedure are summarized.

4.2 FORMULATION OF THE FINITE-DOMAIN EQUATION

fi C,. C: 50

4.21 GENERATION OF THE FINITE-DOMAIN GRID

(A) Control Volumes

The integration space is covered by a lattice work of non-overlapping cells which is a collection of a number of the typical Cartesian control volume shown in Figure 4.1.

N

W E

S

Figure 4.1 A two-dimensional Cartesian control volume

The geometrical centre P of a cell is called the grid node. The neighbouring nodes are adverted to points N, S, E, W for North, South, East and West. The lines joining P to its neighbours cut the cell faces at n,s, e, w. The variable values at P, N, S, E and W are regarded as representing the values within the whole cell, while the values at n, s, e and w are regarded as 51 representing the values over the whole of the faces of the cell.

The grid may be non-uniformly layed out but once its density and dimension have been chosen, it remains fixed during the course of solution.

(B) Location of Vari

Scalar variables such as pressure, density and exchange coefficient are stored at the grid nodes; the velocity components are stored at the faces of cells and are denoted by ue, uw, vn and vs. The finite-domain equations for the

scalar quantities are obtained by application of the conservation principles to the main cells in which the P's are located (e.g. shadowed region 1 in Figure 4.2), while those for the velocities are obtained by application of the momentum conservation law to the cells formed around the velocities as shown by the shadowed regions 2 and 3 in Figure 4.2 for velocity components u and v respectively.

This staggered-grid arrangement has the following advantages:

1) The velocity components are conveniently located for calculating the convective fluxes of scalar variables across the cell boundaries. 52

2) The calculation of mass balance over a main cell is made easy because the velocities normal to the boundaries of this region are directly available.

3) The pressures are so stored as to make it easy to compute accurately the pressure gradients that drive the velocities.

U

ýS 1

Symbol Location Control volume for

1p 9(D 2 -º u 3*v

Figure 4.2 Locations of variables and their control volumes

4.22 DERIVATION OF THE FINITE-DOMAIN EQUATION 53

The finite-domain equation is derived from the integration of the general differential equation over a finite-volume cell as follows:

ill ff(pvo fJfsdv [a(pi)/at]dV + + J,5)dA = (4.1) VAV where V denotes the cell volume, A is its surface area, and

J,&, the diffusion flux, is defined thus:

J,, = -I', &*g rad15 (4.2)

To express the transient term in its finite-domain form, i is presumed to be uniform throughout the control volume. Integrating over a finite elapse time, St, produces:

n+1 n SJJ[a(p)/at]dV= V[(P*)p - (P,&)p]/St (4.3) v where superscript n refers to the value prevailing at the start of the time interval. For the source term:

his S15V (4.4) 1dv = V indicating the assumption of a uniform distribution of S,5 in the control volume. 54

In the surface integral, variables are presumed constant on each cell face:

ff(pvi9 J, + &)dA = (pvi + J,5)A (4.5) A e,w, n, s

This equation can be expressed in terms of the convective flux C and the diffusive flux D defined as:

Cii3 = puiAii (4.6)

D il5 =A iril5/Sx (4.7)

where Sx is the distance between two adjacent grid nodes in the x direction and i is the space index. The choice of p and a in the above equations conforms to the 'upwind' law of interpolation.

The convection and diffusion coefficients (i. e. the C's and D's) are combined to form the coefficient of the finite-domain equation:

Ai= Ci + Di (4.8)

It is referred to Hedberg et al[15] for details.

The equation that emerges from the above derivation is written in a general way as follows: 55

AP Aeie AWl5W Anign ASi3s Su (4.9) P= + + + +

Ap=Ae+AW+An+AS+At+ (-Sp) (4.10)

The source term S15which appears in equation (3.5) has been linearized thus:

S15=Su+Sp, 9p (4.11)

before it is included into equation (4.9).

Details of the formulation of all the coefficients and the transformation of all the equations can be found in [15].

4.3 SOLUTION OF THE FINITE-DOMAIN EQUATION

4.31 OVERVIEW

The discrete equation (4.9) for the general flow variable 15 is non-linear in nature, because the coefficient and source which appear in the equation are functions of the relevant variables. In addition, when 15 has the specific meaning of v, the momentum equation is coupled through an unknown pressure field. Thus, an iterative, guess-and-correct procedure is required of its solution.

In the present study, the numerical procedure for solving the finite-domain equation is based upon the 'SIMPLEST' algorithm 56

point-by-point method, while the rest are solved, slab-by-slab, by means of a slab-wise linear solver, the detail of which is in [44].

OPERATIONAL SEQUENCE --4.32

The sequence in which the computation is carried out may be summarized as follows:

1) First guess the pressure field. Calculation then starts with the lowest slab (column in 2D case) of cells in the x-direction.

2) The convection fluxes C's and diffusion fluxes D's are assembled from the appropriate formulae and are stored at each main cell in the slab.

3) The finite-domain equations for u and v are now set up using the C's and D's. Solutions to these equations are obtained by the Jacobi point-by-point method.

4) The finite-domain equations are then constructed for all the remaining scalar variables and are subsequently solved.

5) The convection fluxes are re-computed, followed by the continuity error for each cell. Next, the equation for the unknown pressure-correction for 57

each main cell in the slab is set up and subject to solution.

6) The pressure corrections thus obtained are used to adjust the pressure and velocity- fields such that the local volume conservation prevails for all cells in the slab.

7) Iteration may be performed at a slab by returning to step 1) and repeating. In a nearly-parabolic flow, many iterations may be necessary before moving to the next slab. In a strongly-elliptic flow, however, few iterations are needed because the elliptic effects are better accounted for by sweeping through -the solution domain.

8) Attention passes to the next slab, and the whole process is repeated. In this fashion all slabs of the domain are visited to complete a 'sweep' of the integration space. For a strongly elliptic flow, many sweeps may be required to attain the prescribed degrees of accuracy and convergence.

4.4 INTERFACE-TRACKING CALCULATION

The basic procedure for the computation of an interface can be divided into three steps, namely:

1) Interface tracking: to illustrate how an 58

interface evolves within the flow domain.

2) Density calculation: to show how a density field can be determined from the position of the interface.

3) Incorporation: to explain how the interface tracking technique interacts with the main solution procedure.

4.41 THE PARTICLE-TRACKING METHOD

(A) Evolution of the Particle

The particle-tracking method defines the free surface by specifying a string of ordered imaginary particles on the fluid interface. Between every two particles the interface is approximated as a straight line-segment. Each particle is denoted by coordinates xp and yp, with associated velocity components up and vp. The time dependence of the particle location is governed by the equations:

dxp/dt = up (4.12)

dyp/dt = vp (4.13) 59

These equations can be represented in explicit finite- difference form as:

n+l nn xp = xp + up St (4.14)

n+1 nn yp = yp + Vp St (4.15)

where superscripts n and n+1 denote the values at the start and end of the n+1th time step respectively.

There exist several ways for the evaluation of the particle velocity. The practice adopted here has been to compute this quantity using a simple linear interpolation of the four neighbouring velocities surrounding the particle in question at the end of each time step, as is shown in Figure 4.3.

X

Figure 4.3 Determination of a particle velocity from the flow field 60

However, special attention should be given to the particles which are contained in cells adjacent to the boundaries of the flow domain or planes of symmetry. In the case of a symmetry plane, the appropriate symmetry velocity is taken; at a wall with a no-slip boundary condition, the velocity of a particle tends linearly to zero at the particle approaches the wall.

Owing to the motion of the fluid, the particles do not always remain evenly spaced. Eventually, parts of the interface may be sparsely populated with particles, while in other parts the particles may be closely packed; neither extreme is desirable for an optimal resolution. Consequently, a check is performed of the distance between adjacent particles at every time step as follows:

1) If the distance between any two adjacent particles

is greater than a user-prescribed length S1, then a

new particle is inserted midway between them. The particle storage array is thereafter adjusted to accommodate the new particle.

2) If the distance between any two successive particles is smaller than a user-prescribed length

S2, one of the particles is deleted, and the storage

array reorganized.

(A) Density Determination 61

The Lagrangian particle positions hitherto determined are now employed to work out the proportion of a cell occupied by fluid. The particles are numbered consecutively along the interface such that an observer moving from particle m to particle m+k always sees fluid 1 to his or her right and fluid 2 to his or her left, see Figure 4.4. The areas thus cut out by the string are designated as Al and A2, of which the former is calculated from the track as follows:

1) Start with the first particle in a string; move along the string while storing the coordinates of the encountering particles until a new cell is met.

2) Integrate. the area between the string and the reference line using the trapezium rule.

3) Accumulate the computed area into A,; if Al > A,

then the track has re-entered the cell causing double accounting, and the area of the cell A is

subtracted from A1: A1= Al + A2 - A, see Figure 4.5.

4) Return to 1) starting with the first particle in the new cell and repeating until the whole string is visited.

The volume fraction of fluid 1 is then by definition: 62

(4.16) ri =A 1/A which permits the density in a cell containing two fluids to be determined from the so called 'rule of mixture':

pm = r1p1 + (1-r1)p2 (4.17)

where pm, p1 and p2 stand for the density of the mixture, density of fluid 1 and density of fluid 2 respectively.

Finally, a complete particle-tracking method must be equipped with the ability to tell the type of fluid which is present in control volumes which do not contain any particles. Maxwell used a geometrical technique to determine the contents of cells in which only one fluid is present. The present procedure employs the Andrews' technique to set the fluid in these cells as that which previously occupied the larger proportion. The Courant condition ensures the success of this practice[4].

(C) Incorporation

Listings of the particle-tracking method subroutines are in Appendix C. The incorporation of the method into the PHOENICS-84 computer code over a typical time step is explained by means of the flow chart given in Figure 4.6. 63

m fluid 2

fluid 1 m+k

Figure 4.4 Assignment of fluids in a free-surface cell

particle string 4-

-º 1st segment

11Ai

A2

4-- 2nd segment

Figure 4.5 Area segmentation-calculation of area occupied by marked fluid in a free-surface cell 64

Specification of problem in Q1 file and GROUND

Solve flow field with initial and boundary conditions-

Calculate new positions I of the particles

Determine volume fraction I and density distributions

I Calculate flow field I for next time step

Fini

es

Figure 4.6 Solution sequence

The computation starts by solving for the flow field with initial and boundary conditions specified through the quick input file and ground-station subroutine of PHOENICS-84. With reference to the listing supplied in Appendix B, a density field is first computed in Group 9 from the initial distribution of the fluid volume fraction. Upon the completion of the solution for the first time step, the resulting velocity 65 field, of which the value is retrieved from EARTH in Group 19, is used to update the locations of particles according to equations (4.14) and (4.15). The new interface is then used to determine the volume fraction and density distribution for the next time step. The calculation of flow field on a new time level thereafter commences.

4.42 THE SCALAR-EQUATION METHOD

(A) Evolution of' the Scalar

The scalar-equation method defines the free surface by computing the advection of a conserved fluid property. This fluid property, denoted by CD, ranges from zero to unity. The surface occurs in the cells with fractional values, as shown in Figure 4.7(a).

The time dependence of in a Cartesian space is governed by the equation:

(4.18) a(Diat+ a(Du/aX + acv/ay =o

It may be noted that the above equation is derivable from equation (3.6), provided that the source vanishes and the coefficient of dissipation is zero. This implies that the interface movement is under the influence of pure convection. 66

0.6 0.4 0.1 0.0

0.4

1.0 1.0 0.9

1.0 1.0 1.0 0.9 fiý

Figure 4.7(a) The original interface separating two regions and the associated scalar values in neighbouring cells

Figure 4.7(b) The reconstructed interface using a piecewise-polynomial approximation 67

Upon solving equation (4.18), information regarding the distribution of 0 may be used to reconstruct the actual free surface, whereon appropriate boundary conditions must be imposed. Of the ways of doing , so, the interface recovery scheme first used by Debar[11] represents one of the many. In a mixed cell, the method employs the cb value for the cell under consideration and its eight neighbours to form a straight-line surface, see Figure 4.7(b).

(B) Density Determination

The obtaining of solution to the scalar equation also accommodates itself to the calculation of fluid propertities. A simple piece-wise linear function relating the fluid density and viscosity to the value of scalar b has been established[45]:

Pm- P1 + p24D (4.19)

gm: --91 + µ20 (4.20)

where subscript m refers to the properties of the fluid mixture in a cell; subscripts 1 and 2 refer to the properties of pertaining fluids. cb here can easily be interpreted as fluid enthapy, the value of which is, by definition, zero in one fluid and unity in another. Equations (4.19) and (4.20) therefore state that the properties 68

of the fluid are linear functions of the enthapy.

When, for example, the fluids in question are water and air, equations (4.19) and (4.20) become:

Pm = Pa + (Pw Pa)b (4.21)

µm = µa + (R-µa)(D (4.22) where subscripts w and a stand for water and air respectively.

It may be noted that the employment of equation (4.21) not only bridges the divide between a single-fluid solution algorithm and a multi-fluid flow, but it also lends itself, to some extent, to the reduction of the parasitic numerical diffusion. This possibility emerges from the consideration that while the smearing of cb may inevitably spread over a rather large body of fluid, the slope of the p-cb function can be artificially, yet advantageously, increased to preserve the sharpness of the density interface, as is shown in Figure 4.8. In this circumstance, the operators AMAX1 and AMIN1 in the FORTRAN language must be utilized so as to ensure the density value remain in the interval [pa, pW].

Because the scalar b is a step function, however, the method is worthless unless an algorithm can be devised to preserve its discontinuous nature. As is often noted, standard 69

finite-difference approximations lead to numerical smearing of such scale that the interface totally loses its sharp definition. In the present study, therefore, the approximation of 1 derivatives is accomplished by refering to a higher order convection scheme proposed by Van Leer[48]. It is to the construction of this method we now turn.

Pmax

Pmin

0 o- min (Dmax 1

Figure 4.8 p-c formula. If: CDs CD 0. CJ , = (Dz nax, ID=1.

(C) Formulation of the Van Leer Scheme

Instead of defining a fluid property b at the grid node, as is so for most of the standard finite-difference methods, the Van Leer approximation uses cell average of 1 over a finite time interval. This is accomplished by replacing the true initial-value distribution per cell by a simple approximation 70 function and then convecting the resultant distribution exactly. The choice of the approximating function thus determines the accuracy of the scheme.

Consider the following simple linear one-dimensional model equation

a(Diat+ UND/ax=0 (4.23) in which u is a positive constant.

If equation (4.23) is integrated in one space-time grid, one yields

xe to+1 to+1 xe J I+ (=0 di(t, x)dx uj o(t, x)dt (4.24) xw tn t xw which is equivalent to

((Dn+1_ (Dn)Sx+ (ue(be - uW(DW)St=0 (4.25)

where c" and (Dn+1are average values of D at the start and end of the n+1th time step respectively. (De and (DW are average values of 1 at the cell boundaries xe and xW over the time interval St respectively. 71

To cD for to the, evaluate e, example, we make resort characteristic solution of equation (4.23), which, subject to initial condition cb(O,x), is given by

D(t, x) = b(O, x-ut) (4.26)

The solution states that the b profile travels at constant velocity u along the x-direction without changing its shape.

The average value of cb on the east cell boundary during the time step St is defined as:

Xe

Oe = (1/u"8t)j cD(tn, x)dx (4.27) xe-u"St where b(tn, x) is the 1 profile at time nöt.

Let the profile be approximated by a Taylor series, which is expanded in the direction of the upwind cell P:

cD(tn,x)= (DP+ (a?iaxlP(X-x) + Eat(Diax2]P(X-XP)2/2! +""" (4.28)

where gradients are evaluated at the centre of the upwind cell.

When ignoring the terms order of higher than 6x2, a second 72

order representation of (De can be derived:

(4.29) (De= Op+ 6X[a(DiaX][i - u5t/6x]/2 u>0 or (4.30) (De= (DE- 6X[a(biax]E[1 + u8t/8x]/2 u<0

The gradient (a?/ax] is approximated using the central difference:

(4.31) [acDiax]p=[ E-(Dw]/26x

The difference between the upwind scheme and the present scheme is the addition of the second term on the right-hand side of equation (4.29), which may be regarded as a second-order correction to the first-order upwind scheme, valid in smooth regions of the flow. In nonsmooth regions, the presence of this term converts a monotonic scheme into a nonmonotonic scheme and consequently generates non- physical oscillation in the solution, so it is reasonable to limit its effect by multiplying it by some positive factor[38]. It has been found by Van Leer that successful algorithm

results if (a(D/ax)p is made to be determined from:

[a(D/ax]p= 2sgn(SQ)min(ISel, O. 5(ISe! +IöwI), ISWI)/Sx (4.32)

S. SW where = (DE-(DP, = (DP-(DW 73

and sgn(Se) =1 if Be z0

=-1 ifBe<0

If an extremum should occur, that is, if SQ"SW= 0, then the gradient is reduced to zero:

[acbiaX]p=0 if se"sw=0 (4.33)

The above 'limiter function' is referred to as a monotonicity condition. It guarantees that a monotonic initial-value distribution is numerically convected, the resulting distribution will be monotonic again.

The above is only applicable to the solution of the one- dimensional equation. If the flow is two-dimensional, then it is necessary to perform the computation in separate steps. The convection of D is accordingly split into two parts x and y, the order being x first, y second and y first, x second for alternate time step[52]. In so doing, it is advantageous to ensure the conservation of cell volume using the trick explained below.

When performing the x-direction convection

VP(Dp =1PcP + SVWI SVeýe (4.34)

When performing the y-direction convection 74

n+1 n+1 ** VP 'DP = VP(DP + SVS(DS- SVnOn (4.35) where the variable with an asterisk denotes an intermediate value and:

'6Ve = 6t6yue (4.36)

SVW= Stsyuw (4.37)

SVn = StSxvn (4.38)

SVS= StSxvs (4.39)

If we make

Vp=Vp+3VW-SV0 (4.40)

and

n+1 VP =Vp+SVs-8Vn (4.41)

then n+l= n+ Vp Vp (VW - SVe + SVS - SVn] = VP (4.42)

When the continuity condition is satisfied, the term in brackets disappears.

(D) Incorporation 75

Listings of the scalar-equation method subroutines are in Appendix D. The incorporation of the method into the PHOENICS-84 computer code is the same as that of the particle-tracking method apart from:

1) Solution of equation (4.18) for obtaining interface information (subroutine GHLEER).

2) Use of equation (4.21) for calculating fluid properties (GROUP 9 of GROUND).

4.5 CLOSURE

The features that deserve observation in the present chapter are:.

(A) Solution of Governing Differential Equation

1) Use of a staggered mesh grid.

2) Derivation of the finite-domain equation by integrating the differential equation over finite control volume under the assumption of 'upwind' interpolation.

3) Solution of the finite-domain equation group by the SIMPLEST algorithm. 76

(B) Tracking of Fluid Density Interface

The Particle-Tracking Method

1) Use a string of linearly connected particles to represent the free surface.

2) At the end of each time step, move the free surface to a new position according to the Lagrangian law.

3) At the start of each time step, determine a density field from the position of the free surface.

4) Use the density distribution in the solution of momentum equations for velocities.

The Scalar-Equation Method

1) Use a scalar variable D whose value remains in the interval [0,1] to identify the fluid.

2) Solve the convection of by means of the Van Leer scheme.

3) Compute a density field through a piece-wise linear formula which relates the properties of the fluid to the values of (D. 77

4) Use the density distribution in the solution of momentum equations for velocities. 78

5 EXPERIMENTAL STUDY

5.1 INTRODUCTION

Plainly a mathematical model which is both accurate and realistic would be invaluable as a replacement of experiment; but all mathematical models require the comparison of predictions with experimental data for their evaluation. The purposes of this chapter, therefore, are:

1) to obtain photographic records of the flow patterns in a tilted tank for comparison with numerical predictions.

2) to observe in detail the sloshing motion arising in the flow of studied by way of appropriate visualization technique.

Of the first objective, attention has been given to the gathering of such information as the sloshing frequency, wave amplitude and free-surface profile.

The remainder of this chapter is composed of four sections. In the first of which is given a description of the experimental 79 set-up and operational procedure. This is followed by a section where some sample results are presented. Section 5.4 discusses the flow phenomena recorded. Finally, in Section 5.5, a summary is given of what has been achieved in this experimental investigation.

5.2 EXPERIMENTAL SET-UP

5.21 APPARATUS

The experiments are carried out in a 30.6*28.8*1.5 cm perspex tank as shown in Figure 5.1(a). An 8 mm hole is drilled at the top of this box for the valve-a rubber plug-through which the tank is filled up or emptied. Another smaller hole is drilled at the bottom, of which the function is to accelerate the drainage process and prevent liquid from bubbling.

The tank is held together with a piece of wood by simply screwing the former on to the latter, which in turn is attached to the end of a horizontal shaft through a flange.

This assembly is then mounted on to a heavy steel frame. Figure 5.1(b) shows the relative position of the tank on the round board, along with a circumferential grid accompanied by the indicated pointer to measure the tilt angle. The overall arrangement of the apparatus is schematically depicted in Figure 5.1(c). Photographs (a) and (b) in Figure 5.2 give the front and side views of the rig respectively. 80

0.8 cm

(a) (b)

I

.. j

(c)

Figure 5.1 Schematics of the experimental apparatus. 81

ý. .ü ý_

ý ý!

.i

(a)

Figure 5.2 Photographs of the experimental apparatus. 82

(b)

Figure 5.2 Continued. 83

The liquids used, apart from the omnipresent air, are tap water and kerosine. To make the fluid interface clearly visible, a small amount of dye (Nigorosine) is dissolved in the water. This addition of dye has no measurable effect on the properties of the liquid. When both water and kerosine are involved in the flow, the surface tension force prevailing at their contact surface is reduced by the use of R. B. S. 35 solution.

The flow patterns created inside the tank are recorded simultaneously by means of still photographs and motion pictures. The camera used to take the still photographs is a Canon Al fitted with a 1: 1.8 standard lens and a powered film winder which enables the photographs to be taken at rates of 2 or 5 frames a second. To improve the contrast between the flow and the background, a 1000-watt halogen lamp is illuminated as the light source. For the film rated at 400 ASA the shutter speed is then generally set to 1/250 sec. at f/4.5.

The motion pictures are obtained with a Sony Trinicon video camera and a Sony SL-C9UB video cassette recorder. They are adopted during the course of the present study for two reasons. First, the 'record-and-review' facility of this system avoids the time-consuming tasks of film developing and printing implied by the use of still camera. Secondly and more importantly, it provides the time-reference 'hallmark' with which the real time corresponding to each film can be accurately calibrated. 84

5.52 PROCEDURE

An experimental run is performed in four steps:

1) The horizontally placed tank is filled with dyed tap water to a predetermined height.

2) The kerosine is added on to the top of the water with care, so that a sharp interface can be maintained.

3) The system is tilted to a predetermined angle and is allowed to settle for a couple of minutes. Preparation and adjustment of the recording equipments are accomplished in the mean time.

4) The tank is set in motion by hand rotation and recording is initiated just before the rotation to catch the start.

5.3 EXPERIMENTAL RESULTS

The experimental runs chosen for presentation are those which reveal the effects of a range of parameters on the flow patterns arising in the tank.

Table 5.1 displays a summary of the experimental conditions under which test runs are conducted. It covers both water/air (two-fluid) flow and water/kerosine/air (three-fluid) flow. 85

As can be seen, the influences of three of the parameters, liquid height, tilt angle and kerosine thickness, have been investigated. The liquid height is measured when the tank is horizontally placed. The range of the tilt angle variation has been determined so as to prevent the wave from breaking on the two side walls of the tank.

Table 5.1 Summary of experimental conditions

water kerosene tilt angle* run no height thickness rotation . a1 a2 time (s) 1 14 0 30 -1 0.36 2 14 0 25 0 0.32 two-fluid 3 14 0 30 4.5 0.36 system 4 10 0 25 0 0.32 5 10 0 40 0 0.40 6 18 0 25 1 0.32 7 12 2 25 2 0.32 8 12 2 30 0.5 0.36 three-fluid 9 12 2 30 1 0.40 sy stem 10 10 4 20 5 0.28 11 10 4 25 4 0.36

Definitions of a1 and a2 are to be found in Figure 6.1 of Chapter 6. 86

5.4 DISCUSSION

The sequence of films for run 4 is given in Figure 5.3. The Coriolis and centrifugal force due to rotation and the transformation of potential energy into kinetic energy cause the liquid to climb up along the right wall of the tank. After the wave has reached its highest level-a position of maximum potential energy-it starts to fall and rush from the right to the left. This thus finishes the first cycle of the sloshing motion. In the absence of friction, this energy transformation process would continue for ever. The true picture observed, however, is that the sloshing scale gets smaller and smaller as the time proceeds. No wave breaking is created in this moderate run. It may also be noted that the first run-up of the liquid has a rather blunt top. Sharp peakings then follow on both side walls once the gravitational acceleration becomes the only driving force. 87

t=0.24 sec t=0.48 sec

t U.; '6 sec t=1.00 sec

t=1.24 sec t-1.51 sec

Figure 5.3 Photographs of run 4. 88

t=1.76 sec t=2.00 sec

t=2.28 sec t=2.56 sec

Figure 5.3 Continued. 89

Photographs in Figure 5.4 show the results of run 5. In this case, after the rotation is started, the liquid first experiences a 'head-on' collision with the right wall before starting to climbing. Upon the impact the wave forms a tall, thin sheet of water on the wall. It then ascends and reaches its highest possible location where the liquid gains the maximum potential energy. It is noticed at this stage that the wave breaks and consequently creates a small rolling motion at the peak. This wave of high potential rushes leftward and provokes a very large run-up on the opposite wall. The flow is thereafter under the sole influence of the gravitational force and thus resembles to what has been the typical sloshing pattern observed in the last run. No significant difference is found of the wave shape between the present run and the previous one, apart of course from the fact that run 5 has a larger wave amplitude and a higher sloshing frequency.

ýp 90

t=0.33 sec t=0.56 sec

t- 11: L _ '

iu. 88 sec t=1.12 sec

=ý ý r .

`. ý »ý , ý- hý - r - . ý ý ý ,. 1

t=1.36 sec t=1.60 sec

Figure 5.4 Photographs of run 5. 91

t=1.88 sec t=2.08 sec

t=2.36 sec t=2.64 sec

Figure 5.4 Continued. 92

Experimental results for run 9 are supplied in Figure 5.6. This test involves two wavy interfaces, in contrast to the last two runs where there is only one simple, smooth surface separating the fluids. With a layer of kerosine on its top, the movement of the water surface is expected to be restricted. Accordingly, the distortion of the upper free surface is more pronounced than that of the interface joining water and kerosine. The fact that a rather ragged water-kerosine interface appears may suggest that the presences of surface tension and viscous force there entail physical instability.

Finally, it is worth pointing out that the two-dimensionality of the flow is satisfactorily preserved; this is a condition which is assumed by the numerical modelling, which is to be reported in the next chapter. 93

t =0. '6 sec t =0.40 sec

t=0.64 sec t=0.88 sec

t=1.12 sec t=1.40 sec

Figure 5.5 Photographs of run 9. 94

t=1.68 sec LC

t=2.20 sec t=2.48 sec

Figure 5.5 Continued. 95

5.5 CLOSURE

A simple experimental rig has been constructed for the investigation of sloshing of liquids inside a tilted rectangular tank, under both two-fluid and three-fluid conditions. Records have been obtained of the flow patterns over a wide variety of parameters on both video tape and photographs. In so doing, this chapter has-achieved what were defined as its two goals at the outset, namely the obtaining of experimental data for validation of mathematical models and the observation of sloshing patterns arising in the flow. 96

6 PREDICTION OF EXPERIMENT

6.1 INTRODUCTION

The only way in which the physical, correctness of a mathematical model can be assessed is to apply it to the simulation of a real problem. This chapter tests the performance of the two numerical methods previously described by comparison with experimental results.

Before consideration of the details of computation and the analyses of solution, it is useful to define some parameters which control the flow being considered. They are:

Tilt angIEL a geometrical quantity defined as:

A= (a1+ a2)n/180 (rad)

where a1 and a2 are the two angles

defined in Figure 6.1.

Angular velocity, the ratio of tilt angle to time of rotation Q= A/At (rad/s) 97

where of is the rotation duration. It can be seen from this definition that, for the present study, a uniform angular velocity is assumed.

Liquid height a geometrical quantity measured when the tank is horizontally placed: D=dw+dk (cm)

where dw and dk are the water depth

and kerosine thickness respectively. For the computations made in this

chapter, dk is equal to zero.

In the sections which follow, the problem is first identified by way of qualitative description and then by a mathematical formulation. The experimental conditions and computational details are stated in Sections 6.3 and 6.4 respectively. Sample results are provided in Section 6.5. Experimental verification of the numerical models is in Section 6.6. Finally, section 6.7 contains some concluding remarks.

6.2 THE PROBLEM

A sketch defining the problem is depicted in Figure 6.1 below. 98

Q

1

by rotation

Figure 6.1 Definition sketch for sloshing of a liquid in a tank 99

Gravitational force g causes a liquid to seek the lowest possible level, that is, position of minimum potential energy; hence, the liquid in shadowed region of Figure 6.1 will not maintain its relative location to the rotating container. Instead the liquid of higher pptential at the left hand starts to push its right hand neighbour making the latter rise. This transformation of potential energy into kinetic energy ranks first among the three factors which initiate the sloshing motion; the other two are the Coriolis and centrifugal force due to the rotation of the container. After the initial rotation period has ceased, the fluid continues to slosh right and left under the drive of gravity.

The mathematical representation of the above physical process is simplified when the frame of reference is attached to the container. With the coordinate system indicated in Figure 6.1, two additional terms which account for the effects of the Coriolis and centrifugal force must be added to the 'conventional' momentum conservation equation[32]. The governing equations are thus:

Max + aviay=o (s.1)

apu/at + apu2/ax + apuv/ay - 2pflv = -ap/ax + p(SZ2x + gx)

+ µ(ä2u/ax2 + a2u/ax2) (6.2) 100

apv/at+ apuv/ax + apv2/ay + 2pflu = -ap/ay + p(S22y + gy) + µ(a2viaX2+ a2viay2) (6.3) where i2 is non-zero only in the course of rotation. gX and gy are the two components of the gravitational force and are functions of time, but they remain fixed in time once the rotation is over. Also, it must be borne in mind that, because of the use of a staggered grid, the values of u and v in the Coriolis forces are calculated from

u=(ul+u2+u3+u4)/4 (6.4)

v= (v1 + v2 + v3 + v4)/4 (6.5)

where ui and vi (1=1,2,3 and 4) are the x and y components of velocity originally stored at the four corners of the control volume over which the equation in question is integrated.

6.3 PHYSICAL CONDITIONS

As was summarized in Table 5.1, experimental runs 2 and 5 selected for computation have the following simulated conditions:

D: run2 -14 (cm) run 5 10 (cm) 101

A: run 2 0.436 (rad)

run 5 0.698 (rad)

K2: run2 1.363 (rad/s)

run 5 1.745 (rad/s)

Properties of fluids

Density of water pW = 9.960E+2 (kg/m3),

Density of air Pa = 1.205E+0 (kg/m3)

Viscosity of water µN, = 9.960E-4 (N"s/m2)

Viscosity of air µa = 1.808E-5 (N"s/m2)

The properties of fluid mixtures are computed in the course of computation according to the linear relation specified in Chapter 4.

p=U=v=0 throughout the domain

When the scalar-equation method is in use

CD=1 in region occupied by water

CD=0 in the remainder of the flow domain 102

or, when the particle-tracking method is in use, the particles are initially assigned along the motionless free surface.

The x and y components of velocity are both zero at the wall.

The gradient of the scalar along the normal to the wall is zero:

a(DiaX=0 at left and right walls ab/ay =0 at top and bottom walls

A reference pressure of zero is set in the top right corner cell so as to define a unique pressure field for the computation.

6.4 COMPUTATIONAL DETAILS

6.41 GRID-CELL-SIZE SELECTION

In order to ascertain the effect of grid-cell size on the accuracy of the solution, the numerical results of run 5 have been obtained for a number of grid arrangements at the time when the wave makes an impact on the right wall of the tank. These results are shown in Figure 6.2 in the form of a 103 free-surface contour plot. In test (a) where the domain of interest is coverd by a 22*20 cell grid, the tall, thin sheet of wave run-up is hardly seen, indicating the inadequacy of number of cells. In test (b) where the number of cells is increased to 32*30, the resolution of wave run-up is still insufficient in comparison with the experimental result shown by the second picture of Figure 6.4. It may be said that the inadequacy of the prediction of local free-surface shape is due to the type of method being used to represent the interface. The average nature of the scalar-equation method and the way in which the free-surface profiles are drawn render it difficult without an excessive use of computer resource to reveal the fine structure of the surface. This argument is supported by an examination of diagram (d) showing the result of the particle-tracking method obtained using the same grid. The thin, finger like shape appearing in experiment is very well recovered. In addition, the continuation of the computation shows that the forthcoming free-surface profiles deviate very little if at all from those calculated on a finer grid. The use of a 38*36 grid system does improve the free-surface shape in the vicinity of the wave finger, as is evident from picture (c), but the global formation tends to cease to change considerably. Trading off economy and accuracy, the 32*30 uniformly-spaced cell arrangement is employed for the rest of the computation reported in this chapter. 104

NY*NX=20*22 NY*NX=36+38

(a) (C)

NY+wNX=30*32 NY*NX=30*32

(b) (d)

Figure 6.2 Grid-independenttest. 105

6.42 TIME-STEP-SIZE SELECTION

In view of the restriction imposed on the present explicit methods for the tracking of free surface, the choice of time step is confined to the Courant condition required for a stable and accurate numerical solution. The following constraint therefore must be observed in deciding the time increment

Sx/hui Sts mini , Sy/ivi (6.6) where Sx and Sy are the x and y dimensions of a grid cell and minimum sign is with respect to every cell in the flow domain.

For the two flow configurations considered, the time step sizes are:

Run 2 St = 0.0050 sec.

Run 5 St = 0.0025 sec.

6.43 CONVERGENCE

The tolerances for the absolute errors in the volumetric and momentum imbalances summed up over the entire computational region are 1.0E-6 and 1.0E-4 respectively. The quick achievement of a fully converged solution is quaranteed by the use of linear over-relaxation on the fluid pressure. Typically, ten sweeps of the flow domain are needed to meet 106 the above criteria.

6.5 PRESENTATION OF RESULTS

FREE-SURFACE PROFILE

Figure 6.3 shows plots of the free-surface profiles predicted by the scalar-equation method (middle pictures) and the (bottom for 2. particle-tracking method . pictures) run Photographs given at the top are the simulated experiment. The experiments (left) and predictions (right) for run 5 are presented in Figure 6.4 for a number of time instances.

VELOCITY VECTOR PLOT

The velocity vector plots corresponding to run 5 are presented in Figure 6.5.

DIMENSIONLESS STREAMLINE PLOT

The stream function in a Cartesian space is defined as:

u= -a(Piay (6.7) _ +aq/aX (6.8)

Streamlines of the flow field correspond to cp= constant. The location of the centre of rotation for which u=v=0 is where cp reaches its maximum value. 107

The plots drawn in Figure 6.6 are from run 5 and are in terms of the dimensionless stream function computed as:

8_ ((P-(Pmin)l((Pmax-amin) (6.9)

where 'pmin and cpmax are the minimum and maximum stream function values available in the field at each time step.

6.6 DISCUSSION OF RESULTS

An inspection of Figures 6.3,6.4,6.5, and 6.6 reveals the following:

1) Comparison of results of the scalar-equation method with those of the particle-tracking method shows that the two mathematical models predict the physical problem very similarly. Some small differences, however, are noticeable, in particular

in the neighbourhood of those wave segments where fine grids are required to resolve the details of the physical contents. It may be generally said that the particle-tracking method is more capable of revealing subgrid information while the scalar-equation method ensures smooth interfaces. 108

t=0.00 sec t=0.36 sec

Figure 6.3 Prediction of free-surface profile for run 2. 109

t=0.60 sec t=0.88 sec

Figure 6.3 Continued. 110

t=1.16 sec t=1.40 sec

Figure 6.3 Continued. 111

t=1.68 sec t=1.94 sec

Figure 6.3 Continued. 112

......

t=2.20 sec t=2.48 sec

Figure 6.3 Continued. 113

t=2.80 sec t=3.04 sec

Figure 6.3 Continued. 114

2) Comparison of results of the predictions with those of the experiments `shows that the mathematical models are especially good at predicting the sloshing frequency and wave amplitude. Of the free-surface shape, it is noted that the overall differences between numerical solutions and experimental evidence are satisfactorily small. In this respect, it may be said that the results of the particle-tracking method in local regions bear a closer resemblance to reality than those of its rival do. The close agreement between the computational results and the experimental data of these three important parameters maintains until the late stage of the process. This confirms the credibility of the current numerical methods.

3) Discrepancies do exist. They may be mainly imputed to the following sources of errors.

a) The difficulty with the exact control over experimental conditions. It is thus inevitable that there are minor inconsistencies between the computer inputs and physical data.

b) Numerical diffusion errors associated with the approximation method. Errors of this kind are unavoidable as long as a 115

t=0.00 sec

t=0.33 sec

t=0.56 sec

Figure 6.4 Prediction of free-surface profile for run 5. 116

t=0.88 sec

t=1.12 sec

t=1.36 sec

Figure 6.4 Continued. 117

t=1.88 sec

t=2.08 sec

t=2.36 sec

Figure 6.4 Continued. 118

numerical method is in use. Its reduction in solving the scalar conservation equation is of paramount importance. By virtue of the Van Leer advection scheme, its influence on the solution is reducing to an acceptable level.

c) Limitation on the computing resources. This precludes the possibility of producing results which are free of numerical errors. The employment of a variable-grid system, which at present is not the feature of the Van Leer scheme used, can considerably increase the accuracy without an over requirement for the computer.

4) The velocity vector plots provided in Figure 6.5 for run 5 show that the general flow tendency is well within expectation. The big vortex ring changes its location of centre of rotation as the water sloshes right and left. A flow pattern of this type is typical in many practical situations. The success of the mathematical models and solution procedure in handling the present physical phenomenon speaks for themselves for their application to other uses.

5) The streamline contours based on equation (6.6), are depicted in Figure 6.6. The flow patterns are 119

00.E ...... ý1 ... /11I I/ ýý- yI .. 1 1$ l1lt1111 1/ 1 \Iltý .. /t111 1}( IIIIIrrr""""".. --__"___. +++. .rr r/ r/ I/ II111111 ."1.1 1111 11 1.. 1//Illrrrrrr----__--.. _+++ý\\\111 ýý fýýýýr 1111...... 1 11 11 r1ýý"/P rrr. 00.. 1.. //Irrr-rrw. -r-.. ----.. +ý\\ 11 11 ..... ýý\4'ý rýirrorr...... "

......

" ...... +_. __.. _rr_rrrrrr. -ýiýý, ...... +--.. --rr--r--. ".. r.. ý iIf

t=0.33 sec t=0.56 sec

11111.. /. I

1.. ý11ý)TfftIfIIIIJlIýýý -ý 1111 1... 111111111111fº JJi T21111 tl... \1111\\\\\\11 Jý'L JJJý...... /I Z1t111\ý. iiiii 11.... E\\1111ý1111ý ". Iý\\\ý-ilia-'4tttt """. 1)1. . 114%%%%1\\%.. --....., 11... 1ý 1ý4\\'ý1 ýJ1 /': J11t tf1. .. 1t, 1\1\\'\ýl'ý 11... 11%%\\\ý...... /'JJ11 111. """.... ý111VýTý

111.. ýII Iý.. " ýý -ý. ". /1\ý-...... III 1/ ýI l .... "". 1...... III1/ t1. t..

t=0.88 sec t=1.36 sec

llr.. ýý\\, l wr. 1IIrIIrr. r.. r. 11... "...... fit\\tt/ 111"""w"rrrrrrrrrr..... ýý\ý1 IJI"" ".. "". ".. .. "t\ltttl a/I"""r"rrrrrrrrr. rr. r.. ýý\ý 111" """""" .. ttttll /I r... rrrrrrrrr rrrrrr.. ' j/Ilr. rrrrrrrrrrrrlr.. "-ý1 {1{1...... 11111 Jllrrrrrrrrrrrrrrrr.. "ý11 11111"""" """ ... ft11 /Irrrrrrr. r...... r. ". ILlttt. "" """ 111 ', "" ... ý/Illrrrrrrr. rrrrr.. "1l11 ILtttttý"""""" :... " ". If1 ýt/I/ f111111!! "IIIIIIII.... Ittttttý".....: .. r. If 1ttttt\ý.. """""""""".. rIl1i Itltttýýý. "... "... ". .. II1 . tttttý...... "" .. 9911 .ttt"...... - ...... /I ------11ýýýýýýrvr. ý. ý.. rrrrrrrr. IIII1f1 11ýýýý\ýýýý"... "rr rrr rrrrýIl/Iffl 11ýýýýýý"ýý.. "r rrrrrrr.. r. II11111

"1 1/. t" S" ". " .. ý. rr...... IIIII11 ". ". tt. "...... r... i .... III 1I1t

"1t -r-.

t=1.88 sec t=2.36 sec

Figure 6.5 Velocity vectors for run 5. 120

Ö 0 t=0.33 sec t=0.56 sec

Qo 0 t=0.88 sec t=1.36 sec

t=1.88 sec t=2.36 sec

Figure 6.6 Streamline patterns for run 5. 121

clearly visualized in this way. According to the definition of the stream function, the stream function obtains a maximum value at the centre of rotation. The lines of closure are stretched along different directions depending on the relative position of the water surface in the tank.

6.7 CLOSURE

In this chapter, the experimental verification of the scalar- equation and particle-tracking methods is described. In so doing, it has been demonstrated that:

1) The mathematical models are capable of predicting the physical process of concern with necessary degrees of realism and accuracy. In particular, the numerical wave amplitude and sloshing frequency have been found to be in close agreement with those of the experiment. The free-surface profile on a whole also agrees well with the experimental data.

2) In terms of fine wave structure, some discrepancies do exist between the theoretical predictions and experimental evidence, for reasons which have already been indicated.

3) Although false diffusion can considerably affect the final result of a numerical calculation, the 122

present prediction, because of the use of Van Leer advection scheme for solving the fluid marker b equation, seems not to suffer from any significant alterations of free-surface shape.

4) The hydrodynamic results show that the mathematical models and solution procedure can deal with such physical features as the creation of a vortex ring and the development of a boundary layer on walls. 123

7 COLLAPSE OF A LIQUID COLUMN

7.1 INTRODUCTION

Having verified the computer simulation for the sloshing of water in a tilted tank in the previous chapter, we centre our attention in the present chapter on the computation of a free- surface benchmark problem-the collapse of a liquid column- for which both analytical and experimental information are available for comparison with the calculated results.

A summary of the chapter follows; Section 7.2 gives a qualitative description of the problem in question. Section 7.3 defines the computational conditions which are from either experimental measurements or calculational specifications. The computational details of the present study are contained in Section 7.4. This is followed by Section 7.5, in which the calculated results are presented. Section 7.6 then discusses the significance of the computed solutions and evaluates the performance of the models. Finally, in Section 7.7, the main achievements of the investigation are summarized. 124

7.2 THE PROBLEM

The problem under consideration is a column of water, in hydrostatic equilibrium, being confined between two vertical walls. Gravitational force acting downward causes a liquid to seek the lowest possible level, therefore, the water column can not stand up on a flat surface. At the beginning of the calculation, when the right wall (dam) is suddenly removed, the water will flow out along a dry horizontal floor and form an advancing wave. Figure 7.1 shows a typical collapsing column and defines the relevant flow dimensions.

This is a good test problem because it involves simple boundary conditions and has a simple initial configuration. The appearance of both a vertical and horizontal free surface, however, provides a check on the capability of the mathematical models to treat free surfaces which are not single valued with respect to x or y coordinate.

Figure 7.1 Definition sketch for collapse of a liquid column on a floor 125

7.3 PHYSICAL CONDITIONS

7.31 FLOW CONFIGURATION

Predictions are made of three flow geometries of which the first corresponds to Hirt and Nichols' specifications, the other two conform to the experimental conditions of Martin and Moyce.

1) Rectangular section column

1 (m) b= 2a (m) (m/s2) a= , ' gy =1 2) Square section column (m) (m) 9.81 (m/s2) a=0.05715 ,b=1a , gy = 3) Semi-circular section column (m) (m) 9.81 (m/s2) a=0.05080 ,b=1a , gy =

Fluid properties are those under ambient temperature:

1.205E+0 (kg/m3) 1.810E-5 (N"s/m2) Pa = , ga = 9.980E+2 (kg/m3) 1.010E-3 (N"s/m2) pW= , µW =

7.32 INITIAL AND BOUNDARY CONDITIONS

At the beginning of each calculation, the following distributions of flow variables prevail:

p=u=v=0 everywhere in the flow domain 126

=i where occupied by water 0=0 where occupied by air

Four side boundaries are denoted in terms of orientation:

West: acb(O, y; t)/ax =0 (7.1) u(O,y;t) = v(O,y;t) =0 East: a(D(L, y; t)/ax =0 (7.2)

u(L, y; t) = v(L, y; t) =0

South: acb(x, O;t)/ay =0 (7.3) u(x,O; t) = v(x,O; t) =0 North: a(D(x, D; t)/ay =0 (7.4)

u(x, D;t) = v(x, D;t) =0

They are valid in time range (0,00).

In addition, a reference pressure is chosen at the upper right corner of the flow domain to define a unique pressure field.

7.4 COMPUTATIONAL DETAILS

7.41 GRID-CELL-SIZE SELECTION

In order to examine the influence of cell size on the accuracy of the numerical solution, three grids, containing respectively 22*20,22*40 and 44*40 cells, have been employed to calculate the flow with initial rectangular section column. Both the horizontal cell spacing and vertical cell spacing are uniform 127

for all three grids. With the cell size being a parameter and the time scale an independent variable Figure 7.2(a) exhibits the variation of the position of wave leading edge and Figure 7.2(b) displays the reduction in the height of water column. It can be seen from these two pictures that the grid consisting of 22*40 cells produces results which are sufficiently free of numerical errors. Accordingly, the calculations performed thereafter are mainly based on this grid arrangement.

7.42 TIME-STEP-SIZE SELECTION

No systematic study has been performed of the effect of time-step size on the accuracy of the numerical solution. However, owing to the explicit nature of the numerical procedure for solving the scalar equation, the size of the time-step, St, is chosen to satisfy the limitation imposed by numerical stability requirements. To secure the accuracy, restriction must be observed in determining the time step such that:

St Sx/iui Sy/ivi 1 (7.5) :5 mini ,

For the three flow examples considered, time-steps are:

1) St = 0.010 sec.

2) St = 0.010 sec. (7.6)

3) St = 0.005 sec. 128

dotted line 22*20 solid line 22*40 dashed line 44*40

(')

N", N

r

0.0 0 0.60 1.20 1.80 2.40 T (a)

C3

dotted line 22*20 solid line 22 40 dashed line 44*40

0

Z^ 0

C;

CD ýt Of " 0.60 1.20 1.80 2.40 T (b)

Figure 7.2 Grid-independenttest. 129

7.43 CONVERGENCE

Care is taken to ensure the achievement of fully converged solution. Relaxation of the LINRLX type on the fluid pressure has been used to promote the speed of computation. A value of 1.3 is found not far from the optimum. A tolerance of 1.0E-5 is set on the errors in both mass conservation and momentum balance. Typically, ten sweeps of the finite domain are needed to meet the above criteria.

7.5 PRESENTATION OF RESULTS

7.51 HYDRODYNAMIC RESULTS

Figures 7.3 and 7.4 show the predicted velocity vector plot and streamline contour plots for the rectangular section column. The stream function cp,is by definition:

D

cp=Judx (7.7) 0

which can be normalized in the zero and one range using the maximum and minimum values available in the field:

O= ((P-Tmin)/(Pmax-(Pmin) (7.8) 130

1111111111'%%. ". ""......

11{1º1{11{1tt"11tt"t"11, """".... "... ". 1I111t{ttt%tt"111{$\111", """...... 11"t"tt"%\%%%%1111111,,, """"". "... ". I11III\P. P. %\%%%"I111111ItI"""". ". "".. "I 1" tIP. t\% \ \\ I1I1I1f1I I"

tIfff III """"""S. %P. re*. ` rrr ""......

ryyyýywl ý

t=O. 9sec'

"11. \\\1%%\\". \\\\1\11/11"11. "1 1"\\ .. %%*\\ r vrr+1 1111111111.1 111. .... \. ".. %r%% vtirw ""1111111111"""..

..... ++rr...... -.. rte ..

t=1.4sec

... " ".. % . v.. "ý11- 1-.. 1-.. -. --- ... "S1

""... "_-.. -- r .. y. -.. ý. r. r.. ý' '" rI

t=2.0sec

Figure 7.3 Velocity vectors for the rectangular section column. 131

o0Ot=O. 9sec

Ot=1.4sec

t=2.0sec

Figure 7.4 Streamline patterns for the rectangular section column. 132

7.52 FREE-SURFACE PROFILES

Figure 7.5 shows the predicted free-surface profiles for the flow with initial rectangular section column. Results in relation to the pictures starting from the top left clockwise are obtained with:

a) the volume of fluid (VOF) method, free surface

drawn as F =1/2 contour line.

b) the particle-tracking method, free surface drawn as coordinates of particles.

C) the scalar-equation method, free surface drawn using the transformation: NY hi =E BY-(Dk (7.9) k=1

in which hi is the elevation of the free surface in

relation to the horizontal floor at xi = Sx/2+i"Sx

(i=0,1, """,NX-1).

d) the scalar-equation method, free surface drawn as

=1/2 contour line. 133

(a) (b)

(d) (c)

t=0.00 sec

(a) (b)

(d) (C)

t=0.90 sec

Figure 7.5 Prediction of free-surface profile for the rectangularsection column. 134

::::

(a)

(d) (c).

t=1.40 sec

......

(d). (c)

t=2.00 sec

Figure 7.5 Continued. 135

Using the scalar-equation and particle-tracking methods, predictions for the flows with initial square and semi- circular section columns are presented schematically in Figures 7.6 and 7.7. The significance of each picture sequence is indicated by the caption.

7.53 WAVE HEIGHTS AND WAVE FRONT LOCATIONS

Measurements on the reduction in water column height and the position of water leading edge are plotted in Figures 7.8 and 7.9, together with their corresponding numerical predictions. All diagrams are drawn in accordance with the following notation:

Z=4/a

H=r/b (7.10)

T= W(g/a)

The zero times for the experimental results are adjusted, before presentation, to agree with the zero times of the computed results. This adjustment, of which numerical value is in the range 0.02 to 0.03 seconds, is reasonable in view of the uncertainty about the starting time expressed by Martin and Moyce.

I 136

7.6 DISCUSSION OF RESULTS

7.61 COMPARISON WITH ANALYTICAL SOLUTION

The velocity vector fields in Figure 7.3 and the streamline patterns in Figure 7.4 give an overall picture of the flow considered. It is interesting to note that the size of the recirculation zone increases and stretches in the direction to which the water flows.

The computed results reported by Hirt and Nichols for the flow with initial rectangular section column are reproduced here in Figure 7.5; however, their free-surface profile plots were drawn as F =1/2 level contour line, which explains why the top right corner of the water column at time zero is not at 90 degrees. Free-surface profiles from the present calculation, using either the scalar-equation or the particle- tracking method, are supplied side by side for comparison. It is evident from these pictures that prediction of the scalar- equation method is in close agreement with that of the VOF method. It is also true of resemblance of the particle- tracking solution with the scalar-equation solution, in particular when the latter is drawn with the aid of equation (7.9).

It is worth mentioning at this stage that, in Hirt and Nichols' study, a numerical approximation referred to as a donor- acceptor method[37], was used to calculate the flux of the volume fraction of fluid across the cell boundary. While it 137

has the merit of reducing numerical diffusion, this method also suffers from the fact that it often induces non-physical oscillations in the flow regions where steep gradients of fluid variables are expected and, as a consequence, some distortion of the free surface, which is precisely what it was intended to avoid in the first place. The use of the Var, Leer method, as it is the case in the current study, seems to produce solution which is very similar to that of the donor-acceptor on a whole, but at the same time give a much smoother free-surface profile.

As it is being like this, it may be said that the Van Leer scheme for advection combats numerical diffusion without introducing non-physical oscillations.

Slight discrepancies, mainly observable in the vicinity of the water leading edge, may in great part be attributed to the lack of cell and the way through which the cell is distributed. The numerical errors thus induced account for the difference in a region where a fine resolution is necessary to define accurately the thin wave front of the advancing water.

Figures 7.6 and 7.7 compare the results of the scalar-equation method with those of the particle-tracking method as both of them are applied to model Martin and Moyce's experimental investigation. A square section column and a semi-circular section column are considered. An inspection of these graphs reveals that the solutions of the two computational approaches agree well, in particular at the early stage of 138

t=0.00 sec

t=0.20 sec

Figure 7.6 Prediction of free-surface profile for the square section column. 139

t=0.40 sec

t=0.60 sec

Figure 7.6 Continued. 140

t=0.80 sec

t=1.00 sec

Figure 7.6 Continued. 141 water collapsing. The incongruity observed in the neighbourhood of the wave front at the later stage suggests the following explanations.

In solving the scalar equation, a uniform distribution of cells in the flow domain is required by the present version of the Van Leer advection scheme. This limitation precludes the possibility of increasing, with advantage, the cell density at the bottom of the grid to resolve the thin water layer directly adjacent to the horizontal floor. The employment of a relatively coarse grid at the place where high accuracy is needed therefore tends to increase the magnitude of numerical diffusion, which value should be reduced to a minimum level possible.

As for the results obtained with the particle-tracking method, the location of the free-surface profile is only dependent on the solution of the velocity field. No numerical diffusion is thus involved in determining, though by interpolation, the particle positions. Besides, the plots are directly drawn in terms of the real coordinates of the particles. This also explains the stronger resemblance between the particle-tracking results and the scalar-equation results plotted with the help of equation (7.9) in Figure 7.5. 142

t=0.00 sec

t=0.05 sec

Figure 7.7 Prediction of free-surface profile for the semi-circularsection column. 143

t=0.10 sec

t=0.15 sec

Figure 7.7 Continued. 144

...,.., tl{tilý4if4; ISPlilfl41S11lt43!i! ililltllt411tlt: IS{ý!!{ýililS f ýf ..::....

t=0.20 sec

t=0.25 sec

Figure 7.7 Continued. 145

7.62 COMPARISON WITH EXPERIMENTAL EVIDENCE

The diagrams shown in Figures 7.8 and 7.9 demonstrate that the scalar-equation method can realistically predict the collapse of a liquid column. The computed values of wave front Z and column height H agree well with the experimental data. The calculated position of the wave front has been determined by making the assumption that a horizontal coordinate, at which the free-surface elevation obtained using equation (7.9) is smaller than half of the cell vertical size By, represents the true location of the water leading edge.

The predictions start to differ from the experiments when the computation is carried out to such an extent after which the fluid only occupies a few rows of cells from the grid bottom. This is especially true for the case of a square section column. The discrepancies may again, among other reasons, be imputed to the sparseness of the cell in the region of thin water layer and as a consequence the introduction of numerical diffusion. 146

O O

PREDICTION OOO EXPERIMENT

u7

O N°

O N

N

CD 0 0.00 1.00 2.00 3.010 4.00 T

Figure 7.8(a) Z versus T for the square collapsing column.

CD o.

PREDICTION 0OO EXPERIMENT un N 0

0 29 0

in N 0

o 0 °0.00T1Ö 2.00 3.00 4.00 T

Figure 7.8(b) H versus T for the square collapsing column. 147

C3 N

PREDICTION OOO EXPERIMENT C3 0 41

CD N° c)

C3 0 N

0 0 X0.00 1.00 2.00 3.00 4.00 T

Figure 7.9(a) Z versus T for the semi-circular collapsing column.

C3 0 T

PREDICTION OOO EXPERIMENT

0 0

= u' 0

O

0 0 °0.00 1.00 2.00 3.00 4.00 T

Figure 7.9(b) H versus T for the semi-circular collapsing column. 148

7.7 CLOSURE

This chapter is concerned with the application of the two mathematical models in a free-surface benchmark problem, viz, the collapse of a liquid column. To assess the performance of the numerical methods, both experimental data and analytical solutions available in the literature are chosen for comparison. The result of such comparisons demonstrates that the current models can provide numerically accurate and physically plausible simulations of free-surface flows. 149

8 DRAINAGE OF A CYLINDRICAL TANK

8.1 INTRODUCTION

In the last two chapters predictions have been compared with theoretical results and experimental data to test the credibility of the mathematical models and solution procedure. The prediction made of the drainage of a cylindrical tank in the present chapter demonstrates the capability and flexibility of the scalar-equation method in handling various flows of interest.

The remainder of this chapter is divided into 5 sections of which the first defines the problem under consideration. Section 8.3 contains computational conditions and details. The calculated results are presented and discussed in Sections 8.4 and 8.5 respectively. The chapter then closes with a summary of the main findings in Section 8.6. 150

8.2 THE PROBLEM

During tank draining there exists a time when the centre of the fluid density interface is suddenly drawn in the direction of the outlet. At this time, a dip in the interface forms right above the drain and rapidly accelerates towards the drain, followed quickly by ingestion of gas into the outline. This phenomenon is schematically illustrated for both normal and zero gravity in Figure 8.1.

Under normal gravity, the interface remains flat while draining at constant velocity until the incipience of gas ingestion. At this instant, the interface height above the drain is called the critical height. At gas ingestion, the interface height away from the drain, where it is still essentially flat, is referred to as the gas ingestion height.

The draining phenomenon under zero gravity is similar to that above. The shape of the fluid density interface is considerably different, however, as shown in sketch (b). In this circumstance, the interface prior to draining is a curved one, of which the shape is a function of liquid surface tension and liquid-to-solid contact angle. In the process of draining, the interface distorts continuously from its initial profile. As in normal gravity, the interface centreline height moves at constant velocity until the incipience of gas ingestion. Again, the critical height is defined as the interface height at the time when its centreline starts deviating from constant- velocity draining. 151

(a) Normal gravity

(b) Weightlessness

Figure 8.1 Drainage of a tank 152

8.3 COMPUTATIONAL CONDITIONS AND DETAILS

8.31 COMPUTATIONAL CONDITIONS

Geometrical variables

Tank radius: R=2.0 (cm)

Outlet radius: r=0.1 (cm)

Liquid height: H= 2R (cm)

Air: - 1.205E+0 (kg/m3) 1.808E-5 (N"s/m2) Pa = . µa =

Ethanol: - 7.890E+2 (kg/m3) 1.199E+2 (N"s/m2) Pe = , µe =

At the start of calculation: p=u=v=0 everywhere in the flow domain

CD=1 where occupied by ethanol

(D=0 where occupied by air

At the boundaries of flow domain: Plane of symmetry v= au/ay= a(Diay=0 Tank walls u= v= a(DiaX= a(Diay =0 153

Inlet free boundary, 0 =1 Outlet 'upwind' law for 0

normal gravity

1) Vo = 10.08 (m/s)

2) Vo = 16.88 (m/s)

3) Vo = 20.80 (m/s)

weightlessness

4) Vo = 10.08 (m/s)

5) Vo = 16.88 (m/s)

6) Vo = 20.80 (m/s)

Owing to the lack of complete experimental information about the initial shape of the interface in zero gravity, the corresponding numerical predictions are made on the assumption that the liquid has a flat top surface at the start time.

8.32 COMPUTATIONAL DETAILS

No systematic study is performed of grid-cell-size effect on the accuracy of the numerical solution. The computational domain is covered by a grid consisting of 20*40 uniformly spaced cells. 154

No systematic study is performed of time-step-size effect on the accuracy of the numerical solution. The choice of St, however, is determined in view of the cell size and flow Reynolds number so as to meet the Courant stability condition. For the five runs made, their time step sizes are respectively:

1) St = 0.00050 sec.

2) St =- 0.00035 sec.

3) St = 0.00025 sec.

4) St = 0.00030 sec.

5) St = 0.00020 sec.

6) St = 0.00010 sec.

The quick achievement of a fully converged solution is guaranteed by the use of appropriate tolerance value and solution control parameter. A tolerance value of 1.0E-7 is set on all equations solved for and the DTFALS type of converging enforcement is used with a value of 1.0E-2 for the two momentum equations. Eleven sweeps of the flow domain are needed to satisfy the preset criterion. 155

8.4 PRESENTATION OF RESULTS

Six runs are made in total. Each run is subject to the conditions specified in section 8.3. Figures 8.2 to 8.4 show the predicted shapes of the free surface under normal gravity.

All the diagrams are drawn as D =1/2 level contour line. Figure 8.5 displays the time-displacement draining curve showing interface centreline height as a function of time. The solid lines represent the numerical solutions, the values of which are obtained with the help of equation (7.9) defined in Chapter 7. The geometrical symbols are the experimental data reported by Kaleel and Steven and are plotted from the data film for each outflow test. Both the critical heights and the gas ingestion heights are indicated in the diagrams.

Figures 8.6 to 8.8 show the predictions for a weightless enviroment. Since the initial shapes of the liquid surface are not explicitly specified in the experiment, the corresponding computations are performed assuming an initial flat top surface. No verification, therefore, will be made of the calculated results.

8.5 DISCUSSION OF RESULTS

8.51 RESULTS IN NORMAL GRAVITY

Figures 8.2 through 8.4 show the processes of drainage of a liquid from a tank under three outflow velocities. The contour lines indicate that the fluid interface retains its original flat 156

shape for a large portion of draining time. Thereupon a dip forms at the centre of the interface. The dip accelerates towards the outline while the interface away from the drain continues moving at a lower rate and keeping the surface essentially flat. This implies that the liquid drained from the tank is now be; ng removed primarily from the liquid directly above the outlet.

As a matter of definition in this study, draining is considered terminated at the instant gas reaches the outlet, although liquid with entrained gas may be continually drawn from the tank until the liquid is depleted. The liquid residual, therefore, is the amount of liquid remaining in the tank at the time of gas ingestion. From a comparative examination of the areas beneath the liquid surface, it is evident that the liquid residual has a strong dependence on the outflow velocity: the higher the outflow rate, the larger the liquid residual.

A comparison of experimentally determined interface centerline heights with the corresponding numerical predictions is given in Figure 8.5. Values from the two different sources are in good agreement, in particular the critical height and gas ingestion height are satisfactorily predicted. It is also observed that outflow under normal gravity is characterized by a flat interface draining at constant velocity until the critical height is reached. Finally, the gas ingestion height is obviously dependent on the outflow velocity, and the relation is that of the former is proportional to the latter. 157

r------

i i ...... i i i .:..... t=0.0000 sec t=0.4000...... sec t=0.8000 sec

: i: :::

t=1.0000 sec t=1.1000 sec t=1.1500 sec

: s: iii ! ý`:

t=1.1625 sec t=1.1750 sec t=1.1810 sec

Figure 8.2 Prediction of free-surface profile in normal gravity when Vo=10.08(m/s). 158

r ------r------i

i I` Iý I' ...... :...... t=0.0000 sec t=0.1400 sec t=0.2800 sec

E:

t=0.4200 sec t=0.5600 sec t=0.6300 sec

------

ýý . i

t=0.6650 sec t=0.6790 sec t=0.6818 sec

Figure 8.3 Prediction of free-surface profile in normal gravity when Vo=16.88(m/s). 159 r------.

I. I...... t=0.0000 sec t=0.2000 sec t=0.4000 sec r------

i...... t=0.5000 sec t=0.5250 sec t=0.5315 sec r------

i: ...... ni. . 7777: 0: -Miii ...... t=0.5375 sec t=0.5440 sec t=0.5443 sec

Figure 8.4 Prediction of free-surface profile in normal gravity when Vo=20.80(m/s). 160

Vo 10.0Bm/s lt SYMBOL EXPERIMENT SOLID LINE PREDICTION O ým 0

-O hgj

O O

°0.00 0.25 0.50 0.75 1.00 1. [a] time(s)

4 Vo 16. BBm/s SYMBOL EXPERIMENT SOLID LINE PREDICTION

o U00

l Ulm

. s...

O O

°0.00 0.25 0.50 0.75 1.00 1. [b] Urne(s)

4 Vo 20.80m/3 SYMBOL EXPERIMENT SOLID LINE PREDICTION . -. r= m U

i

hr hgi

0

0.00 0.25 0.50 0.75 1.00 1. [c] time(s)

Figure 8.5 Comparison of predictionswith experimentaldata in normal gravity. 161

8.52 RESULTS IN WEIGHTLESSNESS

The draining process under zero gravity differs from that under normal gravity in that the former has its liquid-gas interface distorted at a much earlier stage of draining. Contrary to the fact that only a small amount of liquid is left in the tank under normal gravity, a large proportion of the space of the tank is still occupied by the liquid even when the outflow content is mainly gas. This happens because, without the influence of gravity, the liquid does not seek the lowest possible level. It is also interesting to note that, unlike in the case of normal gravity where the liquid residual is a monotonically increasing function of flow rate, the residuals in weightlessness remain more or less constant as the outflow velocity increases. This is primarily due to the highly curved shape of the interface during draining. That this findings accord with the reality is confirmed by referring to Kaleel and Steven's experimental study, the results of which indicate that the residual increases with increasing flow rate only over a narrow band. The values used in the present investigation, however good they are or are not, happen to be outside that range. 162

i

t=0.0000 sec t=0.2000 sec t=0.4000 sec r------

i ...... t=0.6000 sec t=0.8000 sec t=0.9000 sec

:. ý:

ý_ ýý ......

t=0.9250 sec t=0.9350 sec t=0.9360 sec

Figure 8.6 Prediction of free-surface profile in weightlessnesswhen Vo=10.08(m/s). 163

r------l' I THM l': I.

I I.

I l Iý

t=0.0000 sec t=0.1200 sec t=0.2400 sec r----- r------

__...... : ......

I: i' :¬

t=0.3600 sec t=0.4800 sec t=0.5100 sec

------

j .. iii

t=0.5400 sec t=0.5550 sec t=0.5583 sec

Figure 8.7 Prediction of free-surface profile in weightlessnesswhen Vo=16.88(m/s). 164

:::::::::::: :::::::::::: " iii ::: Fi iii......

Ii

...... :: 5: :::: f:: 777:::: it 7: :::: 7: 77

FStf: '

t=0.0000 sec t=0.1600 sec t=0.2400 sec

------

I I I

t=0.3200 sec t=0.4000 sec t=0.4200 sec i ------

I ..

...... ý: : 2: ......

t=0.4400 sec t=0.4500 sec t=0.4520 sec

Figure 8.8 Prediction of free-surface profile in weightlessnesswhen Vo=20.80(m/s). 165

8.6 CLOSURE

Numerical predictions have been made of the gas ingestion phenomenon in both normal gravity and weightlessness during draining from a flat-bottom cylindrical tank. Results are obtained over a range of outflow velocities. From the cases investigated, it may be summarized as follows:

1) The shape of the fluid interface is seen to be in line with what one would expect. The confirmation of this, however, still needs experimental results for comparison.

2) The predicted interface centreline height, being a function of time, is in satisfactory agreement with experimental data.

3) The liquid residual increases with increasing value of outflow velocity.

4) For the same conditions, the liquid residuals, at the time of gas ingestion after draining in weightlessness, are considerably higher than the residuals under normal gravity. 166

9 CONCLUSIONS

9.1 INTRODUCTION

Now that the thesis has reached the finis we are in a position to recapitulate the main successes of the present study and to indicate the possible areas of future research.

The rest of this chapter is composed of two sections of which the first supplies a summary of the achievements and the second provides some recommendations for further work.

9.2 ACHIEVEMENTS

(A) Experiment

1) A simple experimental apparatus has been designed and constructed for the investigation of liquid sloshing in a tilted tank.

2) With the aid of an appropriate flow-visualization technique, flow patterns such as the wave amplitude, the sloshing frequency and the free-surface profile are observed. They are 167

subsequentially recorded on both motion pictures and still photographs.

3) The experiments have been conducted under the condition of varying flow control parameters including -liquid height, tilt angle and geometry of liquid block at the inception of the rotation.

4) Results of experiments involving two liquids are also obtained, with the observation that the interface distortion is in proportion to the density difference prevailing at the interface.

(B) Computation

1) The basic partial differential equations which govern the physical problem of concern and their corresponding numerical solutions are described.

2) An interface-tracking method possessing the following characteristics is developed and validated:

a) Use of a conserved scalar variable 0 as fluid marker.

b) Solution of (D-equation using the Van Leer scheme for advection. c) Piecewise linear density-scalar relation. 168

d) GALA formulation of the continuity equation.

3) A description is given of the particle-tracking method along with the density field determination from the position of the free surface.

4) With the aid of the facilities available in it, the two mathematical models are incorporated into the PHOENICS computer code.

5) The physical plausibility and numerical accuracy of the models are verified through their applications in the following test problems:

a) Prediction of sloshing of a liquid in a tilted tank. b) Prediction of collapse of a liquid column on a horizontal floor.

c) Prediction of drainage of a liquid from a cylindrical pipe under both normal and zero gravity conditions.

9.3 RECOMMENDATIONS

(A) EXPERIMENT

1) The experiment is performed by hand control. An automatic device which operates the rotation of the tank with precision has to be introduced before 169

any serious measurement can be made.

2) The experiment is exclusively restricted to visualization purpose; results are collected only in the forms of motion pictures and still photographs. Actual measurements on the velocity field, pressure distribution, free-surface profile and if possible, periodic force acting on the side walls of the tank, are of great value in both practical design and numerical assessment.

3) The experiment is essentially concerned with two-dimensional flows, resulting from the facts that the third dimension of the tank is very much limited as compared to the other two; and that the tank is placed perpendicular to the ground. Relaxation on the above limitations creates three- dimensional flows.

4) The experiment is basically confined to the laminar motion of the fluid. Extension to turbulent flow, for example by way of introducing baffles in the tank, would be beneficial to the full assessment of the prediction, provided that the measurement of turbulent quantities is by all means viable.

5) The experiment is characterized by the presence of a sharp interface separating two distinct fluids 170

from each other. In the case of miscible fluids, it would be of interest to investigate the mass transfer across the interface due to molecular diffusion or chemical reaction.

(B) COMPUTATION

1) Once the velocity is solved, and the free-surface profile obtained, the Bernoulli equation can be used to calculate the pressure, in particular on the body surface (e.g. on the side walls of the tank), whereby physical quantities of practical value such as force or moment can be evaluated.

2) To predict the behaviour of a flow in which the radius of curvature of the free surface is small or, in which the conserving body force is small or, in which there are one or more fluids of high surface tension, it will be necessary to consider the influence of surface tension. This effect can be added to the mathematical model by introducing additional sources into the momentum equation. The accurate calculation of the sources, however, needs the information on the exact location and shape of the surface.

3) It is true that a turbulent flow may occur at the early stage of the experiment. Thus, the development of a turbulence model which can 171

adequately describe the turbulent transfer of momentum in a free-surface flow is often in demand. There are now available many turbulence models, whether simple or sophisticated; the problem is how to deal with the free surface effects. This may, in the case of the k-c model, for example, start with modifying the surface damping function suggested for rigid walls so that the longitudinal and the transverse velocity fluctuations near a free surface are increased at the expense of the vertical fluctuations and, second, by specifying the surface value of the dissipation rate e in such a way that the length scale is reduced near the free surface.

4) The mathematical models are also readily extendable to three-dimensional flows, provided that the increased requirements of computer storage and time can be tolerated. The scalar- equation method is almost directly applicable to three-dimensional computations, where its conservative use of the stored information is highly advantageous. However, the particle- tracking method and the density-determination procedure must be suitably modified to accommodate the third dimension. Note that the free-surface now becomes a surface of particles rather than a string of particles and the method 172

consequently requires a significant increase in the used computer storage.

5) Should phase change or mass transfer occur across the fluid interface, a relevant term based on the gradients of the fluid concentrations in the contiguity of the contact surface would have to be added to the continuity equation. Then, after the surface is moved by the convective velocity for each time step, it must be moved again by a 'false velocity' to account for the mass transfer effects. In this circumstance, it is worth mentioning in passing that the use of a two-fluid mathematical model may be convenient and beneficial. 173

REFERENCES

1. Abramson HN (1966) 'The Dynamic Behaviour of Liquids in Moving Containers' NASA SP-106.

2. Amsden AA& Harlow FH (1970) 'A Simplified MAC Technique for IncompressibleFluid Flow Calculations' J. Comp. Phys. 6: 322-325.

3. Anderson W G, Huber PW& Sonin AA (1978) 'Small Scale Modelling of Hydrodynamic Forces in Pressure Suppression Systems, Final Repot Dept. Mech. Eng. MIT, Nuclear Regulatory Commission report NUREG-0003.

4. Andrews MJ (1986) 'Turbulent Mixing by Rayleigh-TaylorInstability' Ph.D Thesis, University of London.

5. Awn AG (1979) 'Numerical Modelling of Flows with Moving Interfaces' Ph.D Thesis, Universityof London. 174

6. Barr PK& Ashurst Wm T (1982) 'An Interface Scheme for Turbulent Flame Propagation' Sandia National Laboratories report SAND82-8773.

7. Camfield FE& Street RL (1969)

'Shoaling of Solitary Waves on Small Slopes' J. Waterways and Harbours Division, ASCE. 95: 1-22.

8. Castrejon A (1984)

'Unsteady Free-convectionHeat Transfer inside an Annular Cavity' Ph.D Thesis, University of London.

9. Chan R K-C & Street RL (1970) 'A Computer Study of Finite-Amplitude Water Waves' J. Comp. Phys. 6: 68-94.

10. Chorin AJ (1980)

'Flame Advection and PropagationAlgorithms' J. Comp. Phys. 35: 1-11.

11. Debar RB (1974) 'A Method in Two-D Eulerian Hydrodynamics' Lawrence Livermore National Laboratory report UCID-19683. 175

12. Deville M0 (1974)

'Numerical Experimentson the MAC Code for a Slow Flow' J. Comp. Phys. 15: 362-374.

13. Glimm J, Isaacson E, Marchesin D& McBryan 0 (1981) 'Front Tracking for Hyperbolic Systems' Adv. Appl. Math. 2: 91-119.

14. Harlow FH& Welch JE (1965)

'Numerical Calculation of Time-Dependent Viscous Incompressible Flow of Fluid with Free Surface' Phys. Fluids 8: 2182-2189.

15. Hedberg P K, Rosten HI& Spalding DB (1986) 'The PHOENICS Equations' CHAM report TR199.

16. Hirt CW& Shannon JP (1968) 'Free-Surface Stress Conditions For Incompressible Flow Calculations' J. Comp. Phys. 2: 403-411.

17. Hirt C W, Nichols BD& Romero NC (1975) 'SOLA-A Numerical Solution Algorithm for Transient Fluid Flows'

Los Alamos Scientific Laboratory report LA-5852. 176

18. Hirt CW& Nichols BD (1981)

'Volume of Fluid (VOF) Method for the Dynamics of Free Boundaries' J. Comp. Phys. 39: 201-225.

19. Hyman JM& Larrouturou B (1982) 'The Numerical Differentiationof Discrete Functions Using Polynomial Interpolation Methods'

Appl. Math. and Comp. 10-11: 487-506.

20. Kaleel LA& Steven GB (1969) 'Vapor Ingestion Phenomenonin Weightlessness' NASA TN D-5210.

21. Labus TL& Dewitt KJ (1978)

'Liquid Jet ImpingementNormal to a Disk in Zero Gravity' J. Fluids Eng. Trans. ASME 100: 204-209

22. Liu Jun (1984)

'Prediction of Laminar Flow over a Plane Symmetric Sudden Expansion'

C.F. D. U. report PDR/16, Imperial College.

23. Liu Jun (1984)

'Laminar Flow in a Driven Square Cavity' C.F. D. U. report PDR/17, Imperial College. 177

24. Liu Jun (1985)

'Simulation of Flow around a Blunt Body in a Supersonic Stream' C.F. D. U. report PDR/20, Imperial College.

25. Liu Jun (1985)

'Application of "Variable Blockage" Method to Steady Flows over Curved Beds' C.F. D. U. report CFD/85/12, Imperial College.

26. Liu Jun (1985) 'The Scalar-Equation Method for the Prediction of Free-Surface Flows'

C.F. D. U. report PDR/25, Imperial College.

27. Lubin BT& Springer GS (1967) 'The Formationof a Dip on the Surface of a Liquid Draining from a Tank' J. Fluid Mech. 29: 385-390.

28. Martin JC& Moyce WJ (1952)

'An ExperimentalStudy of the Collapse of Liquid Columns on a Rigid Horizontal Plane' Phil. Trans. Roy. Soc. London 244: 312-324.

29. Maxwell TT (1977) 'Numerical Modelling of Free-Surface Flows' Ph.D Thesis, University of London. 178

30. Maxworthy T (1976)

'Experiments on Collisions between Solitary Waves' J. Fluid Mech. 76: 177-185.

31. Miyata H& Nishimura S (1985)

'Finite-Difference Simulation of Nonlinear Ship Waves' J. Fluid Mech. 157: 327-357.

32. Morris WD (1981)

'Heat Transfer and Fluid Flow in Rotating Coolant Channels' Research Studies Press.

33. Nichols BD& Hirt CW (1971) 'Improved Free Surface Boundary Conditions for Numerical Incompressible-FluidCalculations' J. Comp. Phys. 8: 434-448.

34. Nichols BD& Hirt CW (1975) 'Methods for Calculating Multi-dimensional,Transient Free Surface Flows Past Bodies' Los Alamos Scientific Laboratory report LA-UR-75-1932.

35. Patankar SV& Spalding DB (1972) 'A Calculation Procedurefor Heat, Mass and Momentum Transfer in Three-DimensionalParabolic Flows' Int. J. Heat Mass Transfer 15: 1787-1806. 179

36. Pracht WE (1971) 'A Numerical Method for Calculating Transient Creep Flows' J. Comp. Phys. 7: 46-60.

37. RamshawJD& Trapp JA (1976) 'A NumericalTechnique for Low-Speed Homogeneous Two-Phase Flow with Sharp Interfaces' J. Comp. Phys. 21: 438-453.

38. Roe PL (1986) 'Characteristic-based Schemes for the Euler Equations' Ann. Rev. Fluid Mech. 18: 337-365.

39. Rosten HI& Spalding DB (1986) 'PHOENICS-Beginner's Guide & User Manual'

CHAM report TR/100.

40. Sivakumaran N S, Hosking RJ& Tingsanchali T (1981) 'Steady Shallow Flow over a Spillway' J. Fluid Mech. 111: 411-420.

41. SmithTG&WilkesJO(1975)

'Laminar Free-Surface Flow into a Vertical Cylinder' Computers & Fluids 3: 51-68. 180

42. Spalding DB (1974)

'A Method for Computing Steady and Unsteady Flows Possessing Discontinuitiesof Density' CHAM report 910/2.

43. Spalding DB (1981) 'A General Purpose Computer Program for Multi-dimensionalOne and Two-phase Flow' Mathematicsand Computer in Simulation X111:267-276.

44. Spalding DB (1982)

'Four Lectures on the PHOENICS Computer Code' C.F. D. U. report CFD/82/5, Imperial College.

45. Spalding DB (1985) Private Communication.

46. Spiers R P, Subbaraman CV& Wilkinson WL (1974)

'Free Coating of a Newtonian Liquid onto a Vertical Surface'

Chem. Eng. Sci. 29: 389-396.

47. Street RL& Camfield FE (1966)

'Observationsand Experimentson Solitary-Wave Deformation'

Proc. 10th Conferenceon Coastal Engineering 1 Chap.19. 181

48. Van Leer B (1977) 'Towards the Ultimate Conservative Difference Scheme. IV. A New Approach to Numerical Convection' J. Comp. Phys. 23: 276-299.

49. Villasenor F (1987) 'The Kelvin-HelmholtzInstability in a Stratified Shear Flow' Ph.D Thesis, University of London.

50. Wu ZY (1986) 'Studies in Unsteady Flame Propagation' Ph.D Thesis, University of London.

51. Yeung RW (1982) 'Numerical Methods in Free-Surface Flows' Ann. Rev. Fluid Mech. 12: 395-442.

52. Youngs DL (1982)

'Time-Dependent Multi-Material Flow with Large Fluid Distortion' In: Numerical Methods for Fluid Dynamics, Morton KW& Baines M J. eds. Academic Press. 182

NOMENCLATURE

ENGLISH SYMBOLS MEANINGS

a Width of liquid column. A Area of cell surface. b Height of liquid column. C Convection coefficient. D Diffusion coefficient. Liquid height in the tank. Vertical dimension of flow domain. F Volume of fluid. (FX,Fy) External force in x and y-direction.

(gx'gy) Gravitational acceleration in x and y-direction.

h Reference elevation of free surface. H Dimensionless collapsing liquid column height. Liquid height in the pipe. L Horizontal dimension of flow domain. n Time index. p Pressure. r Volume fraction. Control parameter determining coordinate system. Ridius of drain. 183

R Ridius of pipe. Sp Implicit part of a linearized source.

Su Explicit part of a linearized source.

(Sx, Sy) x and y-direction external force.

SO General source term. t Time. T Dimensionless time. St Time increment.

At Rotation duration. u Velocity vector. (u, v) Velocity in x and y-direction. (up,vp) Velocity of a particle in space.

V Cell volume. (x, y) Space coordinate. xe x coordinate of east face of a cell.

(xp, yp) coordinate of a particle in space.

xW x coordinate of west face of a cell.

Z Dimensionless advancing wave front location.

GREEK SYMBOLS

A Tilt angle.

F Exchange coefficient.

Control parameter determining coordinate system. 184

11 Collapsing liquid column height.

µ Viscosity. i; Advancing wave front location. p Density.

CD A scalar variable.

15 A general variable.

(De Scalar variable value at east cell face.

(DW Scalar variable value at west cell face. cp Stream function.

S2 Angular velocity.

SUBSCRIPTS

a Air. e Ethanol. i Space index. k Kerosene.

m Mixture. n, s, e, w. North, south, east and west faces of the control volume. N,S, E, W. North, south, east and west main grid nodes. P Main grid node. w Water. 185

APPENDIX A The PHOENICS 0 File

This appendix contains the listing of the PHOENICS Q file which is used for the simulation of the experimental flow. The subroutine, as well as its ground-station, completes the specification of the problem in question.

A group-by-group description of this listing now follows.

Group. 1 0 Give run a title.

" Define an integer variable.

Group 20 Declare that the flow is time-dependent.

Specify the number and size of the time step.

Group ' Command GRDPWR sets up grid in the x-direction. Argument 2 is the cell number. Argument 3 is the x dimension of flow domain. Argument 4 implies the use of a uniform grid.

hup ' Command GRDPWR sets up grid in the y-direction. Argument 2 is the cell number. Argument 3 is the y dimension of flow domain. Argument 4 implies the use of a uniform grid. 186

Grou" ' Command SOLUTN is used to

activate solutions of the variables pl, ui and v1,

and make provision for store of the spare

variables hi and c1.

r' on the GALA algorithm.

Group ENUL=GRND and RHO1=GRND indicate that the

densities and viscosities of fluids are calculated from the ground-station.

Groug 11 0 The initial distribution of fluid volume fraction

or scalar variable cb is calculated from the

ground-station and stored in array hi.

R, " Command PATCH defines the - region over which boundary conditions and external sources are to be prescribed.

Command COVAL sets the coefficient and value

(C(D and V(, ) which appear in the PHOENICS

boundary condition specification formula:

SO = CO(VD - 0P)

where cbP is the value of D in the cell adjacent to the boundary. 187

a 'FIXPREF' specifies a reference pressure in the

flow domain, of which the function is to accelerate the speed of convergence.

" 'BODYFOR' introduces the external forces into the

corresponding equations. GRND signifies that this is to be carried out in the ground-station.

" The laminar wall function is activated, in which

the wall shear stress is evaluated from the presumption of a linear velocity variation between the calculated near-wall value and the prescribed wall value; the laminar viscosity used is ENUL. The components of shear stress calculated in this way are then included as source terms for the velocity components parallel to the wall.

Group 4 Specify the numbers of sweeps and iterations.

Groug 16 ' Set the termination criteria for sweep and iteration loops.

Q= 7" Command RELAX sets an over-relaxation factor

of 1.3 on the pressure-correction equation.

Group 19 " Specify some data which are to be communicated

by satellite to GROUND. 188

Group " TSTSWP determines the frequency of residual value print-out.

" NTPRIN determines the frequency of field value

print-out.

Group 22 " Decide the location of the spot value.

" Determine the frequency of spot value print-out.

Group 23 Command OUTPUT prints out the field value of

the variable to which it is applied.

" 189

APPENDIXA

TALK=F;RUN( 1,1), -VDU= 0 GROUP1. Run title TEXTISimulation of Experiment, Run.1) INTESER(LTIME),LTIME=64 GROUP2. Transience; time-step specification LSTEP=720 TFRACII)=-720., TFRAC12I-0.005 GROUP3. X-direction grid specification GRDPMR(X,32,. 306,1.0) GROUP4. Y-direction grid specification GRDPNRIY,30,. 288,1.0) GROUP7. Variables stored, solved d named STEADY=.F. SOLUTNIPI,Y, Y, N, N, N, N) SOLUTNIUI,Y, Y, N,N, N, NI; SOLUTNIVI,Y, Y, N, N,N, N) SOLUTNIHI,Y, N, N,N, N,N1; SOLUTNICI, Y, N, N, N, N, N) GROUPB. Terms tin differential equations) d devices GALA=.T. TERMSIUI, Y, Y, Y, Y, Y, N1;TERMSIVI, Y, Y, Y, Y, Y, N) GROUP9. Properties of the medium for media) R611),R612), R613): DENSITIESFOR A, K, w R6141,R615), RG161: VISCOSITYFOR A, K, V RHOI=GRND,ENUL=6RND R6111=1.205E+0,R6121=8.000E+2, R6(31=9.960E+2 R6141=1.500E-5,RG151=2.300E-6, R6 IG)=1.000E-6 GROUP11. Initialization of variable or porosity fields PATCHIICONDTN,INIVAL, I, NX,I, NY,1,1,1,11 COVALIICONDTN,HI, ZERO, GRNO) FIINITIH11=0.0, FIINIT(CI1=0.0 FIINITIPI)=0.0, FIINITIU11=0.0, FIINITIVI1=0.0 GROUP13. Boundary conditions and special sources Ref Pressure PATCHIFIXPREF, CELL, NX, NX, NY, NY, 1,1,1, LSTEP) COVALIFIXPREF,PI, FIXP,ZEROI External Forces PATCHIBODYFOR, PHASEM, 1, NX,1, NY,1,1,1, LSTEP) COVALIBODYFOR,UI, FIXFLU, 6RNDI COVALIBODYFOR,VI, FIXFLU, GRNDI walls PATCHINNOSLIP,MMALL, 1,1,1, NY, 1,1,1, LSTEP) COVALINNOSLIP,V1, FIXP, ZEROI PATCHIENOSLIP,EVALL, NX, NX, I, NY, 1,1,1, LSTEP) COVALIENOSLIP,V1, FIXP, ZEROI PATCHISNOSLIP,SMALL, I, NX, 1,1,1,1,1, LSTEP) COVALISNOSLIP,UI, FIXP, ZERO) PATCHINNOSLIP,NVALL, I, NX,NY, NY, 1, I, 1, LSTEPI COVALINNOSLIP,UI, FIXP, ZERO) GROUP15. Termination of sweeps LSMEEP=40,LITERIPI1=20, LITHYD=1 GROUP16. Termination of iterations ENDITIP1l=1.E-6, ENDITIUI1=1.E-4, ENDITIVI1=1.E-4 RESREFIP11=1.E-6, RESREF(UI)=1.E-4, RESREF(VI1=1.E-4 GROUP17. Under-relaxation devices RELAXIPI, LINRLX,1.31 GROUP19. Data communicated by satellite to GROUND Methods of Simulation CGII1=MAX,CG121=2F, C6131=IA, C6141=LV 190

Control of No. of Sweep&'Iteration I6111=1, I6121=20,16131=10 Numberof Particles at Initial Instant I6151=201,IG161=11, IG171=LTIME DISMIN ANDDISMAX of Particle Tracking RG171=8.0E-4,R6(81=2.4E-3 Tilt Angle and Control of Interface Location RB19)=25.0,R61101=125.0-0.01/64.0, R61111=0.14,RG1121=0.14 Rotational Velocity R61131=3.14159*125.0-0.01/1180. *C.,12J GROUP20. Preliminary print-out ECHO=.F. GROUP21. Print-out of variables TSTSWP=20,ITABL=I, IPLTL=LSWEEP,NTPRIN=LSTEP GROUP22. Spot-value print-out NPRMON=LSWEEP,IXMON=NX-2, IYMON=NY-10 GROUP23. Field print-out and plot control OUTPUTIPI, Y, Y, Y, Y, Y, Y1 OUTPUTIHI,Y, N, N, N,N, NI; OUTPUTICI,Y, N, N, N, N, N1 OUTPUT(UI,Y, Y, Y, Y, Y, 11; OUTPUTIVI,Y, Y, Y, Y, Y, Y1 INIFLD=.F., USEGRD=.F., USEGRX=.F., NAMGRD=TILT GROUP24. Dumpsfor restarts STOP 191

APPENDIX B The PHOENICS GROUND

This appendix describes the coding of the PHOENICS ground-station subroutine which supplements the information contained in Q file.

Group This group is used to

" make provision for the store of various

geometrical quantities and flow variables.

declare a character variable, of which the value

determines the direction of advection of scalar

ý.

" set dimensional statements for some local

arrays.

Group-I This group is used to

" calculate dimensions of cells in the x and y directions.

retrieve required variables using the PHOENICS

service subroutine GETYX.

This group is used to -2 192

" calculate density field according to the volume fraction distribution of marked fluid.

" calculate viscosity field according to the

volume fraction distribution of marked fluid.

[Function FN2 is the FORTRAN equivalent of equation (4.19). Functions FN22 and FN23 limit the values of density and viscosity. ]

Group This group is used to

" determine initial volume fraction distribution

of marked fluid according to the assigned positions of particles when the particle- tracking method is in use.

" determine initial scalar variable distribution

of marked fluid according to the assigned positions of particles when the scalar-equation method is in use.

Group 13 This group is used to

" compute source term due to the gravitational force.

" compute source term due to the centrifugal force. 193

compute source term due to the Coriolis force.

add the computed source terms to the

corresponding equations by means of PHOENICS service subroutines ONLYIF and SETYX.

Group 19 This is used to

store volume fraction or scalar variable field

calculated in Group 11 at the start of the first time step.

" update positions of particles and calculate

volume fractions of marked fluid, the values of

which are then stored in a spare array hi.

" solve scalar b-equation and update distribution

of c, the values of which are then stored in a

spare array h 1.

' decide time steps at which the computer outputs the calculated results. 194

APPENDIX8

SUBROUTINEGSLOSH SINCLUDE.TRKDIM SINCLUDESATEAR/6 $INCLUDEGRDLOC/G SINCLUDEGROEAR/G INTEGERHIGH, OLD, AUX, SOUTH, NORTH, EAST, REST LOGICALSTORE, SOLVE, PRINT CXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXUSERSECTION STARTS: C--- COMMON/LGRNO/L61201/IGRND/I61201/RGRND/R61100)/CGRNO/C6110 LOGICALL6 CHARACTER*4CS CHARACTERORDER C_-- DIMENSIONGHNIIDIMI, IDIM21, SHOIIDIM1, IDIM21 DIMENSIONGCNIIDIM1, IDIM2I, GCOIIDIMI,IDIM2) DIMENSIONUSORIIDIMI, IDIM2I, VSORIIDIMI,IDIM21 DIMENSIONUNODIIDIM1, IDIM21,6PHIIIDIM1,10IM21 C_-- LONII)=NPHI+I HIGHII1=2*NPHI+I OLDIII=3*NPHI+I INII)=4*NPHI+I STOREII 1=MOD(ISLN II), 2 ). E0.0 SOLVE(I)=MODIISLNII1,31.E0.0 PRINTII)=MODIIPRNII), 2). EO.0 SOUTHII)=-IKFIIl-1l NORTHIII=-(KF1I)+1! EAST1I)=-(KF1I)+NY) WESTII)=-(KFII)-NYl C--- IXL=IABSIIXL) IFIIGR. EO.131 60 TO 13 IFII6R. E0.191 60 TO 19 GOTO 11,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21, 122,23,241, IGR C C-- GROUP1. Run tale C 1 60 TO 11001,10021,ISC 1001 CONTINUE GDY=YVLAST/FLOATINYI GDX=XULAST/FLOATINX1 CALLPTRACKII, 0.0,0.0,1,11 RETURN 1002 CONTINUE RETURN C C--- GROUP9. Properties of the medium for medial C 9 60 TO 191,92,93,94,95,96,97,98,99,900,901,902,9031,1SC C***************************************************************** 91 CONTINUE C- IF ICS121. E0. ' 2F' ) THEN 195

IF ICS131. E0. ' MA'1 CALLFN21AUX%DEN11, H1,RG111, RG131-RG111) IF ICS131. EO. ' IA' I CALLFN221AUXIDENII, R611)1 IFIC6131. E0. 'IA'I CALLFN231AUXIDEN11, RG1311 IF ICG131. EO. ' MK'I CALLFN2(AUXIDEN1), H1, RG(21, R6(3)-RG12)1 IFICG13). EO.'MK'I CALLFN221AUXIDEN1), R61211 IFIC6131. E0. 'IK'1 CALLFN231AUXIDENII, R61311 ELSE CALLFN101AUXIDENI), H1, C1, R6111, R6131-R6{2), RG12)-RG11)) CALLFN22(AUXIDENII, R611)) CALLFN231AUXIDENI1, R61311 ENDIF C--- RETURN 96 CONTINUE C--- IFIC6121. E0. '2F'1 THEN IFIC613). EO.'WA') CALL FN2IAUXIVISL),H1, R6141, R6t6)-R6(4)) IFIC6t3). EO.'VK'l CALLFN2IAUXIVISL), H1, R6151, R616)-R615)) ELSE CALLFN101AUXIVISLl, H1, C1, R6(41, R6(6)-R615), R615)-R6141) CALLFN221AUXIVISL), R616)) CALLFN23(AUXIVISL), RG1411 ENOIF C--- RETURN C C--- GROUP11. Initialization of variable or porosity fields C 11 CONTINUE C- CALLPTRACK11,0.0,0.0,3,11 DO 100 IP=I, NPMAX DO 111 IX=1, NX IFIXPIIP). LE. XU(IX)1 60 TO 112 111 CONTINUE 112 00 113 IY=1, NY IFIYP(IPI. LE.YVIIY)) 60 TO 114 113 CONTINUE 114 00 115 II=IY111-1 GHNIII, IXJ=1.0 115 CONTINUE 100 CONTINUE CALL TRKDENl6FNJ, GHO, ' NEST '1 CALLFILTRK(2, NPMAX, XP, YP, 11 VRITEl19,*1 ISTEP VRITE119,60) ll6FWtIY, IXI, IX=01,05), IY=NY,1, -1) IRITE119,60) 116HN(IY,IX), IX=06,101, IY--NY,1, -1) MRITE119,60) I(6MiIIY, IXI, IX=11,151, IY-NY1, -1) NRITEl19,60) (l6HNIIY, IX), IX=16,20), IY--NY,1, -1) IRITE 119,60ll 16FN(IY, IX 1, IX=21,25 ), IY--NY,1, -11 IRITE119,60) l(6FNIIY, IX), IX=26,30), IY=NY,1, -1) VRITE119,61) (16HJ1IY,IXI, IX=31, NXI, IY=NY,1, -1) C--- IF(C6(2). EO.'2F') 60 TO 116 C--- CALLPTRACKII, 0.0,0.0,3,21 DO 200 IP=I, NPMAX 00 211 IX=1, NX IFIXPIIP). LE. XU(IX)l 60 TO 212 196

211 CONTINUE 212 DO213 IY=1, NY IFIYPIIPI. LE.YVIIY11 60 TO 214 213 CONTINUE 214 DO215 II=IY, 1, -1 GCN(11,IX)=1.0 215 CONTINUE 200 CONTINUE CALL TRKDENIGCN,GCO, '1EST CALL FILTRK(2, NPMAX,XP, YP, 2) MRITE119,*1 ISTEP NRITE119,66) i1GCNIIY, IXI, IY=I, NY), IX=1, NXI C--- 116 CONTINUE C--- RETURN C C--- GROUP13. Boundary conditions and special sources C 13 CONTINUE 60 TO 1130 131,132,133,134,135,136,137,138,139,1310, 11311,1312,1313,1314,1315,1316,1317,1318,1319,1320,1321), ISC 1311 CONTINUE C.. C Gravitational, Centrifugal and Coriolis Forces C.. IFIISTEP. LE. 161711 THEN OMEGA=861131 ANGLE-86191-R61101*FLOATIISTEP) ELSE OMEGA-O.0 ANGLE=-R6115) ENDIF C--- GX=-9.81*SINIANSLE*3.14159/180.1 GY=-9.81*COSIANGLE*3.14159/180.1 C--- CALL GETYX(UI,U, NY,NXI CALL GETYXIVI,V, NY,NX) 00 2000 IY=1, NY 00 2000 IX=1, NX-1 is=IY-1 JN=IY Jw=IX JE=IX+1 IFIIY. EO.1) JS--NY VBAR=.25*IVIJS, JVI+VIJN, Jl1+V(JS, JEI+V(JN,JE)1 USORIIY,IX)=GX-2.0*OMEGA*VBAR+XU(IX)*OMEGA**2. 2000 CONTINUE C--- DO3000 IY=1, NY-1 00 3000 IX=1, NX JS=lY JN=IY+1 JN=IX-1 JE=IX IF(IX. E0.1) JV=NX UBAR=.25*(UIJS, JWI+UIJS,JE)+U(JN, JI)+UlJN, JE)1 VSOR(IY,IX) GY+2.0*OMEGA*UBAR+YVIIV1*OMEGA**2. 197

3000 CONTINUE C--- CALL ONLYIFIUI,UI, 'BODYFOR') CALLSETYXIVAL, USOR, NY, NX) CALLON.. YIFIVI, VI, 'BODYFOR') CALLSETYXIVAL, VSOR, NY, NX) C.. RETURN C*************************************************************** C C-- GROUP19. Special calls to GROUNDfrom EARTH C 19 60 TO (191,192,193,194,195,196,197,198 ), ISC 191 CONTINUE C-. IF (ISTEP.EO. 1 AND. C6(2 ). EO.' 2F') THEN CALLSETYXIHI, . 6HN, NY, NX) ELSE CALLSETYXIHI, 6HN, NY, NX) CALLSETYXICI, 6CN, NY, NX) ENDIF C--- 1FIC6141.EO. 'VL') THEN 00 77 ISTRING=3,16161 IFIISTEP. NE.1l CALLFILTRK13, NPMAX, XP, YP, ISTRIN6l CALLPTRACKt1, RGl71, R6(8), 3, ISTRINGJ CALLFILTRKI2, NPMAX, XP, YP, ISTRING) 77 CONTINUE ENDIF C_-- RETURN 192 CONTINUE RETURN 193 CONTINUE RETURN 194 CONTINUE RETURN 195 CONTINUE RETURN 196 CONTINUE RETURN 197 CONTINUE RETURN 198 CONTINUE C--- IFIC6111. E0. 'MAX' AND. ISTEP.6T. I6131) THEN CALLFILTRK(3, NPMAX, XP, YP, 1) CALLPTRACK(1, R6171, R6181,3,11 CALL 6ETYXIH1,GHN, NY, NX) CALL TRKDENl6HN,SHO, 'IEST ') CALLSETYXIH1,6HN, NY, NX) CALLFILTRK12, NPHAX, XP, YP, 1) C--- IF1C6121.EO. '2F'1 60 TO 199 C--- CALLFILTRK(3, NPMAX, XP, YP, 21 CALLPTRACK(I, R617), R618),3,2) CALL 6ETYX(C1,6CN,NY, NX) CALL TRKDENIBCN,6CO, 'IEST 'I CALL SETYXICI,GCN, NYNX) 198

CALLFILTRK12, NPMAX, XP, YP, 21 C--- 199 CONTINUE C--- ENDIF C-- IFIC611). EO.'LIU') THEN CALLGETYXIUI, U, NY,NX1 CALL 6ETYXIVI,V, NY,NX) CALLGETYXIHI, GHO, NY, NXI CALL GETYXIC1,6C0,NY, NX) IFIMOD(ISTEP,2). NE.O) THEN ORDER='X' ELSE ORDER='Y' ENDIF CALLGHLEERIORDER, GHO, 8 N, U, V, DT,6DY, 6DX, NY, NX) IFlCG12J.EG. '2F') 60 TO 9.99 CALLGHLEERIORDER, 000, GCN,U, V, DT,6DY, GDX, NY, NXI 999 CONTINUE CALLSETYXIHI, GHN, NY, NX) CALLSETYXICI, 6CN, NY, NX) C.. Run.1 IF IISTEP.E0.084. OR.ISTEP. EO. 134. OR. I ISTEP.EO. 180. OR.ISTEP. E0.240. OR. 2 ISTEP.EO. 298. OR.ISTEP. E0.344. OR. 3 ISTEP.EO. 396. OR.ISTEP. EO. 456. OR. 4 ISTEP.EO. 512. OR.ISTEP. E0.576. OR. 5 ISTEP.EO. 616. OR.ISTEP. E0.676. OR.ISTEP. E0.712) THEN C.. Run.2 IF tISTEP.E0.066. OR.ISTEP. EO. 112. OR. I ISTEP.EO. 176. OR.ISTEP. E0.224. OR. 2 ISTEP.EO. 276. OR.ISTEP. E0.332. OR. 3 ISTEP.EO. 378. OR.ISTEP. E0.428. OR. 4 ISTEP.EO. 497. OR.ISTEP. EO. 532. OR. 5 ISTEP.EO. 590. OR.ISTEP. E0.616. OR.ISTEP. EO. 680I THEN C.. Vector Plot CALLGETYXIX62D, TKSPI, NY, NXI CALL 6ETYX1Y620,TKSP2, NY, NX) VRITE(22,*) ISTEP NRITE122,661 IIUIIY, IXI, IY=I, NYI, IX=1, NX) MRITE122,661 (lV I IY IX ), IY=1, NY1, IX=1, NX) VRITE122,66) IITKSPIIIY, IXI, IY=I, NYI, IX=INX1 NRITE122,66) (lTKSP2lIY, IXJ, IY=I, NY), IX=I, NX) C.. Contour Plot VRITE(19,*) ISTEP VRITE(19,66) IISHNIIY, IXJ, IY=I, NYI, IX=1, NXl MRITE119,601 l(SHNIIY, IX), IX=01,05), IY=NY,1, -11 WRITE119,6011(6HNIIY, IX), IX=06,101, IY--NY,1, -11 TRITE119,60) (16HJI IY, IX 1, IX=11,151, IY=NY,1, -1 I MRITE119,60) (16HN(IY,IX), IX=16,20), IY=Mf, 1, -11 NRITE119,60) (16HNIIY, IX), IX=21,25), IY--WI, -11 MRITE119,60) ((GHNIIY, IX), IX=26,30), IY=NY,1, -11 VRITE119,611 II6FNIIY, IXI, IX=31, NX), IY--NY,1, -11 IF ICS12 ). E0. ' 2F' 1 60 TO 888 /RITE(19, *) ISTEP MRITE119,66) ll6CN(IY, IXI, IY=1, NY)IX=1, NXI 888 CONTINUE C.. Streamline Plot DO 777 IX=1, NX 199

DO 777 IY=I, NY IXMI=IX-1 IFIIX. E0.1) IXMI=NX 6PHI101, IX1--O. 0 777 UNOD(IY,IX)=0.5*(UIIY, IXMIJ+U(IY, IX)) DO 666 IY=1, NY DO 666 IX=1, NX IYMI=IY-1 IFIIY. EO.1) IYMI=IY 666 GPHIIIY, IX)=U(IY, IX)*6DY+GPHIIIYMI,IX) PHIMIN=+1.EI0 PHIMAX=-1.E10 00 555 IY=1, NY DO 555 IX=I, NX IFI6PHIIIY, IX). 6T. PHIMAX)PHIMAX=6PHI(IY, IX) 555 IFISPHI(IY, IX). LT. PHIMIN) PHIMIN=6PHIIIY,IX) 00 444 IY=1, NY DO 444 IX=1, NX 444 6PHIIIY, IX)=16PHIIIY, IX)-PHIMIN)/(PHIMAX-PHIMIN) MRITE(19,*) ISTEP NRITE119,661 (ISPHI(IY, IX), IY=I, NY), IX=1, NX) C.. Output Format 60 FORMAT(1P5E10.3) 61 FORMAT(1P2E10.3) 66 FORMAT12X, IPEIO. 3, IX, IPE10.3, IX, IPEIO.3, IX, IPE10.3, IX, IPE10.3 ) ENDIF ENDIF C--- IFIISTEP. 6E. I61111 LSIEEP=16121 IFIISTEP. 6E. I61111 LITERIP11=I6131 C--- RETUtN END 200

APPENDIX C The Particle-Tracking Method Subroutines

This appendix provides readers with information which is of assistance in understanding and using the subroutines for the tracking of the interface and the calculation of the density field. The subroutines consist of

The main subroutine PTRACK The subroutines TRKDIM, INIDIS and FILTRK The main subroutine TRKDEN The function AREA

The function of each subroutine now follows.

Subroutine TRKDIM

This subroutine sets dimension statements for those of variables which are required for the computation of fluid interface. It must be included at the top of a relevant subroutine as follows:

$INCLUDE TRKDIM

No modification is required of this subroutine except that the user has to. specify the parameters IDIM1, IDIM2 and IDIM3.

Subroutine INIDIS 201

This subroutine initializes the positions of particles along the fluid interface and transmits this information to PTRACK. It must be called at the start of the first time step:

CALL INIDIS(ITRK)

where

ITRK is the serial number of the particle string.

The task of the user concerning this subroutine is to specify the initial number of particles and use appropriate code to set their initial positions in the flow domain. This must be done in the blank space of the following coding.

1 CONTINUE

NPMAX=...

0

CALL FILTRK(1,NPMAX, XP, YP, ITRK)

Subroutine FILTRK

This subroutine arranges for the store of particles on one or several strings in temporary files which are closed and deleted at the end of a run. It must be called before and after 202

PTRACK is executed:

CALL FILTRK(IFNC,NPMAX, XP, YP, ITRK) where

FN is an integer variable, the value of which manipulates a file as follows: 1 for opening up a data file 2 for writing to a data file 3 for reading from a data file 4 for closing down a data file XE. and YE, are the x and y coordinates of particles. NPMAX is the number of particles in a string.

This subroutine does not require any interference from the user and therefore, it must not be modified at all.

This subroutine performs the main computations required for the tracking of the interface. It must be called at the end of every time step:

CALL PTRACK(IPLANE,DISMIN, DISMAX, ITSEC, ITRK)

where

IPLAN-E is an integer variable, the value of which 203

determines the computational plane used: 1 when x-y plane is in use. 2 when y-z plane is in use. 3 when x-z plane is in use. DISMIN is the minimum distance between two adjacent

particles S1. DISMAX is the maximum distance between two adjacent

particles S2.

ITSEC is the section number for which PTRACK is called. 1 make storage for geometrical quantities 2 make provision for fluid velocities 3 make provision for geometrical quantities

The user is requested not to change anything in the subroutine with the exception of the following problem-dependent settings:

0 The velocity of the first particle. The value of the

velocity component normal to boundary is set to zero so as to keep the particle moving only in the perpendicular direction.

9 The velocity of the last particle. The value of the

velocity component normal to boundary is set to zero so as to keep the particle moving only in the perpendicular direction. 204

Function AREA

This function computes the area cut out by a segment of the particle string and the edges of the cell. The call statement to this function is:

CALL AREA(XP, YP, NPCDIM, NPTS,YY, SWAP) where

NPCDIM is the maximum number of particles allowed in a cell. NPTS is the actual number of particles encountered in a cell. Y is the x or y coordinate of the cell edge; its value _Y_ depends on how the particle string goes through the cell.

SWAP is a real variable having value of either 1 or -1; the choice of which depends on how the particle string transverses the cell.

No action is required of the user in this function.

Subroutine TRKDEN

This subroutine performs all the computations required for the determination of volume fraction field of marked fluid. It must be called after the execution of PTRACK: 205

CALL TRKDEN(R1,AR, IFACE) where

R1 is a two-dimensional --array which contains the volume fraction distribution of marked fluid. AR is a spare two-dimensional array for multi-fluid flow calculation. IFACE is a character variable, the value of which indicates the side of the cell from which the particle

string enters.

No action is required of the user in this subroutine. 206

APPENDIXC

SUBROUTINEPTRACKIIPLANE, DISMIN, DISMAX, ITSEC, ITRKI C------$INCLUDETRKDIM $INCLUDESATEAR/6 $INCLUDEGROLOC/6 $INCLUDEGRDEAR/6 COMMON/LGRND/LG1201/I6RND/IG1201/RGRND/R611001/CGRND/CG1101 DATA EWALLA,WWALLA, NWALLA, /7891.0,7892.0,7893.0,7894.0/ C _ý_ýýý ------ýýý- - C C..... Make provision for the store of geometry quantities C GO TO 11001,1002,10031, ITSEC 1001 60 TO 110,11,121, IPLANE C..... make arrays for IPLANE=1(x-y plane) 10 CALLMAKEIXU2DI CALLMAKEIX6201 CALLMAKEIYV2DI CALLMAKEIY62DJ RETURN C..... make arrays for IPLANE=2ly-z planet 11 CALLMAKEIYV201 CALLMAKE IY620) RETURN C..... make arrays for IPLANE=3Ix-z plane) 12 CALLMAKEIXU201 CALLMAKEIX62D1 RETURN C c- C ------C..... Retrieve the velocity fields from PHOENICS C 1002 60 TO 114,14,161, IPLANE C..... get velocity field for IPLANE=2ly-z plane) 14 CALL 6ETYXIWI,TKSPI, NY, 11 CALL 6ETYXIV1,TKSP2, NY, 11 DO 15 IY=1, NY UIIY, IZSTEPJ=TKSPIIIY,Ii 15 VIIY, I7STEPJ=TKSP2(IY,1) RETURN C..... get velocity field for IPLANE=3 Ix-7 plane) 16 CALL 6ETYXIINI,TKSP4,1, NX1 CALL 6ETYXIUI, TKSP3,1, NX) DO 17 IX=1, NX UII7STEP, IX)=TKSP3II, IX) 17 VII7STEP,IXI=TKSP411, IXI RETURN C C- 1003 IFIISTEP. NE.11 GOTO 25 C ------C C..... Retrieve the geometry quantities from PHOENICS C GOTO 118,21,23) IPLANE C..... get geometry quantities for IPLANE=1Ix-y plane) 207

18 CALL GETYXIXU20,TKSPI, NY, NX) CALL GETYX(X620,TKSP2, NY, NX) 00 19 IX=1, NX XUIIXI=TKSPIII, 1X) 19 XGIIXI=TKSP2(1, IX) XUINX)=XULAST CALL6ETYX1YV20, TKSP1, NY, NXI CALL GETYXIYG20,TKSP2, NY, NX) 00 20 IY=1, NY YVI IY)=TKSPI I IY, 1 I 20 YGIIYI=TKSP2IIY, 11 YVINY )=YVLAST GOTO 26 C..... get geometry quantities for IPLANE=2ly-z plane) 21 CALL GETYXIYV20,TKSPI, NY, 11 CALL GETYXIY620,TKSP2, NY, II CALL GETZIZNNZ,XU, NZ) CALLGETZIZGNZ, XG, NZI 00 22 1Y=1,NY YVIIYI=TKSP11IY,11 22 YGIIYI=TKSP2(IY, 1) 60 TO 26 C..... get geometry quantities for IPLANE=3Ix-z planet 23 CALL GETYXIXU20,TKSP3,1, NX) CALL GETYXIXG2D,TKSP4,1, NXI CALL 6ET717MNZ,YV, NZ) CALLGETZIZGNZ, Y6, N7) 00 24 IX=1, NX XUIIX)=TKSP3II, IX) 24 XGIIX)=TKSP411,IXI 26 CONTINUE C..... assigning DO-loops limits. NYAC=NY NXAC=NX IFIIPLANE.E0.2) NXAC=NZ IFIIPLANE.EO. 3) NYAC=NZ C

C C..... Finding all regions representing walls c DO2 IR=1,NUMRE6 CALL 6ETPATIIR,IRE6, T, IXF, IXL, IYF, IYL, 12F, I7L, ITF, ITLI IXFAIIRI=IXF IXLAIIRJ=IXL IYFAIIRI=IYF IYLAIIRI=IYL IF 1IPLANE. NE. 21 80 TO 27 IXFAIIR1=IZF IXLAIIRI=IZL 60 TO 28 27 IFIIPLANE.NE. 31 GOTO 28 IYFAIIRJ=IZF IYLAIIRI=IZL 28 CONTINUE IFIT. EO.17.01 TRAIIRI=EIALLA IF IT. E0.18.01 TRAIIRI=NUALLA IFIT. EO.19.0I TRA1IRI=NALLA IFIT. EO.20.0I TRAIIRI=SNALLA IFIT. EO.21.01 TRAIIRI=EVALLA 208

IFIT. EO.22.0) TRAIIRI=WWALLA IFIIPLANE.NE. 31 GOTO 2 IFIT. E0.21.01 TRAIIRI=NWALLA IF IT. E0.22.0) TRA1 IR 1=SWALLA 2 CONTINUE C C------ý C C..... Setting of initial particle distribution on each string C CALL INIDISIITRKI 25 CONTINUE IFIIPLANE.NE. 11 GOTO 29 C..... get velocity fields for IPLANE=1lx-y plane) CALL GETYXIU1,U, NY,NXI CALLGETYXIVI, V, NY,NX1 29 CONTINUE C C------ýýýýýý------ýýý------C C Chapter 0. Add or delete particles according to C the values of DISMIN and DISMAX C IP=1 IFIDISMIN.EO. O. O. OR. DISMAX. EO. 0.01 60 TO 99 91 IP=IP+1 IFIIP. EO.NPMAXI GO TO 99 IPMI=IP-1 92 DIST=SORTIIYPIIP)-YP1IPM1))**2+(XPIIPJ-XP(IPMI))**21 IFIDIST. 6T. DISMIN.AND. DIST. LT. DISMAXIGO TO 91 IFIDIST. GT.DISMAXI THEN NPMAX=NPMAX+1 IPP1=IP+1 00 93 IADD=NPMAX,IPP1, -1 IADDMI=IADD-1 XPIIADDI=XPIIADDMI) 93 YPIIADDI=YPIIADDMII XPIIPI=0.5*IXPIIPM1I+XPIIPP111 YPIIP)=0.5*IYPIIPMII+YPIIPP111 GOTO 92 ENDIF IFIDIST. LT. DISMIN) THEN IFIIP. EO.NPMAX-1) 60 TO 91 NPMAX=NPMAX-1 00 94 IDEL=IP,NPMAX IDELPI=IDEL+1 XPIIDELI=XPIIDELP11 94 YPIIDELI=YPIIDELPII GOTO 92 ENDIF 99 CONTINUE C CM_ýýý_ý ------C C..... Open main-DO-loop. C 00 1000 IP=I, NPMAX C------ý ý_ý_ýý------ýý C 209

Chapter 1. situating the particle inside of domain 00 100 IX=I, NXAC IFIXPIIP). LE. XUIIXI) 60 TO 110 100 CONTINUE 110 00 120 IY=1, NYAC IF IYPI IP ). LE. YVI IY) l 60 TO 130 120 CONTINUE 130 IXM1=IX-1 IYMI=IY-1 IXP1=1X+1 IYPI=IY+1 IZERO=0 C C C Chapter 2. determining whether special actionSisRrequired C ISPCAY=0 ISPCAX=O IEWALL=O INNALL=O INVALL=0 ISNALL=O DO200 I=1, NUMREG C..... took for a x-constant region IFIIX. NE.IXFAIII. AND.IX. NE.IXLAIIii 60 TO 220 IFIIYFA(I). EO.IYLAIII) 60 TO 220 IFIIY. LE. IYLAII). AND.IY. GE.IYFAIIII ISPCAY=1 IF(ISPCAY.E0.1. AND.TRAII). EO.EWALLA) IEVALL=1 IF(ISPCAY.EO. 1. AND.TRA(I). EO.NNALLA) IUNALL=1 60 TO 200 C..... took for a y-constant region 220 IF IIY. NE.IYFAII). AND.IY. NE.IYLA(I)) GOTO 200 IFIIXFAIIl. EO.IXLAII)l GOTO 200 IFIIX. LE. IXLAII). AND.IX. GE.IXFAIIII ISPCAX=1 IFIISPCAX.EO. I. AND.TRA(II. EG.NWALLA) INVALL=1 IF(ISPCAX.EO. 1. AND.TRAII). EO.SWALLA) ISWALL=1 200 CONTINUE C C C Chapter 3 assigning indices for non-special cases C_ ILIFTX=O ILIFTY=O IFIXPIIPI. GE.XGIIX11 ILIFTX=1 IFIYPIIPI. GE.YG11Yll ILIFTY=1 C C..... indices for x (or z)-direction velocities IUN=IY+ILIFTY IUS=IYM1+ILIFTY IUW=IXMI IUE=IX C C..... indices for y-direction velocities IVN=IY IVS=IYM1 IVW=IXM1+ILIFTX IVE=&X+ILIFTX C C...... indices for x (or z1-distances 210

IXUW=IXMI IXUE=IX IXGM=IXM1+ILIFTX IXGE=IX+ILIFTX C C..... indices for y-distances IYVN=IY IYVS=IYM1 IYGN=IY+ILIFTY IYGS=IYM1+ILIFTY C -- C C Chapter 4 modifying indices for special cases C IF(IWNALL.E0.0. AND.IX. NE.1) 60 TO 410 IUN=IZERO IF (ILIFTX. EO.0 ). IVW=IVE IF(ILIFTX. EQ.O. AND. IUALL. E0.1) IVW=IZERO 410 IF(IEMALL.EO. 0. AND.IX. NE.NXAC) 60 TO 411 IUE=IZERO IFIILIFTX. EQ.11 IVE=IVV IF IILIFTX. E0. I. AND.IENALL. EO. 11 IVE=IZERO 411 IF(ISNALL.EQ. O. AND. IY. NE.1) 60 TO 412 IVS=IZERO IF(ILIFTY. EO.0) IUS=IUN IF IILIFTY. EO.0. AND.ISWALL. EO. Ii IUS=IZERO 412 IF(INIMALL.EQ. 0. AND.IY. NE.NYAC) 60 TO 400 IVN=IZERO IFIILIFTY. EO.II IUN=IUS IFIILIFTY. E0.1. AND.INNALL. EO. II IUN=IZERO 400 CONTINUE c- c C Chapter 5 assigning the required variables C C..... u- (or )-velocities UNw=0.0 IF IIUN. NE.IZERO. AND. IUL. NE.IZERO) UNV-U(IUN,IUw) usw=0.0IFIIUS. NE.IZERO. AND. IUL. NE.IZERO) USW=UIIUS,IUW), UNE=0.0 IF(IUN. NE.IZERO. AND. IUE. NE. IZERO) UNE-U(IUN,IUE) USE=0.0 IFIIUS. NE.IZERO. AND. IUE. NE. IZERO) USE-U(IUS,IUE) C C..... v-velocities VNN=0.0 IFIIVN. NE.IZERO. AND. IVW. NE. IZER01 VNW=VIIVN, IVw1 vsw=0.o IFIIVS. NE.IZERO. AND. IVL. NE.IZERO) VSV=VIIVS,IVN1 VNE=0.0 IFIIVN. NE.IZERO. AND. IVE. NE.IZEROI VNE=VIIVN,IVE) VSE=0.0 IFIIVS. NE.IZERO. AND. IVE. NE.IZEROI VSE=VIIVS,IVE) C C..... velocity very close to side walls IFIIX. EO.1 AND. ILIFTX. EO.0) THEN VNV=1.5*VIIVN,IVIWI-0.5*VIIVN, IVw+1) VS!=1.5*VIIVS, IVii-0.5*VIIVS, IVN+1) ELSEIFIIX. EO.NX AND. ILIFTX. E0.1) THEN 211

VNE=i.5*V(IVN, IVE1-0.5*VIIVN, IVE-11 VSE=1.5*V(IVS,IVEI-0.5*VIIVS, IVE-11 ENDIF IF(IY. EO.1 AND. ILIFTY. EO.01 THEN USW=1.5*UIIUS,IUNI-0.5*U(IUS+I1 IUW) USE=1.5*U(IUS,IUEI-0.5*UIIUS+1, IUE) ELSEIFIIY. EO.NY AND. ILIFTY. EO.11 THEN UNI=1.5*UIIUN, IUNI-0.5*U(IUN-1, IUN1 UNE=1.5*UIIUN,IUE)-0.5*UIIUN-1, IUE) ENDIF C C..... x- for z)-distances XUE=XUIIXUEI XUM=XU(IXUEI IF IIX. EO. 11 XUIN=0.0 XGE=X6(IXGE) IFIIX. EO.NXAC. AND. ILIFTX. E0.1) XGE=XU(NXAC) XGW=XGIIXGN) IF(IX. EO.I. AND.ILIFTX. E0.0) XGN=0.0 C C..... y-distances WN=YV(IYVN I YVS=YVIIYVSI IFIIY. E0.1) YVS=0.0 YGN=YG(IYGN) IFIIY. EO.NYAC. AND. ILIFTY. E0.1I YGN=YVINYACI YGS=YG(IYGS) IFIIY. E0. I. AND.ILIFTY. E0.01 YGS=0.0 C C C C Chapter 6 determining the parameters required C YS=IYP I IP 1-YGS)/ (YSN-YGS1 Yi= 1YP1 IP i-YVS)/ IYVN-YVS) XS=IXPUIPI-XUw)/IXUE-XUNI XV=IXPIIPI-XGW1/IXGE-XGV) YN=1.0-YS YE=1.0-YV XN=1.0-XS XE=1.0-XV YSXS=YS*XS YSXN=YS*XN YNXS=YN*XS YNXN=YN*XN X'YW=XN*YM XIYE=XN*YE XEYN=XE*YM XEYE=XE*YE C C..... determining the velocity of particle UP=YSXS*UNE+YSXN*UNI+YNXS*USE+YNXN*USN VP=XNY/*VNE+XVYE*VSE+XEYV*VNW+XEYE*VSV C C C Chapter 7 compute the new position of the particle C C..... run 1 IFIIP. EO.I OR. IP. EO.NPMAX) UP=0.0 212

C..... run 2 IJ=O IFIIP. E0.11 UP=0.0 IFIIP. EO.NPMAXI THEN IFIABSIXULAST-XPIIP11.GT. 1. E-4) THEN VP=0.0 ELSE IJ=1 UP=0.0 ENDIF ENDIF IFIXPINPMAXJ.EO. XULASTI IJ=O XPIIPI=XPIIP)+UP*OT YPIIPI=YPIIPI+VP*DT C 1000 CONTINUE C..... run 2 IFIIJ. E0.11 THEN JJ=0 DO 9999 IP=NPMAX,1, -1 IFIYPIIPI. LT. YPIIP-11) THEN JJ=JJ+1 ELSE 60 TO 8888 ENDIF 9999 CONTINUE 8888 CONTINUE NPMAX=NPMAX-JJ XPINPMAX)=XULAST ENDIF C C C Chapter 8 print statements C C..... run 1 IF IISTEP.EU. 1. OR.ISTEP. EU. 084. OR.ISTEP. EU. 134. OR. 1 ISTEP.EO. 180. OR. ISTEP. EO. 240. OR. 2 ISTEP.E0.298. OR.ISTEP. EO. 344. OR. 3 ISTEP.EO. 396. OR.ISTEP. E0.456. OR. 4 ISTEP.EU. 512. OR.ISTEP. E0.576. OR. 5 ISTEP.EO. 616. OR.ISTEP. E0.676. OR.ISTEP. E0.7121 THEN C..... run 2 IF (ISTEP.EO. 1. OR.ISTEP. E0.132. OR.ISTEP. E0.224. OR. 1 ISTEP.E0.352. OR.ISTEP. EU. 448. OR. 2 ISTEP.EO. 552. OR.ISTEP. E0.664. OR. 3 ISTEP.E0.756. OR.ISTEP. E0.856. OR. 4 ISTEP.E0.994. OR.ISTEP. E0.1064. OR. 5 ISTEP.E0.1180. OR.ISTEP. E0.1232. OR.ISTEP. EU. 13601 THEN BRITE(20,*) NPMAX,ISTEP, IRUN DO912 IX=I, NPMAX NRITE120,915) IX, XPIIXI, YPI1XI 915 FORMATI2X,I4, IX, IPE10.3, IX, 1PE10.31 912 CONTINUE ENDIF RETURN END C C_ 213

C C..... Subroutine TRKDIMsets the commonblocks C and dimension statements C C -- -- C C User has to give appropriate values to the C variables in the PARAMETERstatement below C C I------I CI VALUESFOR DIMENSION-INDICES I CI -I CI IPLANE I IDIMI I IDIM2 I IDIM3 I CI_ I_------I-- -I-- I CI1I NY I NX I NX I C I- I- I -I I C121 NY I NZ I1I C I- ----I I -I --I C131 NZ I NX I NX I CI -I-- --I------I I C PARAMETERIIDIMI=30,IDIM2=32, IDIM3=321 C C C PARAMETERIMAXPAR=2000, NTRAK=1) C C MAXPARis the maximumnumber of particles in a string C NTRAK is the number of strings to be considered C C ------C C User is requested not to change anything below C COMMON/TRKSEO/XGIIDIM2),XUIIDIM2), YGIIDIMI1, YVIIDIMI) COMMON/TRKVEL/UIIDIMI,IDIM2), VIIDIMI, IDIM2) COMMON/TRKSPR/TKSPIIIDIMI,IDIM3I, TKSP2IIDIMI, IDIM3), TKSP3l1,IDIM3), TKSP411,IDIM3) COMMON/TRKVAR/XPIMAXPAR),YPIMAXPARI, NPMAX, NXAC, NYAC COMMON/TRKPLT/XPLOTIMAXPARI,YPLOTIMAXPAR, II, YAXIS(f) COMMON/TRKRSN/IXFA1101, IXLA (10 ), IYFA(10 ), IYLA1101, TRA (10 ) C C END O.F FILE C C SUBROUTINEINIDISIITRKI C $INCLUDETRKOIM $INCLUDE6RDLOC/6 $INCLUDEGRDEAR/G COMMON/LGRND/L61201/I6RND/I6(20)/RSRND/R6(1001/CSRND/CS110) C 60 TO11,21,ITRK C-- 1 CONTINUE C..... set initial particle distribution here ::::: string 1 C..... run 1 NPMAX=1615) DX=XULAST/FLOATINPMAX-1) DO 21 IX=1, NPMAX 214

XPI IX 1=DX*FLOATI IX-1) 21 YPIIXI=RG1111+1.5*XULAST-XPIIXII*TANIRGIS)*3.14159/180.) XP111=0.0 XPINPMAXI=XIAAST C..... run 2 NPMAX=1G151 DX=.27/FLOATINPMAX-11 DO21 NPMAX XPIIXI=DX*FLOATIIX-1)_IX=I, 21 YPIIXI=I. 27-XPIIXII*TANIRSI9)*3.14159/180.1 XPl1)=0.0 XP(NPMAXI=.27 YPINPMAX1=0.0 C..... open storage file and transmit initial distribution... CALLFILTRKI1, NPMAX, XP, YP, ITRK) RETURN C------2 CONTINUE C..... set initial particle distribution here ::::: string 2 C C. C C..... open storage file and transmit initial distribution... CALLFILTRK11, NPMAX, XP, YP, ITRKI RETURN ENO C- C SUBROUTINEFILTRKIIFNC, NPTS, XP, YP, ITRKI C ýýý CHARACTERNAMTRK*4, TRKNUM*2 DIMENSIONXPINPTS1, YP(NPTS) PARAMETERI LUNTRK=40, MPART=501 DATANAMTRK/'TMP. '/ c C..... check to ensure valid function ---- IFIIFNC. LT. 1 OR. IFNC.6T. 41 THEN VRITE(6,*)' IFNC=', IFNC,' INVALID... SEE 1, d 'ROUTINEFILTRK. FTN' RETURN ENDIF C..... select function 60 TO 1100,200,300,4001, IFNC C --- C..... Section 1. - open the data file to store string ITRK 100 CONTINUE MRITEITRKNUM, ' 1I2 )' 1 10+ITRK-1 NSYTES=4+2*4*MPART OPENILUNTRK+ITRK,FILE-NAMTRK//TRKNUM, STATUS='RENEa', & ACCESS='DIRECT',RECL=NBYTES, & BLOCKS12E--KBYTES+4) RETURN c C..... Section 2. - write the coordinates of the particles in string C ITRK to the data file. 200 CONTINUE IREC=1 DO 210 I=1, NPTS,MPART IPMAX=MINOII+MPART-1,NPTSI 215

IRITEILUNTRK+ITRK,REC=IREC) NPTS, & IXPIIPI, IP=I, IPMAX),(YPIIPI, IP=I, IPMAXI IREC=IREC+1 210 CONTINUE RETURN C- C..... Section 3. - read the coordinates of the particles in string C ITRK from the data file. 300 CONTINUE IREC=1 READILUNTRK+ITRK,REC=11 NPTS DO 310 I=1, NPTS,MPART IPMAX=MINOII+MPART-1,NPTS) READILUNTRK+ITRK, REC=IREC) NPTS, IXPI IP I, IP=I, IPMAXI, IYPI IP I, IP=I, IPMAX) IREC=IREC+1 310 RETURNS C C..... Section 4. - close and delete the data file storing string C ITRK. 400 CONTINUE CLOSEILUNTRK+ITRK,STATUS='DELETE'I RETURN END C C SUBROUTINETRKDENIRI, AR, IFACEI C $INCLUDETRKDIM $INCLUDESATEAR/6 $INCLUDE6RDEAR/6 C PARAMETERI NPCOIM=500 1 C DIMENSIONRIIIDIMI, I0IM2), AREA2IIDIMI,IDIM2I, ARIIDIMI, IDIM21 DIMENSIONDYIIDIM1l, DXIIDIM2I, VVOLIIDIMIIDIM2) DIMENSIONXPCINPCOIMI, YPCINPCDIMI CHARACTER*5IFACE, EAST, NEST, SOUTH, NORTH, OFACE, EMPTY DATAEAST, WEST, SOUTH, NORTH/'EAST ', 'WEST', 'SOUTH','NORTH'/ DATAEMPTY/'EMPTY'/ DATARMIN/0.0/ C C ------C..... Initialize array to contain the computed areas. DO5 IY=1, NY DO 5 IX=1, NX ARIIY, IX1=0.0 5 AREA2IIY,IXI=0.0 C

C..... Computegeometrical quantities only for the first time step. IFIISTEP. NE.11 60 TO 6 DYIII=YVIII DX111=XU111 00 1 IY=2, NY DYI IY 1=YVI IY 1-YVI IY-11 DO 2 IX=2, NX DXI IX 1=XUI IX 1-XUI IX-11 216

2 VVOLIIY,IXI=OYIIYJ*DXIIXI I CONTINUE DO3 IX=1, NX 3 VVOLI I, IX I=DY111*DX I IX J 00 4 1Y=1,NY 4 VVOLIIY,1)=DYIIY)*DXIII 6 CONTINUE C C-- C..... Determine indices of the cell containing the starting point. DO 10 IYIN=I, NY IFIYPIII. LT. YVIIYINJJ 60 TO 20 10 CONTINUE 20 00 11 IXIN=1, NX IFIXP(IJ. LT. XUIIXINJI 60 TO 21 11 CONTINUE 21 CONTINUE C..... Initialize string. IPOUT=1 XPCI11=XPIII YPCI1)=YP 11) C..... Determine coordinates of edges of cells. XB=XUIIXINI YB=YVIIYINI XL=XB-DXIIXINJ YL=YB-DYIIYINI C C --- C..... Move along interface looking to see when it leaves cell. C When it does so, use YPCand XPC to store coordinates of C the point at which the string leaves the cell. 25 CONTINUE OFACE=EMPTY DO 30 NPTS=I,NPCDIM XDIF=XPCINPTSI-XPIIPOUTI IFTABSIXDIFI.6T. 1. OE-101 THEN UUM=IYPCINPTSI-YPIIPOUTJI/XDIF ELSE UUM=0.0 ENDIF WC=YPCINPTS J-WM*XPC INPTS 1 C..... Check if the track leaves through the west face. XOUT=XL YOUT--UUM*XOUT+WC IFIYOUT.LE. YB AND. YOUT.6E. YL AND. XPIIPOUT).LT. XLJ THEN OFACE=NEST 60 TO 31 ENDIF C..... Check if the track leaves through the east face. XOUT=XB POUT--UXI*XOUT+UUC IFIYOUT.LE. YB AND. YOUT.6E. YL AND. XPIIPOUTI.GE. XBI THEN OFACE--EAST 60 TO 31 ENDIF C..... Check if the track leaves through the south face. YOUT=YL IFIUUM.NE. 0.01 THEN XOUT=IYOUT-WC I/UUM ELSE 217

XOUT=XPC(NPTSI ENDIF IFIXOUT.LE. XB AND. XOUT.GE. XL AND. YPIIP(UT). LT. YLI THEN OFACE=SOUTH 60 TO 31 ENDIF C..... Check if the track leaves through the north face. YOUT=YB IFIUUM.NE. 0.01 THEN XOUT=IYOUT-UUC)/UUM ELSE XOUT=XPCINPTS I ENDIF IFIXOUT.LE. XB AND. XOUT.GE. XL AND. YPIIPOUTI.GE. YBI THEN OFACE=NORTH 60 TO 31 ENDIF XPCINPTS+1I=XP(IPOUTI YPC(NPTS+1I=YPIIPOUT) IPOUT=IPOUT+1 30 CONTINUE 31 CONTINUE NPTS=NPTS+1 YPCINPTSI=YOUT XPC(NPTSI=XOUT C C C..... Calculate volume of cell occupied by fluid below the track. C C..... If the track goes straight across the cell. IFIIFACE. EO.VEST AND. OFACE.EO. EAST OR. d IFACE.EO. EAST AND. OFACE.EO. VEST I THEN IF IIFACE.EO. IESTI THEN AREAA2=AREAIXPC, YPC, NPCDIM, NPTS, YB, 1.0) ELSE AREAA2=VVOL(IYIN,IXINI-AREA IXPC, YPC, NPCDIM, NPTS, YB, -1.0) ENDIF ELSE IFIIFACE. EO.SOUTH AND. OFACE.EO. NORTH OR. a IFACE.EO. NORTH AND. OFACE.EO. SOUTH . J THEN IF(IFACE. EO.SOUTH) THEN AREAA2=VVOL(IYIN,IXINI-AREA IYPC, XPC, NPCDIM, NPTS, XB, 1.0) ELSE I AREAA2=AREAIYPC,XPC, NPCDIM, NPTS, XB, -1.01 ENDIF ELSE C..... If the track cuts the cell across a corner. IF(IFACE.EO. VESTI THEN IFIOFACE.EO. SOUTHI THEN AREAA2=VVOLIIYIN,IXIN)-AREAIXPC, YPC, NPCDIM, NPTS, YL, -1.01 ELSE AREAA2=AREAIXPC,YPC, NPCDIM, NPTS, YB, 1.01 ENDIF ELSE IFIIFACE. EO.SOUTHI THEN IF(OFACE.EO. EASTI THEN AREAA2=VVOL(IYIN,IXIN)-AREA IYPC, XPC, NPCDIM, NPTS, XB, 1.01 ELSE AREAA2=AREAIXPC, YPC, NPCDIM, NPTS, YL, 1.01 ENDIF 218

ELSE IF IIFACE.EO. EASTI THEN IF(OFACE.EO. NORTH) THEN AREAA2=VVOL(IYIN,IXINI-AREA(XPC, YPC, NPCDIM, NPTS, YB, ELSE -1.0) AREAA2=AREAIXPC, YPC, NPCDIM, NPTS, YL, 1.01 ENDIF ELSE IF(IFACE.EO. NORTH) THEN IFIOFACE.EO. VEST) THEN AREAA2=VVOL(IYIN,IXIN)-AREA IXPC, YPC, NPCDIM, NPTS, YB, ELSE -1.0) AREAA2=AREAIXPC,YPC, NPCDIM, NPTS, YB, 1.01 ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF ENDIF C..... If the track enters and leaves the cell through the some face. IF(IFACE.EO. VEST AND. OFACE.EO. NEST) THEN IF(YPCII). GT.YPCINPTS)I THEN AREAA2=VVOLIIYIN,IXINJ-AREA IYPC, XPC, NPCDIM, NPTS, XL, 1.01 ELSE AREAA2=AREAIYPC,XPC, NPCDIM, NPTS, XL, -1.0) ENDIF ELSE IF(IFACE.EO. SOUTH AND. OFACE.EO. SOUTH) THEN IFIXPCIIJ. GT.XPC(NPTSJ) THEN AREAA2=AREA(XPC,YPC, NPCDIM, NPTS, YL, 1.01 ELSE AREAA2=VVOL(IYIN,IXIN1-AREA (XPC, YPC, NPCDIM, NPTS, YL, -1.0) ENDIF ELSE IF(IFACE.EO. EAST AND. OFACE.EO. EAST) THEN IF (YPCl1 J. GT.YPC INPTS) l THEN AREAA2=AREA(YPC,XPC, NPCOIM, NPTS, XB, -1.01 ELSE AREAA2=VVOL(IYIN,IXINJ-AREA(YPC, XPC, NPCDIM, NPTS, XB, 1. ) ENDIF ELSE IFIIFACE. EO.NORTH AND. OFACE.EO. NORTH) THEN IFIXPCII). GT.XPC(NPTSII THEN -- AREAA2=VVOL(IYIN,IXIN)-AREA(XPC, YPC, NPCDIM, NPTS, YB, ) ELSE -1. AREAA2=AREA(XPC,YPC, NPCDIM, NPTS, YB, 1.01 ENDIF ENDIF ENDIF ENDIF ENDIF C C C..... Sumareas so that they are overlayed to give the right value. IF(AREAA2.GT. VVOL(IYIN, IXIN)-AREA2(IYIN, IXIN)I THEN AREA2(IYIN,IXINJ=AREA2(IYIN, IXINI+AREAA2-VVOL(IYIN, IXIN) ELSE AREA2(IYIN,IXINJ=AREA2(IYIN, IXINJ+AREAA2 ENDIF 219

C C C..... Prepare parameters to enter the next cell. IF IOFACE.EO. NORTH) THEN IYIN=IYIN+1 IFACE=SOUTH YL=YB YB=YB+DYI IYIN 1 ELSE IFIOFACE.EO. SOUTH) THEN IYIN=IYIN-1 IFACE-NORTH YB=YL YL=YL-DYIIYINI ELSE IFIOFACE.EO. EAST) THEN IXIN=IXIN+1 IFACE=VEST XL=XB XB=XB+DXIIXIN) ELSE IF (OFACE.EO. MEST) THEN IXIN=IXIN-1 IFACE=EAST XB=XL XL=XB-DXIIXINI ENDIF ENDIF ENDIF ENDIF YPCl11=YOUT XPC11I=XOUT C C C..... Check whether the last particle on the string has been met. IFIIPOUT.6E. NPMAXI 60 TO 100 C C.... If it has not, go and keep on moving along the track. 60 TO 25 100 CONTINUE C C C..... If the last particle on the string has been reached, C see what has changed and set volume fraction accordingly. DO 110 IY=1, NY DO 110 IX=1, NX C..... For those cells which were transversed by string, calculate C the volume fraction occupied by the fluid below the track. IFIAREA2(IY,IXI. NE.0.0) THEN R11IY, IX)=1.0-AREA2IIY, IX1/VVOLIIY, IXI ELSE C..... Set volume fraction for those cells which do not contain C sny particles. IF(RIIIY, IXI. LT. 0.51 THEN RIIIY, IXI=RMIN ELSE RIIIY, IX)=1.0-RMIN ENDIF ENDIF C..... Calculate accumulated volume fraction. 220

RIIIY, IX1=RIIIY, IXJ-ARI1Y, IX) RIIIY, 1XI=AMAXI(RI(IY,IXI, RMIN) RI(IY, IX)=AMINI(RI(IY, IX), I. 0-RMINI ARIIY, IXI=ARIIY, IX1+RIIIY, IX) ARIIY, IXI=AMAXI(ARIIY,IX), RMIN) AR(IY, IX)=AMINI (ARI IY, IX 1,1.0-RMIN) 110 CONTINUE C C ------RETURN END C C FUNCTIONAREAIXP, YP, NPCDIM,NPTS, YY, SNAP) C----- DIMENSIONXPINPCDIMI, YP(NPCDIM) C C..... Initialize function to zero. AREA=0.0 C C..... Move along the segment calculating area. DO 10 IP=1, NPTS-1 XOLD=XPIIPI XNEI=XPI IP+1) YOLO=YPIIPI YNEM=YPIIP+11 AREA=AREA+0.5*12.0*YY-YNEI-YOLDI*IXNEW-XOLDI*SNAP 10 CONTINUE RETURN END 221

APPENDIX D The Scalar-Equation Method Subroutines

This appendix provides readers with information which is of assistance in understanding and using the subroutines for solving the time-dependent equation of the scalar variable (D. The subroutines consist of

The main subroutine GHLEER. The external function GGHBAR. The subroutinesGXFLUX and GYFLUX. The subroutinesCOMPHX and COMPHY.

The function of each subroutine now follows.

Subroutine GHLEER

This subroutine performs the x and y advection of scalar (D. The order of calculation is x first, y second and y first, x second for alternate time steps. It must be called at the end of every time step:

CALLGHLEER(ORDER, GHO, GHN, GUN, GVN, DT, DY, DX, NY, NX)

where

'ORDER' is a character variable, the value of which determines the direction of advection. 222

GHO and GHN are two local arrays which contain the field values of CD at the start and end of the current time step. GUN and GVN are two local arrays which contain the field values of two velocity components at the end of the current time step. 21 is the size of the time step. DX and pY are the x and y dimensions of the cell. and are the cell numbers in the x and y directions.

This subroutine does not require any action from the user and therefore, it must not be modified at all.

This function calculates the average values of b at cell boundaries over the time period of DT. It must be called before the computation of c fluxes:

CALL GGHBAR(VEL,XY, IY, IX, DT, DIS, NY, NX, PHI) where

VEJ_ takes the value of advective velocity. XY takes the value of character variable 'ORDER'. 1Y and jX determine the position of the cell in question. DM is the x or y dimension of the cell. PHII contains the field values of cb at the start of the 223

current time step.

The user must not change anything in this function if he is content with:

" Zero gradients of b at the boundaries of flow domain.

0 Second-order accuracy.

" Van Leer's recommendation for ensuring monotonicity.

Subroutines GXFLUX and GYFLUX

These two small subroutines calculate the fluxes of b across cell boundaries. As can be seen from GHLEER, they must be called in alternate lines:

CALL(GHX, GHO, GUN, DT, DY, DX, NY, NX) CALL(GHY, GHO, GVN, DT, DY, DX, NY, NX)

where

GHX contains the fluxes of CDacross east boundaries of cells. GHY contains the fluxes of CDacross north boundaries of cells. GHO contains the field values of CDat the start of the current time step or at the end of x or y advection. 224

No modification is required of these subroutines as long as the boundaries of the flow domain are impervious walls.

Subroutines COMPHX and COMPHY

These two subroutines update the distribution of cb using an explicit integral procedure. As can be seen from GHLEER, they must be called in alternate lines: -

CALLCOMPHX(ORDER, GHX, GHY, GHO, GHN, GUN, GVN, NY, NX DY,DX, DT, VCELL) , CALLCOMPHY(ORDER, GHX, GHY, GHO, GHN, GUN, GVN, NY, NX DY,DX, DT, VCELL) ,

where

yGF-LL is the volume of the cell. GHO contains the field values of CDat the start of the current time step or at the end of x or y advection.

is that the trick, which ensures the -it worth noting conservation of cell volume as explained in Chapter 4, is here in play for the calculation of the new m's.

No change is required of these subroutines, provided that the flow of interest is confined to a domain, of which the boundary only consists of impervious walls. 225

APPENDIX0

SUBROUTINEGHLEERIORDER, GHO, GHN, GUN, GVN, DT, DY, DX, NY, NX) ------$INCLUDETRKDIM CHARACTERORDER DIMENSIONGHOINY, NXI, GHNINY,NXI, GHXIIDIM1, IDIM21 DIMENSIONGUNINY, NXI, GVNINYNXI, GHYIIDIM1, IDIM21 C------C--- C initialize fluxes C--- VCELL=DX*DY DO 10 IY=14NY DO 10 IX=1, NX GHXIIY, IX1=0.0 10 GHYIIY,IX1=0.0 C--- C perform x-y or y-x alternate advection IFIORDER.EO. 'X'1 THEN C--- C calculate x volume fluxes C_-- CALLGXFLUXIGHX, GHO, GUN, DT, DY, DX, NY, NX1 C_- C update F---x C--- CALL COMPHXIORDER,GHX, GHY, GHO, GHN, GUN, GVN d NI, NX,DY, DX, DT, VCELL) , C--- C calculate y volume fluxes C--- CALLGYFLUXIGHY, GHN, GVN, DT, DY, DX, NY, NXI C--- C update F---y C--- CALL COMPHYIORDER,GHX, SITY, GHN, GHN, GUN, GVN d NI, NX,DY, DX, DT, VCELL) , C-- ELSE C--- C calculate y volume fluxes C_- CALL GYFLUXIGHY,GHO, GVN, DT, DY, DX, NY, NX1 C--- C update F---y C--- CALL COMPHY(ORDER,GHX, GHY, GHO, GHN, GUN, GVN d NY,NX, DY, DX, DT, VCELL) , C--- C calculate x volume fluxes C_-- CALLGXFLUXIGHX, GHN, GUN, DT, DY, DX, NY, NX1 C--- C update F---x CALLCOMPHXIORDER, GHX,SITY, GHN, GHN, GUN, GVN d , NY,NX, DY, DX, DT, VCELL) 226

C--- C finish of edvection C--- ENDIF C_-- RETURN END C C_- FUNCTIONGSHBARIVEL, _ XY, IY, _-___------IX, DT,DIS, NY,NX, PHI1 C------PARAMETERI IPF=+1 IP=O IPB=-1 1 , , DIMENSIONPHI INY, NXI, JXIIPB: IPF), JYIIPB: IPF) CHARACTERXY C_ ýý------C--- C Find upwind cell IFIVEL. GE.0.01 THEN DDIS=+DIS NSHIFT=O ELSE DDIS=-DIS NSHIFT=1 ENDIF C--- C See order of convection C--- IFIXY. EO.'X'I THEN DO 10 K=IPB4IPF JXIKI=IX+K+NSHIFT JYIKI=IY 10 CONTINUE JXIIPFI=MINOIJXIIPFl, NX1 JXIIPBI=MAXOIJXIIPBI,01I ELSE 00 20 K=IPB,IPF JX IK1=IX JYIKI=IY+K+NSHIFT 20 CONTINUE JYIIPFI=MINOIJYIIPFI, NY) JY I IPBI=MAXO IJY I IPS 1,01 I ENDIF C--- DPHIF=PHIIJY IIPFI, JX IIPF11-PHI IJY IIP1, JX IIP) l DPHIB=PHILJY 1 IP ), JX I IP )1-PHI IJY l IPB 1, JX 1IPB 11 C--- C Put limit on DPHIF & DPHIB C--- IFIDPHIF. GT.0.01 DPHIF=AMAX1lDPHIF,+1. E-101 IFIDPHIB.GT. 0.0) DPHIB=AMAXIIDPHIB,+1. E-101 IFIDPHIF.LT. 0.01 OPHIF=AMIN1IDPHIF,-1. E-101 IFIDPHIB.LT. 0.01 DPHIB=AMINI(DPHIB,-1. E-101 C--- C Calculate F at cell face using second order scheme, eq. 14.29) C Monotonicity condition is employed to limit the gradient of F s=o.o SSNPHI=1.0 IFIDPHIF.LT. o. 0) SGNPHI=-1.0 227

IFIDPHIF*DPHIB.GT. 0.01 S=SGNPHI DPHI=S*AMIN112.0*ABSIDPHIB1,0.5*IABSIDPHIBI+ABSIDPHIFII 2.0*ABSIDPHIF))/DIS GGHBAR=PHIIJYIIPl,, JXIIP11+0.5*DDIS*DPHI*11.0-VEL*DT/DDIS1 C--- RETURN END C SUBROUTINEGXFLUXIBHX, GH0, SUN, DT, DY,DX, NY, NXI C------DIMENSIONGHXINY, NXI, GHOINY,NXI, GUNINY,NXI C_---______------C--- DTDY=DT*DY C--- DO 10 IY=1, NY 00 10 IX=1, NX-1 UBAR=GUNIIY,IXI HBAR=GGHBARIUBAR,'X', IV, IX, DT, DX,NY, NX, GHOI GHX(IV, IXI=DTDY*HBAR*UBAR 10 CONTINUE C--- RETURN END C C ------SUBROUTINEGYFLUXIGHY, GHO, GVN, DT, DY,DX, NY, NXI C------DIMENSIONGHYINY, NXI, GHOINY,NXI, GVN(NY,NXI C------C--- DTDX=DT*DX C--- 00 10 IY=1, NY-1 DO 10 IX=1, NX VBAR=GVN(IY,IX) HBAR=GGHBARIVBAR,'Y', IY, IX, DT,DY, NY, NX, GHOI SITY(IV,IX)=DTDX*HBAR*VBAR 10 CONTINUE C--- RETURN END C C ------ýýý SUBROUTINECOMPHX(ORDER, GHX, GHY, GHO, GHN, SUN, GVN Zt NY,NX, DY, DX, DT, VCELL) , C ------CHARACTERORDER DIMENSIONGHXINY, NXI, GHYINY,NXI, GUNINY,NXI DIMENSIONGHO(NY, NXI, GHN(NY,NX), GVN(NY,NX) C------C--- DTDX=DT*DX DTDY=DT*DY C--- C Set zero gradient and zero flux condition at edge of domain DO 10 IY=I, NY DO 10 IX=1, NX 228

IE=IX IW=IX-I IN=IY IS=IY-I IFIIX. EO.I) IW=NX IFIIY. EO.11 IS=NY C--- C Calculate new F while volume of cell [F+11-F)l is C conserved during each phase of fluid advection. DVX=0.0 DVY=0.0 IFIORDER.EO. 'X'I THEN DVX=DTDY*(GUN(IY,IE)-GUNIIY, IW)) ELSE DVY=DTDX*IGVN(IN,IXI-GVN(IS, IXll ENDIF FEMW=GHX(IY,IE)-GHXIIY, IW) GHNIIY, IX)=(GHO(IY, IX)*IVCELL-DVYI-FEMW)/IVCELL-DVX) SHNIIY, IXI=AMAX110.0, GHNIIY, IX)) GHNIIY, IX)=AMIN111.0, GHNIIY, IX)) 10 CONTINUE C--- RETURN END C C-- SUBROUTINECOMPHYIORDER, GHX, GHY, GHO, GHN, SUN, GVN d NY,NX, DY, DX, DT, VCELL) , C_ CHARACTERORDER DIMENSIONGHXINY, NX), SITYINY,NXI, GUNINY,NX) DIMENSIONGHOINY, NX), GHNINY,NXI, GVNINY,NX) C__ýýý_ý --- C_- DTDX=DT*DX DTDY=DT*DY C--- C Set zero gradient and zero flux condition at edge of domain DO 10 IY=1, NY 00 10 IX=1, NX IE=IX IW=IX-1 IN=IY IS=IY-1 IFIIX. EO. 11 IW=NX IFIIY. E0.1! IS=NY C--- C Calculate new F while volume of cell [F+11-Fl] is C conserved during each phase of fluid advectton. DVX=0.0 DVY=0.0 IFIORDER.EO. 'X'I THEN DVX=DTDY*t6UN1IY,IE)-GUNtIY, I1)) ELSE DVY=DTDX*(6VN(IN,IX)-6VNIIS, IX)) ENDIF FNMS=6HY1IN,IXJ-SITY(IS, IX) 229

6HN(IY,IX)=16H011Y, IX1*IVCELL-DVXI-FNMS1/IVCELL-DVY) GHNIIY,IXI=AMAX1(0.0, GHNIIY, IX)I GHNIIY,IXI=AMIN111.0, GHNIIY, IX11 10 CONTINUE C--- RETURN END APPENDIX IN RESPONSE TO THE EXAMINERS' REQUIREMENTS

TABLE OF CONTENTS PAGE No. -,

}

(1) Literature Review with Special Reference to the Sloshing Problem 2

(2) Experimental and Computational Results in Addition to Those Presented in Chapter 6 10

(3) Calculation of Liquid Sloshing in a Prismatic Tank Due to Rolling 14

(4) Choice of Grid Size and Time Step 22

(5) The Nature of the Flow in Experiment 25

Small-model (6), - Scaling Laws Relating to Full-scale Prototype 26

(7) References 27

1 (1) LITERATURE REVIEW WITH SPECIAL REFERENCE TO -fi THE SLOSHING PROBLEM

Introduction

When liquids' are carried in tanks which are not completely full, tank motions can create violent -internal waves- which impart dynamic and ý impact pressures to -the 'ýboundaries of tanks. - Depending on the tank geometry, on the centre of rotation, on the frequency and amplitude of oscillation and most importantly, on ' the - liquid height in the tank, a variety of wave forms can develop. These include standing waves, travelling waves and hydraulic bores. The last are step-like waves that travel across the tank, impacting on its walls and usually- resulting in high pressures. ''

FS'i (ý ý

From experimental observations, it is now well recognised that, even at very high fillings in smooth tanks, sloshing pressures can often be of sufficient magnitude to cause structural damage to the tank, especially when the natural frequencies of the tank motions are near those of , the liquid. Several structural problems resulting from slosh-induced loads have been reported[1,7]. However, a number of operational factors[2] make partial fillings either unavoidable or highly, attractive. The designer of all types of tanks must, therefore, be, aware of the consequences of liquid sloshing and be able to 'predict the resulting loads. 1

2 It -is hardly necessary to state that the problem under consideration is a difficult one, given the non-linear nature of the , phenomenon and the number of the variables. The complexity of the problem dictates the need for numerical modelling, with the help of experimental knowledge, to represent` the 'three components of a complete simulation procedure, namely, oscillation, liquid behaviour and structural analysis. The current review is exclusively devoted to the second: component.

Review of computational studies

Shallow-water theory

The sloshing of liquid in a open rectangular tank at low filling level was studied by Verhagen and van Wijngaarden[24], who used the linear shallow-water theory to describe the water height; From- this approximation, resonance frequencies for which the amplitude of the sloshing becomes infinite were determined. Experimental observation[24] shows that under these circumstances a hydraulic bore is formed, which travels periodically , back and forth between the walls of the tank. This hydraulic bore is a non-linear phenomenon, analogous to the shock wave appearing in one-dimensional gas flow., -A theory originally developed for one-dimensional gas flow was therefore applied to the liquid sloshing in order to calculate the'-strengh and phase of the hydraulic bore. The

3 theoretical results were shown to be in good agreement with , the experimental values[24].

Potential-flow theory y. ,t-.

For high liquid fillings, Blixell[4] had made use of linear potential-flow theory to predict the sloshing. An analytical solution for -a tank which is two-dimensional, smooth and with no ceiling, was obtained. This theory, however, breaks down at the point of resonance. I t° 'I

.F

Knowing the deficiency of the linear theory, Faltinsen[9] formulated a non-linear, boundary-value problem of potential flow, the 'solution of which provided an analytical solution valid both at the point of resonance and in the vicinity of resonance: The theory can be applied to liquid sloshing in two-dimensional, rectangular, smooth and open tanks which are forced to oscillate harmonically with small amplitude of sway or roll motion.

,ý_

In 1978, Faltinsen[10] proposed a new calculation procedure for the simulation of sloshing problem. It is characterized by the need to solve numerically a boundary integral equation at each time step. The free surface, where the exact non- linear kinematic condition is satisfied, is updated by following the movement of certain marked points in time. To simulate the effect` of viscous damping, which is present in reality, but not included in the potential-theory model, an artificial damping

4 term is introduced. This method is able to predict sloshing under forced irregular oscillation of any mode. It may also be applied to nearly any tank with two-dimensional flow.

Two-phase, flow theory

Ramshaw and-Trapp[21] devised a numerical procedure which can be >used for the computation of liquid sloshing in -tank.

Their ,:, method' is closely related to the -. Chorin-Hirt modification of the MAC method for incompressible flow[11]. It solves for a set of equations governing the transient flow of a- -homogeneous two-phase (gas-liquid) fluid at small Reynolds numbers. The free surface is represented as the phase interface- and is resolved by using a modified donor-acceptor finite-differencing technique for computing mass transport. The donor-acceptor technique was chosen - in view of the j act that, in the presence of large gradients of field variables, which is effectively the case in sloshing flows, inaccurate results occur in Eulerian flow calculations because of excessive numerical diffusion or smearing. The disadvantage of the donor-acceptor technique is that, unlike the other interface techniques, it does not resolve the free surface in detail within a computational cell. The numerical method was applied to a test problem consisting of a two- dimensional rectangular tank, which is half-filled with water, 'in the right-hand side and half-filled with steam in the left-hand side. The solution showed the qualitative sloshing behaviour which would be expected intuitively.

5 GALA method

With the aid of the GALA method[22], Maxwell[13] employed the particle-tracking technique to give an example of simulation of non-linear sloshing flow. The problem consists of a rectangular container with an open top and -partially filled 'with water, ' which is suddenly decelerated from a constant speed to standstill. The results show qualitative agreement with the expectations.

SOLA-VOF method

The SOLA-VOF method of Hirt and Nichols[12] was applied to the sloshing analysis by Bridges[8], who considered a two-dimensional rectangular tank with internal structure, oscillated harmonically. The mathematical model provides a transient solution of the flow by progressing in small time steps. For each of these time steps, an interative finite- difference procedure updates the velocity and pressure field so that they satisfy the conservation of momentum and conservation of mass equations and also satisfy all the boundary conditions which describe the tank and its motion. The free surface is defined by computing the evolution of a fractional volume of fluid F, of which the value is unity in any cell occupied by fluid and zero otherwise. Cells with F value between zero and one must then contain a free surface.

6 Partom[20] recently extended the VOF method to Lcalculate three-dimensional liquid sloshing that occurs in a moving cylindrical - container.

SOLA-SURF. method

Navickas et al[17] adopted the SOLA-SURF variation of the MAC -,method[25] ýto model sloshing flow in a two-dimensional prismatic tank' with ceiling. The liquid compressibility during impact on the ceiling is modelled by the inclusion in the incompressible continuity equation of a term describing small changes of density. In order to avoid the unrealistic pressure jumps due to -the discontinuous nature of time stepping, the buffering ' scheme[18], which progressively increases the pressure in cell where the liquid is about to impact the 'tank ceiling, has been used. This pressure increase has the effect of slowing the upward speed of the free surface until at the moment-of impact this speed is zero.

Mikelis et -al[14,15], in their studies of sloshing flows, made considerable extensions to the work of Navickas et al. These include:

(a) The, sloping boundaries are modelled by rectangular steps of the grid. The programme, which embodies the basic mathematical model, has been modified to take due care with respect to the formulation of boundary condition, in -order that any external boundary and internal structure

7 of, thin section can - be adequately and readily, represented. (b) The free-surface boundary conditions are improved to enable. the treatment of steep free surfaces and of free surfaces , in the vicinity of vertical. internal structure.

(c) The tank motion, is generalized to allow any oscillation -composed of two translational and. one rotational

motions. ý The -rotation is defined taboiat any specified ,*origin 'and the local inertial forces change with "position from the roll centre according to the usual moving frame relations.

(d) -The calculation. of slosh-induced forces and moments is based on a technique for extrapolating pressure from the centre of' the cell, where it ' is computed, to the boundary of the tank, where it is measured. The resulting pressure distribution along the tank boundary is used to obtain, by way of integration, the forces and moments.

Review of, experimental studies

In 1980, Bass et al[2] conducted a review of scale-model sloshing data. A wide range of tank geometries, oscillation modes and liquid filling depths was covered in the study. Experimental measurements of pressures and total forces were summarized °and discussed: {°

An experiment performed by - Verhagen and van Wijngaarden

8 [24] consisted of a rectangular tank, filled with water, which was forced- to- oscillate about a horizontal axis coinciding with the bottom of the tank. Three different kinds of measurements were made including: (1) at a chosen oscillation amplitude and frequency, the height of free surface wash measured at four different locations; (2) at a fixed height free .-location, the of surface was measured for various values of oscillation amplitude and frequency; (3) ýthe moment about the centre of rotation exerted by the liquid was measured as -a function of frequency for several values, of oscillation amplitude.

Olsen[19] made measurements of pressure and height of free surface in his- experiment on liquid sloshing for two rectangular -tank shapes. The effects of the ratios of water depth to tank breadth, the amplitudes and frequencies of oscillation and the oscillation modes were investigated.

Nagamoto et al[16] reported experimental measurements of pressure-time histories for sloshing in a nearly full prismatic " tank. The experiments were carried out under various-values of liquid fill ratio (90-98%), kinds of-tank motion (pitch, roll, surge and sway) and modes of oscillation (regular and, irregular).

The experimental results of pressure and height of free surface in aprismatic tank were reported by Mikelis et al[14]. The tank- was forced to oscillate in roll, in pitch and in

9 rotation . about,, an -, axis ° along -- the tank diagonal. - The experiments considered- the effects of filling depth, of amplitude and of frequency of harmonic motion.

Van t den Bosch and ýVughts[24] - carried - out a parametric experimental. study on a rectangular tank at low filling levels. In their experiment, the measured moment exerted by liquid was Fourier analysed and the amplitude of the first harmonic component of the moment was 'reported-along with its phase angle with respect to the forced motion. Experimental moments -for the prismatic tank are available, in- [14].

(2) "EXPERIMENTAL AND COMPUTATIONAL RESULTS IN

; ,' ADDITION TO THOSE PRESENTED IN CHAPTER-Q,

Introduction

Experimental results for the height of free surface and the periods of oscillation are presented. The predictions of these two physical parameters are compared with the experimental measurements. Additional computational results showing the variations of pressures with time are also presented.

Obtaining of results

The experimental results were obtained from direct reading of motion pictures which record the evolution of the free

10 surface inside the tank. A Cartesian grid drawn on the back of the tank facilitated the measurements.

The computational results were obtained from a re-run of the calculation which had previously been performed in Chapter 6.

Discussion

Heights of free surface versus time ,. ",. f, Results by the numerical method and the experimental study are compared in Figures A. 1 and A. 2 for the heights of free surface against time. The agreement is generally good. Some small discrepancies, however, are observed of computation and experiment. This may be due to the assumption of a uniform angular velocity at the initial stage of the experiment.

Periods of 'oscillation

Results by the numerical method and the experimental study for the periods of' oscillation are compared in Table A. 1. The definition of the period is shown on Figures A. 1 and A. 2. It is clear that the results show a satisfactory agreement.

11 Table A. 1 Periods of oscillation(run 2) Periods Right Left (sec) pret. expt. pret. expt. 1 0.835 0,840 0,83Q 0.820 _ _ 2 0.675 0.665 0.690 0.700 3 0.650 0.660 0.675 10.650

Pressure-time histories

No experimental measurements of pressure were made. The results as given in Figures A. 3 and A. 4 are computed pressure -time histories.

H (m) 0.2

0.18

0.16

0.14

0.12

0.1 0.08 0.06 0 0.5 1 1.5 2 2.5 3 t (sec) Figure A. 1 Height of free surface at the right-hand side wall as a function of time

12 a

H (m) 0.22 T 0 o experiment . 0.2- --. --" prediction 0.18-

0.16-

0.14-

0.12 ýý 0.1 0 0.5 1 1.5 2 2.5 3 t (sec) Figure A.2 Height of free surface at the left-hand side wall as a function of time

y4, ,

P (Pa) "too l 1000 900 A 800 A 700 600 Poll 500 400 300 ýº 200 tin 0, 0.5 1 1.5 2 2.5 3 w,. t (sec) Figure A.3 Computed pressure-time history at left well, 91.2 mm awau from the tank bottom

13 P (Pa) 1400 tsý 1300 1200-- 1100.. 1000 900 800 700 f 600 500 0 0.5 1 1.5 2 2.5 3 t (sec) a, Figure A.4 Computed pressure-time history at right wall, 14.4 mm away from the tank bottom

(3) CALCULATION OF LIQUID SLOSHING IN A PRISMATIC TANK DUE TO ROLLING

Introduction

The computational and experimental results of Mikelis et al [14] for liquid sloshing in a prismatic tank are compared with predictions by the present method.

The problem ...

When a tank containing liquid is forced to oscillate at certain amplitude about a fixed horizontal axis (Figure A. 5), gravity

14 waves appear on the surface of the liquid. Let the origin of the frame of reference be attached to the tank so that the coordinate system is stationary relative to the tank; then the motion of-liquid is described by:

aulax+av/ay=o (A.1ý

apu/at+apu2/ax+apuv/ay+2pccv=-ap/ax+p(02(x-X)+gx)

-pyaS2/at+ga2u/ax2+a2u/ay2) (A. 2)

apv/at+apuv/ax+apv2/ay-2pccu=-ap/ay+p(c22(y-Y)+gy)

+pxai2/at+µ(a2v/ax2+a2v/ay2) (A. 3)

ý= (Dsin(aut-n/2), Q= DO/at,co = 2n/T. (A. 4)

gX = gsin4, gy = -gcose. (A. 5)

X=370.5 mm, Y= 194 mm. (A. 6)

where angular displacement in roll.

S2: angular velocity.

b: amplitude of oscillation.

co: frequency of oscillation. T: period of oscillation. g: gravitational, force.

It is noted that a shift has been allowed in time by introducing an additional phase n/2 in the motion of the tank.

15 g wý a. t ýa e

101 8o iýýop- 21 ý, height 220ýý' record (2) 94

ýý 95

Figure A. 5. Tank geometry: dimension in mm, locations of pressure transducers and wave height recorder

Computational details

Initial conditions

" The x and y components of velocity and the pressure are all zero.

" The value of the scalar for defining the free surface is unity in the region occupied by liquid. It is zero in the remaining space.

" The mean water depth is 247.05 mm.

16 Boundary conditions

The: x and y components of velocity are both zero -at the 4 wall.

" : The gradient of the scalar along the normal to the wall is zero.

"A reference pressure of zero Pa is set so as to define a unique pressure field for the solution.

" The chamfers of the tank are modelled by rectangular steps of the grid. This is completed in PHOENICS rby the setting of the corresponding blockage factors to zero for the cells inaccessible to the liquid. The wall friction on the velocity components that are parallel to the faces of the blocked cell is automatically activated.

Tank motion

The. motion of the tank is described by:

A4=(Dsin(2nt/T-7c/2) (A. 7)

in which 1 is equal to 0.1 (rad) and T is equal to 1.112 (sec).

17 Grid size

Mikelis et al employed a grid of 13, by 19 uniform* cells for their computation. The same grid is chosen for the present computation.

Time step

A time step equal to 0.01112 (sec) is applied. The reasons for the ýuse of this value are twofold:

0 to, satisfy the Courant condition, and ,.

" to make the time step a hundredth of oscillation period.

Results

The results, from computation and - experiment are shown in Figures, A. 6, A. 7 and A. 8 for the heights of free surface and the magnitudes' of pressure. Experimental measurements and numerical, results are intentionally offset in the time scale to allow easy visual comparison.

Heights of free surface versus time

18 Results by the present numerical method are compared with the computational and experimental results of Mikelis et al in Figure A. 6 for the heights of free surface. It shows a general agreement, although the heights seem to be underestimated by the present method.

Pressure-time histories

Results by the present numerical method and the computation and experiment of Mikelis et al are compared in Figures A. 7 and A. 8 for the magnitudes of pressure. There are some differences. The method of Mikelis et al has, to judge from the diagrams presented in reference [14], depicted the peaks in the magnitudes of pressure, while they are missed by the present calculation. One possible reason for this discrepancy is that the pressure-time history as given by Mikelis et al is based on a technique for extrapolating pressure from the centre of the cell, where it is computed, to the boundary of the tank, where it is measured. No such practice, however, has been used in presenting the current results, so the pressure values are at the, centre of the cell which is adjacent to the wall of tank.

19 H (m)

0,34 0,28

Of22 0,16

0,10 tI . 7GL/

Figure A. 6 Computed and experimental height of free surface as a function of time " present prediction thick line prediction by Mikelis et al thin line experiment

20 P (Pa) f---Time 3000 --j offset

2400

1800

1200

600

ºr 0246 8 t(sec) Figure A.7 Computed and experimental pressure as a function of time at (1) " present prediction thick line prediction by Mikelis et al thin line experiment

P (Pa) 3000: 2400- 1800 1200 600 0.

Figure A. 8 Computed and experimental pressure as a function of time at (2) " present prediction thick line prediction by Mikelis et al thin line experiment 21 ý°ºý. "., (4) CHOICE OF GRID SIZE AND TIME STEP

Numerical methods obtain approximations to the solutions of differential equations; and in order that these may be close approximations, the number of grid nodes and-the size of time step should be such that any further increase in the former and decrease in the latter effect only insignificant changes in the values of the important predicted quantities.

There is only one reliable way to determine how large these two, numerical parameters should be. This is to increase the number' of . grid nodes and to decrease the size of time step gradually, in successive repetitions of what is otherwise the same calculation, - until the important quantities do not change significantly.

Prediction ` of experiment (Chapter 6)

Choice of grid size

The reason' why a 'grid of 30x32 cells was employed for the computation presented in Chapter 6 has already been explained in' Page 103. The results presented are not totally grid-independent, in particular in the shape of free surface near walls. Further' improvements on the results may be gained by refining the grid in the vicinity of walls.

22 t , +ý II

Choice of time step

The dependence- of numerical results on time step was investigated in combination with grid size (Figure 6.2). Three different grids consisting of 20x22,30x32 and 36x38 cells were used to cover the domain of interest.. The time step for each calculation was chosen so as to satisfy the Courant condition. Table A. 2 gives a summary of the values used.

Table A. 2 Time step values

NXx W time step(sec) run 2 run 5 20><22, 0.0075 0.0050 30x32 0.0050 0.0025 36x38 0.0035 0.0015

It is not claimed that the present time step produced results which are free of numerical errors, but it sufficed to resolve the phenomenon of interest.

Collapse of a liquid column (Chapter 7)

Choice of grid size

The effect of grid refinement on the height of water column and the position of wave front has been shown in Figure 7.2.

23 An inspection of this figure reveals that, for the most part of the' computation, results from a grid of 22x40 cells are very close to those from a grid of 44x40 cells. The differences observed of the two solutions, after time T=1.8, are due to the fact that the coarser grid is inadequate for resolving the thin water leading edge which now occupies only a few rows of cells from the bottom of the channel.

Choice of time step

The choice of the time step for this problem was made to satisfy the Courant condition:

max(0.1 U, 0.1 V) S1 (A. 8) where U and V are the maximum u and v in the flow field at every time step.

It is known from the calculation (Figure 7.5) that approximately 2 seconds is needed for the liquid to flow from left to right. Since the length of the channel is 3 metres, this implies an average wave advancing speed of about 1.5 m/s, thereby producing a Courant number far less than unity. Any further decrease in time step, therefore, is effectively made only in association with increase in the number of grid nodes. i

Drainage of a cylindrical tank (Chapter 81

24 Choice of grid, size

No -systematic study 'on grid-independence was performed, for this-('calculation. A more complete analysis of the problem, however, should involve the exploration of grid-size effect.

Choice= of time step -,

Once the number of grid nodes was chosen, the time step was determined to satisfy the Courant condition. ° ý- r.

(5) THE NATURE OF THE FLOW IN EXPERIMENT

I

The magnitude of the Reynolds number determines the nature of the flow 1n the experiment. Since no experimental measurements of velocity were made, the Reynolds number is estimated based on the computed velocity parallel to the wall, the distance from the wall to the grid node and the kinematic viscosity of water. A value of approximately 1000 was found to be the upper limit throughout the computation.

The present author does not know whether the above Reynolds number is within the turbulence range for this particular problem, and the calculation was made for viscous fluid by the presence of the laminar viscosity term in the Navier- Stokes equation. Computations, however, had been performed by, Mikelis et al[14] to examine the effect that viscosity

25 might have on sloshing and it was found to be negligible. It is also noted that experimental works using test liquids of widely different viscosities were reported[2,3] where viscosity was found to have only a minor effect on the large amplitude sloshing.

(6) SCALING LAWS RELATING SMALL-SCALE MODEL TO

-FULL-SCALE PROTOTYPE

To - determine, the behaviour of a full-scale prototype using small-scale model, a strict dynamic similarity between model- and prototype is required. ° When a free surface is present in the flow, one must match both Reynolds number and Froude number:

LmVm/vm = LPVp/vp (A. 9)

V Lm VPNg LP (A. 10) MNg' =

Eliminating thevelocity ratio gives the geometrical scale factor:.

Lm/Lp = (vm/vp) (A. 11)

The impossibility of having a scale factor other than unity when the same fluid is used can be seen from the above equation. if the viscous force is small compared with the

26 gravity force, which is often the case in sloshing flow, Froude-number matching becomes the primary criterion for dynamic ýsimilarity. This indicates that a smaller velocity for the model than the prototype is required.

Some other problems arise when using small-scale model to predict the performance of full-scale prototype. It may happen-that forces having negligible effect on the prototype, for example surface tension; do affect on the behaviour of the model. The roughness of the surface of solid boundaries frequently gives rise to problem of a similar kind. Even more serious is a discrepancy of Reynolds number whereby laminar flow exists in the model system although the flow in the full- scale prototype is turbulent. These effects are minimized by using models which do not differ in size from the prototypes more than -necessary.

(7) REFERENCES

1. Bass RL (1975)

'Dynamic Slosh Induced Loads on Liquid Cargo Tank Bulkheads'

The Society of Naval Architects and Marine Engineers, Report R-19.

2. Bass R L, Bowles EB& Cox PA (1980) 'Liquid Dynamic Loads in LNG Cargo Tanks' Trans. SNAME 88: 103-126.

27 3. Bass R L, Bowles E B, Trudell R W, Navickas J, Peck J C,

Yoshimura N, Endo S and Pots BFM (1983) 'Modelling Criteria for Scaled LNG Sloshing Experiment ASME, June 1983.

4. Blixell CA (1972)

'Calculation of Wall Pressures in a Smooth Rectangular Tank due to Movement of Liquids' Lloyd's Register R. & T. A. S. Report No. 5108.

5. Blixell CA (1974)

'Results of Model Sloshing Experiments for Two Rectangular Tanks with Internal Bottom Stiffening' Lloyd's Register, Dev. Unit Report No. 49.

6. Blixell CA (1974)

'Results of Model Sloshing Experiments for Two Bulk-Carrier Shaped Tanks due to Rolling' Lloyd's Register, Dev. Unit Report No. 50.

7. Bowles E B, Bass RL& Cox PA (1978)

'Evaluation of Near Full Sloshing Loads and Structural Response in El Paso Marine Company's 125,000 m3 LNG Ship Tanks' Technical Report No.2, El Paso Marine Co. Southwell Research Institute.

28 8. Bridges TJ (1981)

'A Numerical Simulation of Large Amplitude Sloshing' 3rd Int. Congress on Num. Hydrodyn., Paris.

9. Faltinsen 0M (1974)

'A Nonlinear Theory of Sloshing in Rectangular Tanks' J: Ship Research 18: 224-241.

10. Faltinsen 0M (1978)

'A Numerical Nonlinear Method of Sloshing in Tanks with Two-Dimensional Flow' J. Ship Research 22: 193-202.

11. Hirt CW& Cook JL (1972)

'Calculating Three-Dimensional Flows around, ' Structures and over Rough Terrain' J. Compt. Phys. 10: 324-340.

12. Hirt CW& Nichols BD (1981)

'Volume of Fluid (VOF) Method for the Dynamics of Free Boundaries' J. Compt. Phys. 39: 201-225.

13. Maxwell TT (1977).

'Numerical Modelling of Free-Surface Flows' Ph. D Thesis, University of London.

29 } 14. Mikelis N E, Miller JK& Taylor KV (1984)

'Sloshing in Partially Filled Liquid Tanks and its Effect on Ship Motions: Numerical Simulation and Experimental Verification'

Paper No. 7, Spring Meetings, The Royal Institution of Naval Architects.

15. Mikelis NE& Robinson DW (1985) 'Sloshing in Arbitrary Shaped Tanks'

J. Society of Naval Architects of Japan 158: 277-286.

16. Nagamoto R, Hagiwara K, Hori T, Kawamura A,

Tateishi M and Morio T (???? ) 'On Sloshing Force of Rectangular Tank Type LNG I Carrier' The Spring Meeting of the Society of Naval Architects of Japan, 157-163. .

17. Navickas J, Peck J C, Bass R L, Bowles E B, Yoshimura N, &EndoS(1981)

'Sloshing of Fluids at High-Fill Levels in Closed Tanks' ASME Winter Meeting, Washington D.C. 191-198.

18. Nichols BD& Hirt CW (1978)

'Numerical Simulationof HydrodynamicImpact Loads on Cylinders'

Nuclear Science and Engineering 68: 143-148.

30 19. Olsen H (1970)

'Unpublished Model Experiments at the Delft University The Netherlands. of Technology, Delft, --

20. Partom IS (1987) 'Application of the VOF Method to the Sloshing of a Fluid in a Partially Filled Cylindrical Container' Int. J. Num. Methods in Fluids, 7: 535-550.

21. Ramshaw JD& Trapp JA (1976) 'A Numerical Technique for Low-Speed Homogeneous

Two-Phase Flow with Sharp Interfaces' J. Compt. Phys. 21: 438-453.

22. Spalding DB (1974) 'A Method for Computing Steady and Unsteady Flows Possessing Discontinuities of Density' CHAM Report 910/2.

23. Van den Bosch JJ& Vughts JH (1966) 'Roll Damping by Free Surface Tanks' Netherlands Ship Research Centre, Shipbuilding Dept., Report No. 835.

24. Verhagen JHG& van Wijngaarden L (1965) 'Non-linear Oscillations of Fluid in a Container' J. Fluid Mech. 22: 737-751.

31 25. Welch J E, Harlow F H, Shannon JP& Daly BJ (1965) 'The MAC Method, a Computing Technique for Solving Viscous, Incompressible, Transient Fluif-Flow Problems Involving Free Surfaces' Los Alamos Scientific Laboratory Report LA-3425.

32