• Tidak ada hasil yang ditemukan

Directory UMM :Data Elmu:jurnal:A:Advances In Water Resources:Vol23.Issue6.2000:

N/A
N/A
Protected

Academic year: 2017

Membagikan "Directory UMM :Data Elmu:jurnal:A:Advances In Water Resources:Vol23.Issue6.2000:"

Copied!
7
0
0

Teks penuh

(1)

A multiple grid algorithm for one-dimensional transient open channel

¯ows

Scott A. Yost

*

, Prasada Rao

Department of Civil Engineering, The University of Kentucky, 161 Raymond Building, Lexington, KY 40506-0281, USA

Received 22 November 1998; accepted 14 November 1999

Abstract

Numerical modeling of open channel ¯ows with shocks using explicit ®nite di€erence schemes is constrained by the choice of time step, which is limited by the CFL stability criteria. To overcome this limitation, in this work we introduce the application of a multiple grid algorithm to the ®eld of computational hydraulics. By coupling this algorithm to a second-order accurate MacCor-mack scheme, we demonstrate that the solution can be accelerated to the desired transient state. The present formulation has been tested to simulate shocks arising from sudden closure of a sluice gate and for ¯ows accompanied with a hydraulic jump. The close agreement between the obtained results and the theoretical ®ndings indicates the reliability of the proposed algorithm. Ó 2000

Elsevier Science Ltd. All rights reserved.

Keywords:Finite di€erence; Explicit; Transient; Shocks; Open channels

1. Introduction

Modeling ¯ow in open channels has drawn the at-tention of many researchers in the ®eld of hydraulic engineering. As the ¯ow is often accompanied by shock waves, formulating a reliable numerical scheme has al-ways been a challenging task for the modeling commu-nity. To this end, the family of ®nite di€erence schemes, owing to their ease of formulation, has found wide ap-plication. Based on the accuracy of the solution, the explicit ®nite di€erence schemes can be classi®ed as ei-ther ®rst-order accurate or higher-order (P2) accurate.

For ¯ows with shocks, it has been well demonstrated in the literature that the solution obtained by the second and higher-order explicit schemes, although handi-capped by the presence of oscillations in the vicinity of the shock front, is much superior to the one obtained by ®rst-order schemes. A comprehensive review of various ®nite di€erence schemes can be found in the works of Hirsch [1] and Chaudhry [2].

A characteristic feature of all the explicit schemes is the choice of time step. From the stability perspective, the magnitude of time step is limited by the CFL

sta-bility condition [2]. For simulations over large time periods, explicit codes using a small time step require extra computational resources and additional compu-tational time. Our motivation in doing this work is in formulating an algorithm, which when coupled to any ®nite di€erence scheme, accelerates the solution to the desired time period. The ideal properties that this al-gorithm needs to possess include (i) it should not a€ect the accuracy of the solution, (ii) it should accelerate the solution to the desired transient period, and (iii) its formulation should be independent of the ®nite di€er-ence discretization. It is in this direction that multiple grid methods look promising.

Multiple grid methods are numerical tools for accel-erating the solution to the desired transient state. As they are independent of the discretization approach used for solving the ¯ow equations, their application is quickly gaining momentum in many engineering ®elds. To visualize the philosophy behind a multiple grid for-mulation, let us start the discussion by considering the standard approach for arriving at transient pro®les. In the standard and well-established approach, starting from the initial conditions (i.e., time ˆ0), the solution is marched with time until the desired time period is reached. Time marching is not accompanied by spatial marching. By spatial marching we mean solving the ¯ow equations more than once at any grid node. It is here

*

Corresponding author. Tel.: 4816; fax: +1-606-257-4404.

(2)

that the multiple grid approach varies. In a multiple grid formulation, time marching is accompanied by spatial marching. At any time level, the solution is marched over progressively di€erent grid levels (also referred to as coarse grids), until the coarsest grid is reached. As discussed during the course of this document, by spatial marching we ensure that the ¯ow disturbance propa-gates to more than one node with a reduced computa-tional e€ort. A review of the literature indicates that the application of multiple grid techniques has been mainly con®ned to problems requiring steady-state pro®les. Our work di€ers from all the previously reported multiple grid studies in that we formulate a multiple grid for-mulation for simulating transient ¯ows. This focus is consistent with most free surface ¯ow simulations of real life ¯ows, which are by nature transient. Examples in-clude bores resulting from operating control gates at power plant, rapid release of water from reservoirs and spiked reservoir hydrographs.

As multiple grid methods for hyperbolic equations are in their infancy, we hope this work will provide more insights into their robustness. To test the eciency of the formulated multiple grid technique, we tested it for the most critical ¯ow combinations, ¯ows containing moving shock fronts. The ®nite di€erence MacCormack scheme was used as the basic numerical scheme for solving the ¯ow equations given in Section 2. Sections 3 and 4 are devoted to the numerical scheme and the stability condition. In Section 5, the multiple grid strategy, its relation to the physics of the problem and di€erent implementation details are discussed. The re-sults of the present methodology for the two represen-tative ¯ow cases are presented in Section 6.

2. Governing equations

For a horizontal rectangular channel, the basic gov-erning equations based on the continuity and momen-tum principles can be written in conservation form as [2]

oh

In the above equationshis the ¯ow depth,qthe speci®c discharge, g the acceleration due to gravity, S0 the bottom bed slope of the channel, andSf is the frictional slope, computed using ManningÕs equation

Sf ˆ

m2u uj j

R4=3 : …3†

Heremis ManningÕs roughness coecient,u the depth averaged velocity andRis the hydraulics radius.

3. Numerical scheme

In the present investigation we selected the Mac-Cormack scheme to numerically solve Eqs. (1) and (2). As the application of MacCormack scheme to open channel ¯ows is well documented [2], we brie¯y describe it to maintain continuity in the text. Starting from the initial time level (n), the solution at the new time level

…n‡1† is obtained using a predictor and corrector approach.

As per this, the ¯ow equations in discretized form at any nodeican be written as

Predictor step:

The ¯ow variables at the new time are then computed as

(3)

The solution obtained by Eqs. (10) and (11) is free from numerical oscillations. The smoothing mechanism, as can be seen by Eq. (12), is triggered only in oscillatory regions. For regions where the ¯ow is uniform, the nu-merator in Eq. (12) goes to zero, leaving the solution computed using Eqs. (8) and (9) unaltered. The pa-rameter l in Eq. (13) is known as dissipation constant which controls the degree of smoothing. Based on trial and error, in this work we have selected its value to be 0.6.

4. CFL stability condition

A characteristic feature of the explicit schemes is the choice of time step, which is governed from the stability criteria. The magnitude of time step, given by the well-known CFL stability condition [5], can be written as

DtˆCn D

x

max…j j ‡u 

gh

p

†; …14†

whereCnis the Courant number (61) andDxis the grid

spacing. With known grid spacing and ¯ow variables, the time step can be computed using Eq. (14). Physi-cally, Eq. (14) ensures that the numerical domain of disturbance should be at least equivalent to its corre-sponding physical domain.

5. Multiple grid algorithm

In the literature, the reader often ®nds the terms multigrid and multiple grid used interchangeable. However, there exists a fundamental di€erence between these two methods, which is detailed here. Multigrid methods have drawn the attention of many researchers since Brandt [6] initially proposed them. The objective of using a multigrid technique is in accelerating the con-vergence of the solution. In the standard multigrid ap-plications (explained later) the residual error

…rˆBÿAX† from the ®ne grid levels is transferred to the progressive coarser levels. Computing the residual error is possible when a system of equations is solved simultaneously, as in implicit formulations where the linearized equations are written in matrix notation,

AxˆB. The formulation and associated applications relating to multigrid techniques can be found in the works of McCormick [7] and Wesseling [8].

Since explicit ®nite di€erence formulations directly compute the ¯ow variables at the new time level from the known initial conditions, implementing a standard multigrid formulation turns out to be cumbersome. Ni [9] circumvented this problem by directly passing the approximate solution of the equations (rather than the residual error) to the coarser levels. This gave rise to the term multiple grid. Multiple grid techniques, by and

large, are credited to the initial work of Ni [9]. As mentioned previously, in a multiple grid formulation, at a ®xed time period the solution is computed at di€erent grid levels (i.e., it is marched with space). Starting from the ®ne grids (spacing of Dx), the coarse grids can be obtained by skipping the alternate ®ne grid nodes. Fig. 1 pictorially represents the grid levels along with the cor-responding nodal spacings. The notations ÔfgÕ, ÔcgÕ and

ÔmgÕrepresent ®ne grid, coarse grid and multigrid levels, respectively, where the grid spacing increases by a factor of 2 between each grid level. The ®nite di€erence for-mulation dictates that the wave front advances one grid node at the end of one computation (one computation implies applying Eqs. (8) and (9) at all the interior nodes coupled with the associated boundary conditions). In terms of wave propagation, advancing one node on the

ÔcgÕ level corresponds to 2 nodes on the ÔfgÕ level. Advancing one node on the ÔmgÕlevel corresponds to 4 nodes on the ÔfgÕ level. Since the computational algo-rithm is advanced sequentially (in space) fromÔfgÕtoÔcgÕ levels, at the end of one complete iteration the wave front has advanced over 4 ®ne grid nodes. In the present work, we used a one-to-one mapping when prolongating the ¯ow variables from coarser to ®ner levels. This one-to-one prolongation mechanism is indicated by the ar-rows in Fig. 1. Formally the whole procedure can be written as

(i) With the given initial conditions and computa-tional domain, compute the time step using Eq. (14). (ii) At this new time level, apply Eqs. (4)±(11) to compute the values of ¯ow variables at all the inte-rior grid nodes (ÔfgÕ level, spacing of Dx). Apply appropriate boundary conditions at the end nodes. (iii) Transfer the problem onto the next coarser level (i.e.,ÔcgÕorÔmgÕlevels). Compute the time step with the new grid spacing (i.e., 2Dxor 4Dx)

(iv) Apply Eqs. (4)±(11) to compute the values of ¯ow variables at the coarse grid nodes with the mod-i®ed time step, and spacing.

(v) Repeat steps (iii) and (iv) until the coarsest grid is reached.

(vi) Reassign all the computed ¯ow variables as ini-tial conditions for the next time step; compute the time step using Eq. (14) and go to step (ii).

The above-mentioned discussion is valid for both tran-sient and steady-state ¯ows. Viewing it from a trantran-sient perspective, Fig. 1 indicates that instead of advancing over one grid node, the wave front has advanced over 4

(4)

grid nodes at the end of one iteration with time (one iteration is de®ned as one computation at every grid level, i.e. steps (i)±(v)). Had only theÔfgÕlevel been used in the solution, advancing the solution over 4 ®ne grid nodes would have required 4 time steps. Extending this discussion to the end of the second iteration, the wave front advances 8 grid nodes, which conceptually would only have been 2 ®ne grid nodes had the solution not been transferred to any coarser grid levels. This indicates that at the end of every iteration the wave advances spatially by an additional 4 nodes.

Correlating the increased spatial advance on theÔfgÕ

level to the period of simulation is a critical parameter in this investigation: say, if the transient solution at time periodtis required, and the time step obtained using the CFL condition (Eq. (14)) is Dt. With this information, one can conclude thatt/Dtsteps are required to arrive at this transient state. On the other hand, at theÔcgÕ level, since the grid spacing is doubled and hence the time step (noting that Eq. (14) indicates thatDtis proportional to

Dx),t/2Dtsteps are required. Extending this analogy to theÔmgÕlevel,t/4Dtsteps are required. It is this reduced number of steps, at higher grid levels, which aids in faster convergence of the solution to the desired tran-sient state The results of our investigation show that this approach is a reliable mechanism. Since the computa-tions at the higher grid levels are based on the nature of the ¯ow and the time step, which in turn is subject to the stability condition, any error introduced by this approach is minimal.

A critical aspect in the above formulation relates to the maximum coarse level that can be reached while ensuring no deterioration of the solution. To keep the truncation errors to a minimum (as the truncation error is proportional to grid spacing), it is ideal to start with a small ®ne grid spacing so that the corresponding coarse grid spacing does not pose computational diculties. As the solution is accompanied by numerical oscillations, the magnitude of damping constant should accommo-date the required amount of smoothing at all the grid levels. An insucient value ofl(Eq. (13)) can result in excessive oscillations, which can amplify with time.

The most important factor a€ecting the maximum coarse grid level that can be used is the accuracy of the solution (i.e., does the solution obtained using coarser grids resemble the solution obtained by using only ®ne grids?). Any computational saving could be lost if the solution deteriorates (i.e., smeared shock) between a ®ne grid and multiple grid computation. While reviewing the robustness of ®nite di€erence schemes, Woodward and Collela [10] noted that the length scale between nodes is an important factor for capturing shock fronts. For standard ®nite di€erence schemes, where the solution is computed only on the ÔfgÕ level, one can theoretically arrive at solutions with minimum smearing of the shock front by choosing the grid spacing,Dx, to be very small.

The straightforward use of this small grid spacing in-volves a trade o€ between computational time and ac-curacy. Since the present multiple grid formulation requires the solution to be marched with space, it is plausible for the solution to deteriorate marginally for formulations using very coarse grid levels. Quantifying the grid spacing at the coarsest level so as to keep the truncation errors to a minimum is not an easy task and can require extensive numerical runs. Our experience shows that for multiple grid formulations using up to the currentÔcgÕlevel (Fig. 1), not much ¯ow information is lost. The results in the next section con®rm the reli-ability of this multiple grid method in resolving the shock front consistent with the ®ne grid solution while gaining computational eciency using coarse grids.

6. Application

6.1. Case 1: surge waves

As ¯ows with surges and shocks are considered to be a critical test for code validation purposes, we have se-lected ¯ow scenarios that have distinct moving shock fronts. The ®rst test case relates to waves arising from a sudden closure of gate at the downstream end. The de®nition sketch of the problem is illustrated in Fig. 2. At time tˆ, the gate at the downstream end is

in-stantaneously closed, resulting in a regressive elevation wave propagating upstream. In the numerical simula-tion, the initial conditions correspond to a depth of 6 m, a unit discharge of 3.125 m2/s, a grid spacing (

Dx) of 5 m and a Courant number of 0.9. An important aspect in any numerical implementation is in specifying the proper boundary conditions. At the downstream end, a zero discharge is speci®ed, and the ¯ow depth is com-puted using the positive characteristic curve of Eqs. (1) and (2). This can be written as [2]

To compare the computed values with the analytical solution, the channel is assumed to be smooth (i.e., roughness coecientˆ0). The analytical solution can be obtained by solving the following equations [11,12]

(5)

h1ˆ ÿ

h0u0

c ‡h0; …16†

cˆ ÿ



h0‡h1 … †gh1

2h0

s

‡u0 …17†

iteratively. For the given initial conditionsh0andu0, the analytical solution yields the depth of the surge,

h1ˆ8:66 m moving with a celerity, cˆ ÿ7:06 m/s. Of

interest is the transient pro®le att354 s, at which time the wave is at the midlength of the channel. Fig. 3 shows the numerical solution corresponding to this time period for di€erent grid levels. A ®ne grid spacing of 5 m and a Courant number of 0.9 were selected. The time step obtained on the ÔfgÕ level using Eq. (14) was 0.1389 s. This indicates that to arrive at the required transient period, 2548 steps are required. On the ÔcgÕ and ÔmgÕ

levels, the number of steps reduce to 1274 and 637, re-spectively. The close agreement between the three solu-tions indicates that no appreciable amount of information is lost in the process of coarsening the grid spacings and in prolongating the ¯ow variables back to the ®ne grid. The oscillation evident near the surge is a feature of the MacCormack scheme used and not related to the multiple grid procedure. We have selected a dis-sipation constant l value as 0.6. Though selecting a higher value would have helped the solution to be more smooth [4], investigating the optimal value is beyond the scope of this work. An alternative of using varying values ofl, depending on grid level, is a subject left for further investigation. The relative error

Pno:of nodes

iˆ1 …hexactÿhcalc†2

no:of nodes

!

based on the ÔfgÕ, ÔcgÕ and ÔmgÕ computations is 0.28%, 0.34% and 0.43%, respectively. The numbers in the

parenthesis in Fig. 3 relate to the required CPU time. As indicated the time required for arriving at this time pe-riod using theÔfgÕgrid level is around 78 s. On the other hand by using the ÔmgÕ level, the solution can be accel-erated to the same transient period in 46 s. All the runs were made on the HP Exemplar (http://spp.uky.edu). This computational saving, coupled with the small rel-ative error between the numerical and analytical pro-®les, indicates that the present multiple grid methodology can be used satisfactorily.

6.2. Case 2: Hydraulic jump

The second test problems relate to a hydraulic jump. A hydraulic jump is formed whenever the ¯ow changes from super-critical ¯ow …Fr>1† to sub-critical ¯ow …Fr<1†, where Fr represents the Froude number. The

de®nition sketch of the problem is shown in Fig. 4. The initial ¯ow conditions in the horizontal channel are a depth of 0.05 m and a velocity of 2.1 m/s. These ¯ow conditions give an upstream Froude number of 3.0. A Courant number of 0.8, a roughness coecient of 0.004, and a ®ne grid spacing of 0.3 m (i.e. the number of nodesˆ300) were used. As supercritical ¯ow has an upstream control, the ¯ow variables at the upstream node were kept equal to the initial conditions. At the down stream end a constant depth of 0.2 m was speci®ed

Fig. 3. Transient pro®le att354 s…Dxˆ5 m; Cnˆ0:9†: (a) normal view; (b) zoom view.

(6)

and held constant for all time levels. The ¯ow discharge at the downstream end was computed using the positive characteristic equation, which can be written as [2]

qni‡1ˆqniÿ1‡u‡pgh

n

iÿ1 h

n‡1

i

ÿ

ÿhniÿ1

ÿ…ghDtSf†niÿ1: …18†

Fig. 5 is the transient depth pro®le attˆ120 s, along with the required CPU, for various grid levels. The time step obtained using Eq. (14) was 0.1428 s, which gives the number of steps at theÔfgÕlevel as 840. On the Ôcg' andÔmgÕlevels the number of steps reduce by a factor of 2, to 420 and 210, respectively. As no experimental re-sults are available for these transient conditions, we used the solution obtained using ®ne grid as the benchmark solution. The close agreement between the shock pro®les using di€erent grid levels reinforces the conclusion

drawn from Fig. 3. Finally based on this result, the e€ect of the source term in the governing equations on the multiple grid formulation is minimal.

To study the e€ect of the Courant number on the resolution of shock, we re-ran the Fortran code by varying its magnitude. For Courant number of 0.4, Fig. 6(a) and (b) shows the transient pro®le. The trend of the results shown in Fig. 6(b) is similar to the one shown in Fig. 5(b). Hence, one can safely conclude that the e€ect of varying the Courant number on shock res-olution is minimal.

The e€ect of increased grid spacing on the shock front is shown in Fig. 7. A ®ne grid spacing of 1 m was used to generate this plot. The corresponding spacings on ÔcgÕ

and ÔmgÕ levels were 2 and 4 m, respectively. The plot indicates that the shock pro®le obtained using coarse grids is smeared over few grid nodes. This plot is

con-Fig. 5. Transient water surface pro®le for hydraulic jump…t120 s; Dxˆ0:3 m; Cnˆ0:8†: (a) normal view; (b) zoom view.

(7)

sistent with the observations made by Woodward and Collela [10], who note that for numerically arriving at high resolute shock pro®les, one needs to use a small grid spacing in numerical investigations. Note that this aspect of solution is absent in Figs. 5 and 6 wherein the ®ne grid spacing is 0.3 m. At this stage, we are not aware of any work that quanti®es the optimal grid spacing. Since the optimal grid spacing also depends on the initial and boundary conditions, a trial and error approach to arriving at its optimal value appears to be the only feasible approach. Once the spacing is ®nalized, one can march the solution with space, arriving at the pro®les indicated by Figs. 5 and 6, which we believe is accept-able to the modeling community. By choosing a grid spacing lower thanDx on the ÔfgÕ level, our experience shows that the solution with coarser levels is more accurate, as expected.

7. Conclusions

In this work, we introduced a multiple grid algorithm for one-dimensional open channel ¯ow equations. The algorithm that we discussed during the course of this document can be coupled to any explicit ®nite di€erence scheme for accelerating the solution to the desired time level. By iterating the solution over a series of grid levels, a multiple grid algorithm aids in faster propagation of ¯ow information. The advantages of using this algo-rithm have been numerically demonstrated by using it in conjunction with the widely used second-order accurate

MacCormack scheme. Its reliability has been demon-strated by simulating transient waves, which commonly occur in many real life open channel ¯ows.

References

[1] Hirsch C. Numerical computation of internal and external ¯ows, vol. 2. New York: Wiley, 1992.

[2] Chaudhry MH. Open-channel ¯ow. New York: Prentice-Hall, 1993.

[3] Godunov SK. Finite di€erence method for numerical computa-tion of discontinuous solucomputa-tions of the equacomputa-tions of ¯uid dynamics. Mat Sb 1959;47:271±306.

[4] Jameson A, Schmidt W, Turkel .Numerical solutions of the Euler equations by ®nite volume methods using Runga±Kutta time stepping schemes. In: AIAA 14th Fluid and Plasma Dynamics Conference. Palo Alto, CA, AIAA, 1981:81±1259.

[5] Courant R, Friedrichs K, Lewy H. Uber die partiellin di€erenz-engle-ichungen der mathematischen physik. Math Ann 1928;110:32±74.

[6] Brandt A. Multilevel adaptive solutions to boundary value problems. Math Comp 1977;31:333±90.

[7] McCormick SF. Multigrid methods. SIAM 1985.

[8] Wesseling P. An introduction to multigrid methods. New York: Wiley, 1992.

[9] Ni RH. A multigrid scheme for solving the Euler equations. AIAA 1992;20:1565±71.

[10] Woodward P, Collela P. The numerical simulation of two-dimensional ¯uid ¯ow with strong shocks. J Comput Phys 1984;54:115±31.

[11] Abbott MB. Computational hydraulics: elements of theory of free surface ¯ows. London: Pitman, 1979.

[12] Fennema RJ, Chaudhry MH. Explicit numerical schemes for unsteady free surface ¯ows with shocks. Water Resour Res 1986;22:1923±30.

Referensi

Dokumen terkait

Departemen Kesehatan RI Konseptual Framework Provincial Health Account (PHA), District Health Account (DHA) bersumber Pemerintah, Biro Keuangan Departemen Kesehatan RI,

Hasil Penelitian menunjukkan bahwa Pertumbuhan Tingkat Bunga, Tingkat Upah, Pengeluaran Pembangunan, Investasi, Pengeluaran Rutin, ICOR, dan Kesempatan Kerja secara

Menu grafis ini maksudnya terdapat tampilan yang lebih ditekankan untuk membuat sistem operasi yang user-friendly agar para pengguna lebih nyaman

Teknik ini dilakukan berdasarkan pertimbangan jika dibandingkan dengan teknik lain lebih efisien dan efektif, efisien yang dimaksud adalah mempertimbangkan karena

Dengan selesainya Sistem penjualan sepatu berbasis web ini, penulis memberikan.. beberapasaran yang dapat mendukung pengembangan sistem

Pada peristiwa anabolisme dalam hal ini fotosintesis pada salah satu tahapan proses fotosintesis diperlukan CO 2 dan dihasilkan O 2 secara berurutan proses-

(2) Dalam hal terjadi perubahan terhadap kelas jabatan dari para pemangku jabatan di lingkungan Kementerian Perhubungan sebagaimana dimaksud pada ayat (1), kelas jabatan

Lemahnya kemampuan siswa untuk berani bertanya dan mengeskplorasi gerak tari, percaya diri dalam mendemonstrasikan gerak tari, dan disiplin dalam melakukan gerak