COMPUTATIONAL HYDRAULICS IN IRREGULAR CHANNELS€¦ · 2 Introduction to User-Friendly Software...

274
COMPUTATIONAL HYDRAULICS IN IRREGULAR CHANNELS Theodore V. Hromadka II Mark H. Seits James M. Clements A Volume in Computational Methods in Engineering - A Lighthouse Publications Series of Texts, Monographs and Tracts

Transcript of COMPUTATIONAL HYDRAULICS IN IRREGULAR CHANNELS€¦ · 2 Introduction to User-Friendly Software...

  • COMPUTATIONAL HYDRAULICS IN

    IRREGULAR CHANNELS

    Theodore V. Hromadka II Mark H. Seits

    James M. Clements

    A Volume in Computational Methods in Engineering - A Lighthouse

    Publications Series of Texts, Monographs and Tracts

  • Computational Hydraulics in Irregular Channels

  • Computational Hydraulics in Irregular Channels

    Theodore V. Hromadka II, Ph.D., Ph.D., R.C.E.

    J\ssociate Professor California State University, Fullerton

    Fullerton, California

    Mark H. Seits, M.S., P.E.

    Civil and Hydraulics Engineer Williamson & Schmid

    Irvine, California

    James M. Clements, M.S. Systems Analyst

    Advanced Engineering Software Irvine, California

    Lighthouse Publications

    Mission Viejo, California

  • Copyright 1988

    Library of Congress catalog card number 88081083

    First Lighthouse Publications edition

    ISBN 0-914055-07-0

    This work Is subject to copyright. All tights Ine reserved, whether the whole or part of the material Is concerned, specifically those of translation, reprinting, re-use of illustrations, broadcasting, repro-duction by photocopying machine or similar means, and storage in data banks. The use of registered nantes, tradentarks etc. in this publication does not imply, even in the absence of a specific statement, that such names are e"empt from the relevant protective laws and regulations and therefore free for general use.

    NOTICE

    No patent liability is assumed with respect to the use of the Information contained herein. While every precaution has been taken in the preparation of this book, the publisher assumes no responsibility for errors or omissions. Neither is any liability assumed for damages resulting from the use of the information contained herein. Programs and information contained herein are of such complexity that they may have inherent' defects. Lighthouse Publi-cations does not guarantee the results of any information nor Is it liable for consequential damages resulting from any such defects.

    Prtnted In the United States of America

  • Table of Contents Chapter One

    Introduction to User Friendly Software ....................................... 1

    1.1. About the Book .................................................. 1 1.1.1. Included Software Codes ........................ , ............ 2 1.1.2. Review of Open Channel Flow Hydraulics .................. 2 1.1.3. Included ApplIcation Problems ................................ 2 1.1.4. "UserFrlendly" Guidelines ................................... 2 1.1.5. Computer Code Preliminaries ................................. 3

    1.2. Developing User-Friendly Computer Software ..................... 3 1.3. Data Entry Strategies ............................................ 5

    1.3.1. Interactive Computer Software ............................... 7 1.3.2. Screen Layout Strategy ....................................... 8

    1.4. Flow of User Data ................................................ 9 1.5. Screen Design Method ....... : .................................. 10 1.6. Subroutine Descriptions and listings ............................. 11

    1.6.1. SUBROUTINE eRINIT ..................................... 11 1.6.2. SUBROUTINE CURSOR ................................... 11 1.6.3. SUBROUTINE GElVAL .................................... 12 1.6.4. SUBROUTINE NUMCK. .................................... 13 1.6.5. SUBROUTINE ERROR ..................................... 14 1.6.6. SUBROUTINE CLEAN ..................................... 14 1.6.7. SUBROUTINE BELL ....................................... 15 i,U.S. SUBROUTINE CLRSCR .................................... 15 1.6.9. SUBROUTINE INFO ..... " ................................ 15 1.6.10. SUBROUTINE ALLOW .................................... 16

    ChapterTtDo

    Classification of Open Channel Flow .. ...................................... 17

    2.1. Definitions ...................................................... 17 2.2. Mannings' Equation ............................................. 18 2.3. Froude Number .......... , ...................................... 19

    Chapter Three

    Open Channel Flow . ...................................................... 20

    3.1. Introduction ..... , ............................................... 20 3.2. Conservation of Mass, Momentum, and Energy ................ 21

    3.2.1. Conservation of Mass ....................................... 21 3.2.2. Conservation of Momentum ................................. 22 3.2.3. Conservation of Energy .................... '" .............. 23

    3.3. Fundamentals of Hydraulics ..................................... 25 3.3.1. Hydraulic Grade line and Energy Grade Une ................ 25 3.3.2. Specific Energy ............................................. 25

  • 3.3.3. The Specific Force .......................................... 27 3.3.4. The Hydraulic Jump In a Rectangular Channel ............... 29

    3.4. Gradually Varied Flow ........................................... 30 3.4.1. 'S' Proftles ...................... " .......................... 30 3.4.2. 'M' Profiles ................................................. 31 3.4.3. 'C' Profiles .................................................. 31 3.4.4. The Standard Step Method .................................. 34

    Chapter Four

    Hydraulic Elements II. ..................................................... 36

    4.1. Introduction ..................................................... 36 4.2. PROGRAM 1. Irregular Channel Gradually Varied Flow Analysis. .... 36 4.3. PROGRAM 2. Irregular Channel Hydraulics ...................... 38 4.4. Computer Code ................................................. 39

    Chapter Five

    Example Problems ......................................................... 62

    5.1.1a. Profiles In a Transition: Flat Scope ............................ 63 5.1.lb. Effect of Additional Energy Balances .......................... 68 5.1.1e. Veribeation 01 Interpolation Results ....................... 70 5.1.2. Proiile. in a Transition: Steep Slope ............................ 71 5.1.3. Steep Channel 52 Profile In a Prismatic

    Channel: Sensitivity to Energy Balance Locations ............. 76 5.1.4. Supercritial and Subcrltical Profiles in Transition ............... 81 5.1.5. Profiles In a Transition: Variable Parameters .................. 107 5.1.60. PressurePI .... Momentum Analysis (in a Transition)

    Sensitivity to Energy Balance Discretization; Flat Slope .... 118 5.1.6b. Verification of Pressure-Plus-Momentum Analysis Results ..... 126 5.1.7. Pressure-Plu .. Momentum Analysis (In 0 Transition) Steep Slope ... 127 5.1.8. Hydraulic Jump Analysis: Flat Slope .......................... 135 5. L 9. Verification of Hydraulic Jump Analysis In a Prismatic Channel ... 140 5.1.10. Hydraulic Jump Analysis in a Prismatic Channel. ............ 148 5.1.11. Sensitivity to Cross-Sedion Detail: Water Surface Profiles

    in Pipeflow Analysis ....................................... 156 5.1.12. Multiple Cross-sections and Variable Parameters ............. 199 5.1.13. Multiple Channel Section flow Analysis ..................... 208 l'i.1.14. Sensitivity of Modeling Results to Overbank flow ....... 232 5.1.15. Simple Approximation of Bridge Effects (With and

    Without a Sudden Constriction) ............................ 243 5.2.1. Irregular Channel Hydraulics for Normal Depth Flow .......... 261

    Software Purchase In/ormation ............................................ 268

  • Chapter One

    Introduction to User-Friendly Software

    1.1. About the Book

    With the recent advances in microcollPlter capabilities, the use of computer software to solve problems in water resources engineering has increased severalfold. The potential benefits available in the use of computers to solve water resources problems is especially fruitful in the speCialized field of open channel flow hydraulics.

    The design of land development projects, flood control systems, and water supply or irrigation systems all involve a significant computational effort in the sizing and evaluation of structures to carry the flow of water. Therefore, the use ot computer software to solve the most frequently occurring problems will reduce design time expenditure costs and possibly projec' construction costs due to a more finely tuned design product.

    1

  • 2 Introduction to User-Friendly Software

    1.1.1. Included Software Codes

    Presented in this book are several FORTRAN computer programs for sol ving open channel flow hydraulics problems invol ving steady flow in irregularly shaped channel sections. Specific program capabilities are summarized in Chapter 4 where the program input requirements are provided as well as the accompanying FORTRAN software executable code.

    1.1.2. Review of Open Channel Flow Hydraulics

    In order to provide an explanation of what each computer program is atterrpting to do, a brief review of the fundamentals of open channel flow hydraulics is provided in Chapter 2. A more rigorous theoretical development of the concepts of conservation of mass, energy and momentum, accompanied by the necessary Simplifications leading to the often-ased specific-force and specific-energy relationships are included in Chapter 3. Chapter 3 also presents background information for a quick review of the definitions for the well-known water surface profiles corresponding to subcritical, critical, and supercritical flow regimes.

    1.1.3 Included Application Problems

    Chapter 5 includes a variety of example problems solved bY using the provided software codes. AlthOugh several application problems are provided, the full capabilities of the software codes could not be fully demonstrated due to the excessive space needed to contain the various results.

    1.1.4. "User-Friendly" Guidelines

    The provided computer code is designed to operate in batch mode. That is, a data file is prepared by the program user and then the program operates upon the data file.

    The data entry program parameter definitions and suggested range of allowable values are provided in the form of "text pages", These text pages provide a deSign objective to be considered in developing a "user-friendly" cathode ray tube (CRT) data entry environment.

  • Introduction to User-Friendly Software 3

    The software needed to construct a modern user-friendly environment is typically machine dependent; therefore, the program user needs to consult his particular computer's documentation library to investigate programming procedures for the necessary operations of clearing the screen, addressing the cursor, "ringing the bell", and obtaining the other measures necessary to develop a "form fill-out" data entry capability. The design objectives for humanizing the provided code (or other computer codes) is summarized in the following section (1.2).

    Although the reader is recommended to develop the user-friendly environment discussed in section 1.2, the computer codes included herein will, of course, provide a powerful library of hydraulics, whether used in the batch version or in a humanized form. In order to facilitate the use of the programs in either a CRT responsive mode or the batch mode, all program WRITE statements are defined with a variable (WRITE) unit number NUT (see section 1.1.5).

    1.1.5. Some Computer Code Preliminaries

    The provided oamputer software is written in an early version of FORTRAN and should be compatible with the majority of available FORTRAN systems. In order to avoid machine dependent code statements, data file open statements, close statements and other file management operations are not included. READ statements are all shown in a FREE format, fOllowed by the input parameters. Parameter definitions for the READ FREE statements are provided in the suggested user-friendly text page formats.

    WRITE statements are all designated by the unit NUT. Consequently, the program user can designate his appropriate NUT value as a constant or variable for CRT, printer, or disc storage.

    Finally, PROGRAMS 1 and 2 are written as subroutines to be linked to a main program. The subroutines can be converted to independent programs by simply changing the beginning and ending software statements appropriately. Note that the output statements are defined by use of the variable NUT, where in the code a NUT = 6 is used. This value for NUl' is of course a IIB.chine dependent unit nunber for an output device (e.g., printer).

    1.2. Developing User-Friendly Computer Software

    The use of computers to aid in water resources related analysis, synthesis, and design has increased significantly during the last decade. A main motivation for using computers is that water resources related studies often reqUire (1) an iterative calculation analog such as that used in the calculation of

  • 4 Introduction to User-Friendly Software

    hydraulic section information, (2) solution of a convolution type integral such as is used in unit-hydrograph hydrology studies, or (3) the solution of a sillllltaneous system of equations such as is employed in water distribution network analysis. Because each of these three general classifications of problems essentially involve a repetitive series of calculations, a computer code can be prepared which will offer the engineer an extremely cost effecti ve tool.

    Another motivation for the use of computers in water resources related studies is the development and widespread use of digial microcomputers. For many classes of problems, the microcollp.lter offers the sarre speed and capability to the single user as does a minicomputer in a multiple user system. Consequently, progranming techniques which were once limited to the minicomputer or the mainframe class of computers is now available at low cost by means of a microcomputer system.

    Such programming techniques include 'humanized' computer interaction and detailed, easy to read computer results which are expliCit, fit the requirements of a reviewing agency, and yet are understandable to the first-time reviewer of the product.

    By making the program humanized, the learning curve is essentially minimized in that all program information is prompted and scanned for acceptability and can be rejected if data is not within program specified limits. In general, the user's manuals associated with a wide variety of batch programs are eliminated because the humanized program guides the user through every possible logic path, providing the user with various checks and controls in order to further reduce pararreter selection errors and an unreasonable choice of design options.

    'lbe development of the humanized software may be defined as a uniform communication/presentation (e/F) to the program user. There are several C(p requirements for computer software which are described as follows:

    1. For a sequence of data entry prompts, the page nurrber and calculation model description appears at the top of the page.

    2. All words are written in their entirety, with abbreviations avoided whenever possible.

    3. All units should be given for the information requested.

    4. Allowable values are identified which limit the data entries to reasonable quantities.

  • Introduction to User-Friendly Software 5

    5. Should there exist standardized criteria for parameter values, the recommendations are included in the display.

    6. !my program operation comnands should be consistently and uniformly displayed so that the user can operate the input interaction or special data editing features without confusion.

    7. A 'failsafe' line appears on the CRT screen for each page. This line is located near the bottom of the screen and appears in the same pOSition on each page. Below the failsafe line occurs all program operating instructions. These instructions can be typed by the program user at any time and will cause the program to respond instantly.

    8. All cooputer-dependent requirements (such as data file manipulation) for data management should be interior of the software so the program user need not be knowledgeable of computer operations in order to utilize the program.

    9. The C/p should be uniform between software products. By requiring uniformity of software interaction, individual programmer personality traits can be avoided. The result is a library of software wherein each program operates, interacts, and responds identically. Consequently, the user learning curve is minimized.

    By using a program which provides an easy-to-ready output product, the usual deSign review procedure is minimized which reduces total cost to both the design engineer and the design review team. Additionally, the computer product should be the actual fully prepared report which is to be submitted, containing the usual introductory pages, and the study results should be produced in the reviewing agency's required computer-printed forms or plotted graphs. The computer program then provides an actual engineering product, minimizing the need for secretarial and graphic efforts.

    1.3. Data Entry Strategies

    Typically, most water resources software uses a "batch mode" data entry where a data file is prepared using a computer's editor, and then the program is executed. Due to data entry errors or errors in design judgement, this process is repeated several times until the final product is achieved. A more modern approach to data entry is by direct access to the program computations through cormwnication by means of the cathode ray tube (CRT).

  • 6 Introduction to User-Friendly Software

    '!he interactive display presented to the user on the terminal by the application program is usually of a type called scrolling. Scrolling is presenting a line of characters or text on the bottom of the terminal screen. 'Ibis line moves upwards continually as new lines of information are added. This type of presentation differs from natural reading techniques such as reading a book in that the material IDOves upward instead of the eyes IDOving downward acrosS a steady display.

    When using the scroll technique for data entry, the program user is not aware of the next inplt requirerrents until it actually appears on the bottom of the screen. If errors occur while entering data, messages are displayed and scroll up while repeat prompts for user input are again requested by the program. Multiple occurrences of errors usually result in a screen full of scrolling error messages which often add to the confusion. Normally, scrolling interaction never allows a user to change a data entry once it is accepted by the program unless the user restarts the program (thus losing all previously entered data) or edits the data if the capability exists within the program.

    In contrast, humanized form-fill out display interaction closely simulates natural reading or viewing characteristics. All textual information or data entry requests are assembled in logically related groups to fit comfortably an text pages. These pages are presented to the user by clearing the CRr screen of all previous information before displaying the current page. The text information is displayed starting at the top of the screen and proceeds downward until the bottom limit of the screen is reached, enabling the user to observe a stable screen of related information. In the case of data entry, related requests for user input are displayed simultaneously, enabling the user to foresee subsequent data entry requests. The CRT cursor IDOves down the screen after each input request is satisfied. This cursor movement is the key to powerful screen interaction.

    A typical terminal screen can be visualized as a matrix containing 24 lines by 80 columns or 1920 elements. One may individually address these elements by programmed movement of the cursor to the selected element. Textual sequences can be displayed anywhere on the screen at any time while retaining or erasing previous information. This allows warning signals or error messages to appear next to the data in question and disappear after the error has been corrected, thus leaving the original page of displayed information intact. Another powerful use of cursor movement is in the case of data entry on a page affecting the permissible values of subsequent data entries on the same page. The allowable values displayed under a subject data entry prompt can be cursor addressed, changed to new values, and the cursor returned to the previous selection instantly. This

  • Introduction to Use~Friendly Software 7

    method employs full conversational awareness by the computer system at all times. Since the viewing displays are constructed in text pages, the user can manipulate the pages by a set of understandable interaction commands such as those listed in the following:

    1. TOP: request to clear the screen, re-display the page and return the cursor to the first input request on the current page. This permits modification of data on the page.

    2. BACK: returns to the previous page for corrections or changes.

    3. MAIN: terminates the program function in progress, manipulates computer files as needed, and returns to the main program menu of available processes.

    4. EXIT: terminates the program function in progress, closes all computer files as needed, and exits the program.

    User directed page movements, coupled with the dynamic display qualities attained through programmed addressable cursor movements, provide a powerful and flexible interactive environment for experienced as well as first time computer program users.

    1.3.1. Requirements for Interactive Conputer Software

    An important consideration for selecting an interactive software strategy is compatibility among various computer hardware. Unfortunately, wide differences still exist between manufacturers of peripheral devices such as terminals and computer resident system programs called operating systems. Developing an interacti ve design methodology that is dependent upon a particular type of hardware or the operating system of a certain computer generally promotes the eventual demise of the approach. The constant change of operating systems due to computer vendor upgrades may render the programming required to accomplish such a deSign incompatible with the revised system.

    More likely to occur is the typical change or upgrades of CRT devices or terminals which may not accommodate some of the interactive features programmed for the previous device. The hardware or operating system dependent functions can be justified in the case where the application software and hardware are bundled together to form a functional package. These types of packages normally deal with graphics applications such as CAD/ChM systems or elaborate word processing systems. The special purpose computers are mostly self-contained systems requiring certain hardware and operating system configurations.

    An interactive design method has to merge comfortably with the major application systems that are already on the machine such

  • 8 Introduction to Use~Friendly Software

    as engineering, accounting information retrieval systems, and word processing. In ordee to accomplish this task and maintain cOl11?atability among a wide selection of terminals and operating systems, a ceetain subset or core group of interactive functions ace developed which will perform all the major tasks of a humanized form-filled inteeactive method. The basic functions that are compatible with over 95% of the terminal hardware and cornputee systems available today ace absolute cuesor addeessing, clearing the screen, and "ringing the bell".

    Another requirement is the ability of the computer system to send out what is called control characters which excite these functions. Using these basic functions as building blocks, an entire sophisticated 'humanized' interactive approach can be accomplished while still retaining compatibility across vendor lines. Changes in terminal control character sequences for various terminals are accomplished by an easily accessible hardware table contained within the interactive awlication driver I:Outines Dr by table files. These tables map the function to the device. Thes::e are many other functions available in terminals such as highlighting or dimming of certain groups of text, flashing of warning messages, and split screening for multiple tasks. These are not normally available in all terminals 2l'ld are usually reserved for the higher priced moOels. In addition, the particular code sequences to start and stop these functions are widely different. Tnese functions are just extensions of the basic three required to develOp such a user fdendly system. A well designed interactive system using the basic three functions of cursor addressing, clear screen, and bell satisfies fully the criteria required to produce a truly humanized interactive methodology

    1.3.2. Screen Layout strategy

    As discussed in a previous section, the CRT screen is divided into a cell matrix of 80 columns by 24 rows. The screen layout has been designed to accommodate most data entry possibilities. The basic skeleton screen is set up as follows:

    I - 4

    5 - 56

    Colunns on CRT Screen

    Blank

    All text prompts and allowable values start in column 5 and end in coluIlll 56. Additional lines may be used to continue text

  • Introduction to User-Friendly Software 9

    57 Blank

    58 - 51 Reserved for the '~=)' designation which pulls the viewer's eye to where the data should be entered

    62 - 72 Used for the actual data input

    73 - 79 Reserved for the '*ERROR*' designation when input errors are detected.

    RowS on era' screen

    21 Reserved for explanatory error messages Or engineering warning lIleI3sages

    22 Contains the 'failsafe' line of dashes or underscor::es

    23 - 24 Contains the failsafe program instruc-tions that vary from page to page

    Using this uniform layout of screen design will promote adaptability for the programming of other systems using the same design. Once a programme. knows how to manipulate one prog.am, other p.ograzrs can /:Ie cpickly humanized due to similar input-cR'l' response except for the actual data entry pronpt:s dependent upon the particular calculation UDdule.

    I .4. Flow of User Data

    ~ user-entered data flows through a libracy or form-fill out routines where it is checked for validity, allowable ranges, and real or integer values limits before it can be accepted by the calling calculation sUbroutine. Detailed descl:iptions of the subroutines and arguments will be discussed in a subsequent section, but the overall logic flow of user entered data through the subroutines is as follows. All input frOm the user is read from subroutine GETVAL. This routine is the central or main controlling routine for all input processing. within GETVAL, various Checks are made to validate the data. one set of checks determines if TOP, BACl\, EXIT, or MAIN has been typed by the user. In addition, NUMCK is called to determine if a number entered by the USet is valid. Fo~ example, two decimal points or a '+' o~ a '-' within the same value would trigger an error message. The errDr messages are presented by a call to ERROR within GETVAL to

  • 10 Introduction to User-Friendly Software

    display the appropriate message. A call to CLEAN erases the messages on the screen after the user enters corr:ect data. Argument values returned by GETVAL to the callinq calculation subroutine are processed to allow continuation of data entry from the user or to jump to logic that will return to a previous data entry page, exit the program, erase the current page and request resubmittal, or go to the main menu.

    Using the library of CRT screen handling routines reduces considerably the amount of computer code required for input processing. Since the arguments feeding Gm'VAL set up permissible ranges and other parameters unique to a certain input item, the only READ statement for inplt (fol: all iIlf4lt items) is conta~ within GEll'\IAL. All the logic that processes errors and displays Iressages is contained within EROOR and CLEAN. The area or colurm-row address of the CRl' screen where the current input item resides is passed through all the form-fill out routines in order that error messages and re-enter prompts can be addressed to the CRT correctly. In this general fashion, all iIlf4lt following the basic skeleton frame for the CRT 'pages' can be processed very efficiently.

    1.5. Screen Design Method

    The design of CRT interaction pages that will be presented to the program user for data ent~ requires a thorough design process in itself to be effective. An approach which has been used successfully in implementing production quality software is described in this section. The first step in the screen design process is to define all input entry prompts for a given function or calculation model. This is absolutely necessary in order that the screen deSigner may group related data entry prompts in a logical fashion. This global definition phase of prompts also helps to eliminate redUndant data entries.

    The wording of the prompt for single data items or value should start with 'Enter' followed by the information request text which is then followed by the 'units' deSignation. Data entry prompts which require a choice among several listed options demand a different strategy. The general title or description of the options is written first. The options are indented and listed below the title. Finally, the prompt starting with 'enter' or 'select' is written which describes the value being requested.

    Any descriptive text that will precede prompts excluding the actual prompt must be defined for all input requests. The descriptive text is extremely helpful to first time or occasional users. The text should be very concise and offer a description of what is to follow in the prompt. After additional explanatory text is defined, all prompts must be inspected and assigned

  • Introduction to User-Friendly Software 11

    allowable values. 'Ibis range of values should be set to restrict each pronpt to a typical or norrral range of values that the user may enter. For option selection prompts which provide choices, only those stated values are permitted. A value outside this range represents an incorrect data response and will be handled by an error message and corresponding re-enter request for data. After all admissible values are defined, any suggested values that may help the user should be defined for each pronpt:. These values may be typical values given a certain criteria or possibly a reviewing agency-dependent suggested value for a certain input item.

    1.6. SWroutine Descriptions and Listil"l9s

    1.6.1. SUBROUTINE CRINIT

    Abstract

    CRINIT initializes the terminal control tables for functions of clear screen, cursor addreSSing, and bell.

    Descl:iption

    The routine contains al.l. codes necessary to set lip the screen functions. After the control codes have been determined for the te!:minal selected, these values are then loaded into the IP and ICLE'AR anays. The IP array contains the ASCII value required for positioning the curso!: from I thru 80 on the CRT screen. IEEe is loaded with the lead-in character for the cursor addressing sequence. lBELL contains the code to eldte the bell. fWlction on the terminal. The terminal codes set up in the listing are coopatib1e with Lear Seigler, Televideo, and SOROC terminals. 'lhe l\SCII values of the terminal functions are stored in CO!llOOO block CURS for availability throughout the library of screen subroutines. CRINIT is called once to set up the codes.

    Arguments

    None.

    1.6.2. SUBROUTINE CURSOR

    Abstract

    Positions the cursor anywhere on the CRT screen.

  • 12 Introduction to User-Friendly Software

    Description

    Receives arguments of column, row from calling subroutine to position the cursor before a write is performed on the screen. The column, row argument is used as indices to the IP array table to select the appropriate ASCII codes. The write statement submits the ASCI! string of characters to the screen for cursor positioning. The Z (computer dependent) in the format statement holds the cursor after positioning for subsequent writes or prompts. Some systems will not need the Z type of specification in the format statement.

    Arguments

    IX

    IY

    (IN)

    (IN)

    ColUIltl nunber (1-80)

    Row nUl1Der (1-24)

    1.6.3. SUBroUTINE GmVAL

    Abstract

    Central data input capture routine which gets and returns a legal value from user input.

    Description

    Input is received in an II-character buffer (BUF) in Alpha format. The buffer is first checked for any legal function such as TOP, BACK, or EXIT. Depending on MODE, certain functions will not be legal at certain times. NUMCK is called to transform the alpha characters into a legal real value. If an error occurs, ERROR is called to display a message. The logic remains in GETVAL until the error is corrected, after which CLEAN is called to erase the previous error messages.

    Arguments

    IX (IN) Column number to read on CRT screen

    IY (IN) Row number to read on CRT screen

    IN!' (IN) o ~ Real data input antiCipated 1 '" Integer data input anticipated

    FMIN (IN) Minimum allowable value - passed to NUMCK

  • FMAY

    NCOND

    MOOE

    NULL

    (IN)

    (Dl1l')

    (0l1l')

    (IN)

    (IN)

    Introduction to User-Friendly Software 13

    Maximum allowable value - passed to NOMCK

    Legal, checked real value returned to calling routine

    1 '" EXIT input by user 2 = 'lOP input by user 3 '" BACK input by user 4 '" MAIN input by user Values returned to calling routine for appropriate action

    1 = allow EXIT 2 '" allow EXIT, 'lOP 3 = allow EXIT, 'lOP, BACX 4 = allow EXIT, IDP, MAIN

    o '" do not allow blanks as input 1 = allow blanks as input, but set ~ '" 0 at this occurrence

    1.6.4. SUBROUl'INE NOMCK

    l'Ibstract

    Extensively checks a data input value (numeric) for legal syntax.

    Description

    The user data input is received in alpha format in buffer KFLD. KFID is then checked character by character to determine a legal nurreric form. If the form is legal, KFLD is transformed by ENODE and DECODE operations to a REAL value. If an integer is expected, range checks are performed to assure an integer between -32767 and 32767.

    Arguments

    KFID

    VAlliE

    INl'G

    (IN)

    (IN)

    (0l1l')

    (IN)

    Alpha buffer containing user data input

    Length of KFID, usually 11

    Real value returned to calling routine

    Integer flag, 0 = floating point, 1 = integer

  • 14 Introduction to Use~Friendly Software

    NERR (00f) Error flag, set to various values if an error occurs

    1.6 .5. SUBROUTINE ERROR

    Abstract

    Gantains a set of error messages which appear in a reserved row on the CRT screen for illegal data entries.

    Description

    Displays any of three error messages in row 21. The '*ERROR*', and 'RE-BNI'ER' deSignations ar:pear in colurms 73-79 of the row of the data entry prompt and columns 62-70 of the row immediately below the input field. Selection of the particular error message displayed is controlled by GET'Il1\L.

    Argwnents

    ITY!'

    y

    (IN)

    (IN)

    (OUT)

    Error message type to displ~

    Row number of current data entry prompt

    Set to 1 when error message is displayed. C~ will reset it to 0 after the messages are erased.

    1.6 .6 SllBROOl'INE CLEAN

    Abstract

    Erases and cleans the screen of previous error messages.

    Description

    Routine is called by GETVAL when user input error has been corrected. CLEAN clears the '*ERROR*', 'RE-ENTER', and any message residing in row l1UIIber 21 of the CRT screen.

    Arguments

    y (IN)

    (OUT)

    Row nurrber of current data entry pronpt

    Set to 0 upon exit to indicate messages have been cleared

  • Introduction to User-Friendly Software 15

    1.6.7. SUBroUTINE BELL

    Abstract

    Produces an aUdible 'beep' to the terminal when user input error is detected.

    Description

    Routine is called by ERROR. The ASCII bell code contained in IBELL is initialized by CRINIT.

    ArglDllents

    None.

    1.6 .8. SUBroUTINE CLRSCR

    Abstract

    Clears and erases all information on the CRT screen.

    Description

    Routine is called throughout program whenever clearing the screen to blanks is required. ICLEAR is set to the ASCII clear screen codes initialized in CRINIT.

    1.6.9. SUBROUTINE INFO

    Abstract

    Displays failsafe information on last 3 rows of CRT screen.

    Description

    Row number 22 is always filled with underscores to create a line on the screen. Rows 23 and 24 contain operator instructions that may vary depending on the value on ITYP. Within the program system, calls to place various text in this area are performed whenever additional or revised operator instructions are required.

  • 16 Introduction to User-Friendly Software

    Arguments

    ITYP (IN) Determines general operator instructions to a~ar.

    1 " EXIT message only 2 " EXIT and 'lOP messages 3 " EXIT, 'lOP and BlICK messages

    1.6.10. SUBROOTINE ALIJ:M

    Abstract

    Displays various allowable value message formats following the data entry prompt.

    Description

    The allowable value message displayed under the user input data request prompt may take the following forms, depending on the setting on ITYP. ITYP (1-5) displays allowable values between a minimum and a maximum. The field width of the range is adjusted by the setting of ITYP. ITYP (6-7) displays the remaining allowable logic formats of 'greater than' and 'less than' a certain value.

    Arguments

    ITYP

    y

    IRl

    IR2

    (IN)

    (IN)

    (IN)

    (IN)

    Selects allowable value format desired

    Row number allowable value message placement

    MinintJm allowable value (ALPHA)

    MaxintJm allowable value (ALPHA)

  • 2.1. Definitions

    Chapter Two

    Classification of Open Channel Flow

    Several forms of open channel flow can be classified according to whether the flow is steady or unsteady, and uniform or nonuniform. For a sufficiently long channel of constant cross section (i.e., a regular or prismatic channel) and of constant channel slope, and where a constant flow enters the channel for all time, then a steady uniform flow typically occurs within some portion of the channel length. Where the flow regime stabilizes in the channel such that a terminal velocity is reached, the flowdepth corresponding to this stabilized steady uniform flow is called the normal depth. Consequently, steady uniform flow in a

    17

  • 18 Classification of Open Channel Flow

    reach of channel is characterized by (1) a constant flow rate in the prismatic channel, and (2) the flow depth is everywhere constant in the channel reach. Several enpirical equations have been developed to estimate normal depth; the Manning's equation is possibly the most widely used method (section 2.2).

    Steady nonuniform flow occurs in a channel reach when the flow rate is a constant (i.e., steady flow) and the channel cross section is variable, or ~en the channel is priSIIBtic but the flow depth is not stabilized and hence changes along the channel reach. When the flow depth variations are "gradual n, gradually varied flow profiles can be developed which characterize the change in channel flowdepth along the channel reach.

    In contrast to steady flow, unsteady flow in an open channel occurs due to a time variable flowrate into a channel reach. The routing of a flood wave runoff hydrograph through a channel reach is an example of unsteady flow.

    qJen channel flow is further classified as subcritical, mild and tranquil, or as supercritical, steep and rapid. When channel flows occur at low velocities such that a disturbance wave can travel upstream on the water's surface, the flow is called slilcritical. Should the upstream portion of the disturbance wave remain stationary with respect to a fixed reference point, the flow is critical. Should the disturbance wave be entirely washed downstream, the flow is called supercritical.

    2 .2 Manning's Equation

    Based on experimental data obtained from studies on steady uniform flow, Manning's equation relates normal depth flow characteristics to the channel flow rate by (in English units)

    (2.1)

    where Q is the steady flow rate in cubic feet per second (cfs) , A is the cross-section flow area (ft2), R is the hydraUliC radius (which is equal to A divided by the wetted perimeter, P), S is the slope of the energy grade line, (which, ~en normal depth occurs, is equal to the channel slope) and n is the Manning's friction factor.

    The wetted perimeter P is the length (ft) along the channel cross section ~ich is wetted by the channel flow. Other collllonly used hydraulic characteristic variables include the flow top-width TW and the hydraulic depth h. TW is defined for steady flow as the length of the water surface across the flow cross section area, and h = A/'IJN. Figure 2.1 illustrates some of the hydraulic characteristic variables for a prismatic channel. Also included

  • Classification oj Open Channel Flow 19

    in the figure is the channel side slope, z, (the ratio of the channel side horizontal-lo-vertical lengths).

    2.3. Froude Number

    A convenient expression which represents the channel flow characteristics is the Froude nurd:>er F, where .

    (2.2)

    In (2.2), V is the average velocity, V = Q/A, 9 is the acceleration of gravity, and h is tile hydraulic depth. Should a kinetic energy correction factor be included such as in Eq. (3.21), then (2.2) is modified accordingly.

    'lhe Froude nwrt>er characterizes the flow cegine by noting F > 1 for supercritical flow, F < 1 for subcritical flow, and P = 1 for cdtical flow.

    T\~

    d A

    p

    Fig. 3.1. Hydpautic charactepistic ~ariabZe8.

  • Chapter Three

    Open Channel Flow

    3.1. Introduction

    The study of open channel flow hydraulics requires an understanding of the fundamental principles embodied in the conservation of mass, momentum, and energy. Consequently, the basic definitions and equations need to be presented prior to developing the detailed computer software which can be applied to sol ving engineering problems. In the following, the necessary fundamentals of open channel flow hydraulics is briefly reviewed. '!'hese concepts will then be extended towards the develq:ment of comprehensive microcomputer software for the analysis of steady flow in open channels.

    20

  • Open Channel Flow 21

    3.2. Conservation of Mass, Momentum, and Energy

    The study of open channel flow hydraulics is based upon the conservation laws of mass, m:>menturn, and energy. '!hese laws are awlicable to a specified quantity while undergoing a change in positions, energy level, or other conditions.

    The usual awlication of these laws is to develop integral equations which express the func:1ammtal principles with respect to fluid flow through a control volume. The integral equations can be directly applied to flow problems or rewritten in terms of partial differential equations to analyze the assumed fluid continuum.

    3.2.1. Conservation of Mass

    For a fixed control volume 51 enclosed by the surface integral form of the conservation of mass is given in notation by

    f pV dA + aat J p dn = 0 r [l

    r, the vector

    (3.1)

    where V is the velocity vector with respect to the Cartesian coordinate system, and dA is the outward normal vector to r wi til magnitude dA. For steady flow the tine derivative is zero, giving

    f pV dA ~ 0 r

    For incompressible flow

    Jv.dA=O r

    (3.2)

    (3.3)

    The differential equation form of mass conservation is often used in open channel flow hydraulics. This form is obtained by application of Gauss' theorem to (3.1) giving

    op 0 0 a - + -- (pu) + - (pv) + - (pw) = 0 (3.4) at ax oy dZ

  • 22 Open Channel Flow

    where (u,v,w) are the (x,y,z) directional flow velocities. For steady, inCOl1{lressible flow (3.4) reduces to

    au av aw -+-+-=0 (3.5) ax ay 3z

    3.2.2. COnservation of Momentum

    Newton's second law of JOOtion relates the net force F acting upon a system to the change in rnomentwn M by

    dM F =-

    dt (3.6)

    With respect to the fixed control volume n, (3.6) can be written in integral form as

    J VpV dA + ~

    at r

    f Vpdn = F n

    (3.7)

    The F vector is composed of pressure and shear forces (Fs) acting upon the surface of the system, and the body force vector B which relates body forces (such as gravity) per unit volume of the system. Using F sand B, (3.7) is rewritten as

    J V pY dA + adt J V pd" = F s + J Bd" (3.8) r " " For steady flow, (3.B) becones

    f VpY dA + Fs + f Bd" (3.9) r "

    lln important 8!'Plication Qf .!l.2L ili ~ ~ fluid fJ...Qli crosses & 2Il..l.Y. goo. point Qf. entrance (point 11 and 2D.lY. ~ point 2f. exit (point 2L. Assuming that the fluid density and flow velocity are constant over the entrance and exit areas, then (3.9) becomes

  • rFX = M(u2 - u1)

    EFy =M(v2-V

    1)

    EFz = M(w2 - wI)

    where M is the mass flowrate through >l.

    3.2.3. Conservation of Energy

    Open Channel Flow 23

    (3.10)

    The first law of thermodynamics is used to develop the integral equation form of the conservation of energy. The conservation law is given by

    dE = Q - W (3.11)

    where dE is the change in the energy of the system, Q is the heat added to the system, and W is the work done by the system. The energy E is written in terms of several contributions by

    E = U + ~ mV2 + mgZ (3.12)

    where U is the internal energy, m is the system mass, mv2/2 is the kinetic energy, and mgZ is the potential energy. For e = Elm, (3.11) is written in integral equation form with respect to time by

    a dA +-

    at I epdn = dQ dt n

    dW

    dt (3.13)

    Flow work done on r due to normal stresses (hydrostatic pressure) can be isolated from the W term and (3.13) rewritten as

    J (e + pip) pV r

    d J dQ dA + - epd[l = -at dt

    fl

    dW* (3.14)

    dt

  • 24 Open Channel Flow

    where p is the fluid pressure and W* is the work term W less the flow work contribution.

    For steady flow, (3.14) reduces to

    J dQ

    (e + pi p) pV dA = - -dt

    r

    dW*

    dt (3.15)

    E'or one entrance (point 1) and exit (point 2) associated to r, and constant e,p, p over the entrance and exit areas,

    (3.16)

    Noting e = Elm, and M being the mass flow rate through f2 gives 2 2

    [ V 2 : VI 1 + 9 [Zz _

    where i = U/m. Letting

    dQ 9HL = (i 2 - i ) - -- / M 1 dt

    )' dQ dW*

    ZI J = dt - dt (3.17)

    (3.18)

    further reduces (3.17) for zero system work and constant p to

    or in terms of length units (or head)

    (P2 - PI) (V2

    - V2

    ) ---"'-----=_+ 2 1 +Z -Z)+H =0

    Y 29 2 I L

    (3.19)

    (3.20)

  • Open Channel floUl 25

    Where Y is the fluid specific weight, and HL is the head loSS.

    3.3 Fundamentals of Hydraulics

    3.3.1. Hydraulic Grade Line and Energy Grade Line

    For any point in the fluid, the summation of the elevation plus the pressure head is known as the piezometric head. The piezonetric head represents the level to which liquid will rise in a piezometer tube where a line through the tops of a series of piezometer columns is known as the hydraulic grade line (HGL). The energy grade line (OOL) is determined by the sum of the HGL and the velocity head (V2/2g) such as is shown in Fig. 3.1.

    3.3.2. Specific Energy

    In open channel flow, the specific energy, SE' is given by

    (3.21)

    -where

    y = vertical depth of flow 6 = angle of the longitudinal bed profile with respect to the

    hor~zon~al. (In most cases e is small, therefore cos 6 = 1.)

    c ~ kinetic energy correction factor. This is equal to one when the velocity distribution is uniform.

    V = average flow velOCity g = gravitational acceleration

    Gi ven the flow rate (Q), and cross section flow area (Al, and for cos2 0 ;;; 1,

    (3.22)

    or

    (3.23)

    From Equation (3.23), it is clear that the specific energy curve of Fig. 3.2. has the two asymptotes of y = BE' and y = O.

  • 26 Open Channel Flow

    ~.G.L.

    DATUI-1

    ~ ____ -r ______ ~E~.G~.l~. ______ ~~~====*~vi V 2 I _1=-A I -- 29

    -2 u .G~..:---- I 9 I "- I ---+-__ ,- PB

    I I w

    -w I 81 I I I

    H.G.t. ~ Z + P/w

    DATU~1

    E.G.l. ~ Z + P/w + V2/2g

    Fig. 3.1. Energy grade tine components.

  • Open Channel Flow 27

    Alternate depths are defined as the two possible depths of flow for a given Q and SE' and represent the two possible regimes of flow. For a point on the upper limb of the curve (Fig. 3.2), flow has a higher depth ahd thus a lower velocity. In this case, the flow is known as subcritical. On the lower linb of the curve the flow has a lower depth and thus a high velocity. This flow is classified as supercritical. When dSE/dy : 0, the flow is critical (the location of this condition is at the crest of the curve). The depth relating to critical flow is known as the critical depth, Yc'

    3.3.3. The Specific Force

    Consider a steady, uniform, incompressible flow in an open channel between channel section A to section B, and apply Newton's second law of motion. The second law of motion states that the change of momentum per unit time in the body is equal to the resultant of all the external forces that are acting on the body. ihus for the fixed control volume, (3.9) becomes

    (3.24)

    where B = momentum correction factor

    P and P = resultant pressures acting on sections A and B, A B respectively

    W : equivalent weight of the fluid pressure enclosed between sections A and B

    Ff = total external .forces (including friction) along the wetted boundary of the channel between section A and section B

    a = angle of channel slope with respect to the horizontal

    The pressure forces are calculated by

    ~ -PA - yAAhA ' PB = yABhB

    (3.25)

    Both sums of ~ ~ in. (3.271 involve identical components, and can be grouped together as the specific force, FS' That is,

    (3.26)

  • 28 Open Channel Flow

    CRITICAL DEPTH

    Increasing Flow

    ~------------~~~----"SE 2

    5 ~ Y + q E zgy2

    Fig. 3.2. The 8pecific energy curVe.

    :r l-e.. "-' Cl

    :;: o -' l.L

    y

    GRITI CAL -J-----i DEPTH

    Fig. 3.3. The specific force curVe.

  • Open Channel Flow 29

    Setting the momentum correction factor to unity and evaluating (3.24) at the specified point along the channel results in

    (3.27)

    ihe specific force curve (Fig. 3.3) is similar in some of its characteristics to the specific energy curve (Fig. 3.2). Both the specific force and specific energy are asymptotic to the y = 0 axis. However, the specific force curve is not asymptotic to the 450 line.

    3.3.4. 1'he HydrauliC Jwrp in a Rectangular Channel

    Solution of the continuity and momentum equations for the special case of a rectangular channel leads to the following relation for the initial (y~) and sequential depths (Y2) of a hydraulic jump on a horizontaTfloor

    (3.28)

    and

    (3.29)

    In the above, F1 and F2 are the Froude nulltJers corresponding to depths Yl and yZ' re:;pective1y. Subsbtqting ~ese values into the energy equahon g1ves the energy loss 1n the JIllIP

    dD = (Y2 - Y1)3/4Y1Y2

    ihe jUl!1P efficiency EZ/E1. can be expressed as

    (3.30)

    (3.31)

    The relative height of the jUl!1P (Y2 - Yl)/E1 can be expressed as

    (3.32)

  • 30 Open Channel Flow

    The U.S. Bureau of Reclamation has classified various twes of hydraulic jumps based on the Froude nUll'iJer, FI , on the upstream side. '!heir results are sUlt1IIBdzed below:

    TABLe ~ .1. HYDRAULIC JUMP CLASSIFICATIONS

    Fl

    1 to 1.1 I.? to 2.5 2.5 to 4.5 4.fi to 9.0

    > 9.0

    3.4. Gradually varied Flow

    CZosBifi"ation

    undu Zop jump OJeak jump os"ittatin9 iump steady jump stpong jump

    Gradually varied flow in a prismatic channel can be modeled by the one-dimensional differential equation

    dy/dx ~ (So ~ Sfllt1 ' 1'2) (3.33)

    where y = flow depth

    So = the bed slope Sf = the friction slope F = the Froude number x = coordinate along channel bottom

    When Sf approaches So' dy/dx approaches zero. Therefore, water surface profiles approach the normal depth of flow asynptotioally.

    If F approaches unity, dy/dx approaches infinity. 'llIerefore, by (3.33), the water surface becomes nearly vertical.

    3.4.1. S Profiles

    A channel is classified as steep for a discharge when the normal depth is less than the critical. When the normal flow is rapid (normal depth less than critical) in a channel, the cesulting profiles S1' 52 and S3 are known as the steep pmfiles. The 5} profile approximates gradually varied flow which is above the normal aM critical depths, 82 represents the flow profile occuai.ng between the critical ana normal deEJl;hs, and S3 OCCUCS below the normal depth, (Fig. 3,4)

  • Open Channel Flow 31

    For the 81 curve, both the numerator and denominator of (3.33) are positlve and the depth increases downstream approaching a horizontal asymptote. An example is a steep canal emptying into a pool of high elevation.

    For the S2 curve, the numerator of (3.33) is negative and the denominator is positive (but approaches zero at y = Yo). This curve approaches the normal depth asynptotically. An exarrple is the profile formed an the downstream side of an enlargement of a channel section.

    In the 53 curve, both the numerator and denominator of (3.33) are negative. An example is the water surface profile as the slope changes from a steep to a milder (but steep) slope.

    3.4.2. M Profiles

    A mild slope is ane where the normal flow is tranquil (i.e., normal depth, yJ. Three profiles nay occur, and are classified as Ml , M2' and M3' for flow depths above normal depth, below normal and above critical depths, and below critical depth, respecti vely ,(Fig. 3.5).

    For the HI profile (y>Yo>ycl, the upstream end of the flow profile is tangent to the normal-depth line, since ely/dx = 0 as y = yo' The downstream end is tangent to the horizontal because ely/dx = So as y awroaches infinity. A typical example in this case is tne profile behind a dam in a mildly flowing river.

    For the M2 profile [Yo>y>Yc)' the upstream end of the flow profile is tangent to the normal depth line, since ely/dy = 0 as y = Yo. The downstream end of the flow profile is less than the normal depth but above (or equal to) the critical depth. A typical exarrple of this profile occurs at the upstream side of a sudden enlargement of a mild channel cross-section.

    For the M3 profile (y

  • 32 Open Channel Flow

    HORIZONTAL

    Fig. 3.4. Gpadually vapied flo~ ppofiles for steep slopes.

    dy/dx = + ===::;:::::::::::~M;l:;:::;~=,.... ____ /HOR I ZONTAL

    dy/dx = - , -- " ----- .J --dy/dx = + "

    p/ ,,'" Y c

    J:{QB~l DEPTH LINE

    Yo

    - .f!3.!I!.~ DEPTH LINE

    Fig. J.5. GraduaLLy varied flo~ profiles fop miZd slopes.

  • Open Channel Flow 33

    dy/dx = + - ______ 9___ ___ HORIZONTAL __ ~ 'iIiF --3 -. ?;J --_ -..C2

    '" --.. " dy/dx = +

    Fig. 3.6. GpaduaZty vapied fZow ppofites fop criticat stopes.

    Fig. 3.7. ChanneZ reach used for derivation of standard step method.

  • 34 Open Channel Flow

    3.4.4. The Standard Step Method

    Gradually varied flow profiles are generally computed by using any of three popular methods. Namely, the graphical-integration method, the direct-integration method, and the standard step method. The standard step method continues to be the most conmanly used.

    In the standard step method, the computation of the flow depth is carried out on a station to station basis where the hydraulic characteristics are known. The computation procedure is a trial and error method to balance the energy equation.

    Por convenience, the position of the water surface is measured with respect to a horizontal datum. The water surface elevations above the datum at the two end sections can be expressed (as is also shown in Figure 3.7)

    (3.34)

    and

    (3.35)

    The friction losses are estimated between points A and B by

    (3.36)

    where Sf can be taken as the average of the friction slopes at the two end sections. The total head at sections A and B can be equated by the energy equation

    2 2 Sodx + YA + cAVA /29 = YB + cBVB /29 + Sfdx + he

    By substitution, the following is written

    where he is the eddy loss defined by

    h = k(dV2{29) e

    (3.37)

    (3.38)

  • Open Channel Flow 35

    where {N2/2g is the change in velocity head, and It is given by

    It = 0 to 0.1 for gradually converging reaches It = 0 to 0.2 for gradually diverging reaches It = 0.5 for abrupt expansion and contraction It = 0 for prismatic and regular channel

    The total, heads at the two end sections A and Bare

    (3.39a)

    and

    (3.39b)

    Using (3 .39a,b), equation (3.38) can be expressed as

    (3.40)

    Given the values of HA (or HBI, the energy head for HB (or HA) is cOlIPlted by estimating possible flow depths until tlie governing energy equation is satisfied.

  • Chapter Four

    Hydraulic Elements II

    4.1. Introduction

    In this chapter, FORTRAN carrputer programs are presented for the analysis of gradually varied flow profiles in irregular channels, and the hydraulic analysis of normal depth flow in irregular channels. The provided programs are compatible with most of the currently available microcomputers which support the FORTRAN computer language. The engineer can extend the programs to accommodate large scale problems by simply modifying the various program memory array dimension statements.

    4.2. ProGRAM 1. Irregular Channel Gradually Varied Flow Analysis

    Chapter 3 presents the background theory to be used in the analysis of gradually varied flow water surface profiles in irregular channels. PROGRAM 1 applies the analysis procedure to flow in irregular channels by use of the Standard Step Method (Chow, 1959).

    36

  • Hydraulic Elements 11 37

    The Standard Step Method provides for the computation of an upstream (downstrea~ water surface and EGL given the current values of the downstream (upstream) water surface elevation, EGL, flow rate, and other flow and channel characteristics. Consequently, the main thrust of the computer program is to develop gradually varied flCM profiles for channel flow situations which can be considered mild (i.e., Froude numbers are all less than 1, and the flow depths are greater than the. critical depth), Or steep (i.e., Froude numbers are greater than 1, and all flow depths are less than the critical depth).

    The program data entry requirements fall into two categories,

    (1) preparation of channel cross section information (2) definition of uniform channel flow rate, energy bal-

    ance locations along the channel, and downstream (or upstream) hydraulic control information

    The preparation of channel cross section information entails the definition of up to 50 cross sections along the channel. Each cross section is defined to have up to 20 (x,y) coordinate pairs, a Manning's friction factor, a kinetic energy correction factor, and an eddy loss factor. Each cross section is assumed to have a Single flowline such that the section begins on one bank, decreases in elevation constantly to the flowline, and then increases in elevation until the other bank elevation is reached. The section coordinate data is entered with the first x-coordinate being defined as x = 0.0. Thus the coordinate data must be entered consistently in order to scan the cross sections properly. That is, all sections should have the coordinate data prepared from left-to-right (or right-to-left). The cross section data entry begins with the most downstream section, with subsequent section data entered in the upstream direction.

    The second set of data entry requirements includes the constant flow rate to be used through the entire study, the definition of the downstream (or upstream) hydraulic control water surface elevation, and the definition of energy balance locations along the channel. PROGRAM 1 computes the critical depth at each energy balance location. Consequently, should the specified control water surface elevation for a subcritical flow analysis correspond to a channel flow depth less than critical depth, the program will redefine the control to equal the critical depth. Similarly io. a supercritical flow analysis, a control water surface elevation greater than that associated to critical depth will be adjusted to critical depth. The Standard Step Method computes the water surface profile by balancing the energy losses (between energy balance locations) to the change in the EGL. Thus the engineer locates those pOints where the energy balance

  • 38 Hydraulic Elements II

    computations are to occur within the study. Energy balance locations are always defined with respect to the most downstream section.

    For a subcritical flow study, the analysis proceeds in the upstream direction. The upstream water surface and EGL are computed at energy balance locations by linearly interpolating all cross section geometric and hydraul ic information. ShOUld the water surface fall below the corresponding critical depth, the channel flowdepth is redefined to equal the critical depth (Froude number equalS I, modified by the kinetic energy correction factor). In reaches where normal depth flows could be supercritical, the word STEEP is noted in the right hand column of the computer solution tabulation. Other program output features are listed in the program description page which is included in the program output.

    Similarly for a supercritical flow study, the analysis proceeds in a downstream direction. And should the water surface exceed the critical depth, the flow depth is redefined to be critical.

    PROGRAM 1 is designed to tabulate the hydraulic computations according to the form given in Chow (H59, pg. 269). The computer results also inClude a report description page which briefly describes the computer program operation and the interpretation of the final results. It should be noted that PROGRAM 1 models the gradually varied flow hydraulics as a one-dimensional channel reach, ignoring all additional losses due to bends, angle points, and so forth. However, the eddy loss factor represents a portion of the change in velocity head to be used for energy losses, and can be used to include any other additional losses as a function of the change in flow velocity head, Hv. Should channel flows exceed either channel bank, the model assumes that a verticle line extends upwards from both channel banks, with zero friction assumed along the imaginary boundary. In this flooding situation, the word FLOOD is printed in the computer results. The example problems contained in Chapter 5 demonstrate the use, and some of the COIlpUtational sensitivities, associated to this powerful computer program.

    4.3. PROGRAM 2. Irregular Channel Hydraulics

    A common problem in flood control hydraulics is the estimation of normal depth flow hydraUlics for an irregular channel which is cooposed of several subchannels. In PR03RAM 2, up to 20 subchannels can be defined, each with a different Manning's friction factor and cross section geometry. The subchannels are assumed to be connected as a global cross section through which the specified flow rate flows in equilibrium between

  • Hydraulic Elements 11 39

    the subchannels. That is, the flows are IOOdeled as OOCllrrill9 in each subchannel such that the water surface elevation corresponds to each subchannel simultaneously.

    The data entry requirements include the definition of each subchannel in terms of (x,y) coordinates. Each subchannel is assumed to have only one flowline and one friction factor. After the cross section data is entered, the global normal depth depth is computed by incrementally increasing the water surface elevation simultaneously in each subchannel until the corresponding normal depth flow rate exceeds the required total flow rate. Example problems using PROGRAM 2 are contained in Chapter 5.

    4.4. . CompJter Code

    Computer codes in FORTRAN for PROGRAM I and PROGRAM 2 are provided in the following pages. Additionally, the data input requirements are displayed by means of text pages deSigned for the CADI environment discussed in Chapter 1. The various user-friendly techniques enployed in the text pages are all provided by PROGRAMS A-J of Chapter 1.

    In the text pages, the data entry sequences, program variable names, variable entry limitations (allowable values), internal data checks, and pcogram control statements, are all shown as they appear in a well-designed CADI envirorutent. 'lhe FORTRAN codes may be keyed in to operate in a batch rnXIe; or preferably, PR)GRAMs A-J should be incorporated to provide the CADI environment based on the included text pages.

  • 40 Hydraulic Elements II

    PR:lGRl\M 1. Data Entry

    ---DATA ENTRY FOR IRREGULAR CHANNEL WATER SURFACE PROFILE--- PAGE 1

    In order to determine a water surface profiLe in an irregular channel, the channel needs to be defined by cross-sections. These sections are entered sequentiaLly (from 1) as one traveLs upstream. Enter TOTAL NU~BER of cross-sEctions . ~==> "Nil :ALLOWAeLE ~ALUES ARE [ZJ TO [50 J

    Enter the CONSTANT irreguLar channel FLOW(CfS) .. ~==> I'QQ'I :ALLOWABLE VALUES ARE [1 J TO [999999J

    Enter alLowable ERROR(FEET) in water surface determination ~ ===) "TOl" :ALLOWA8LE VALUES ARE [.01 ] TO [.50 ]

    ---DATA ENTRY FOR IRREGULAR CHANNEL WATER SURFACE PROFILE--- PAGE 2

    FLOW REGIME MODELS:

    1= SUBcritical flow (Flow regi.e is limited to flow depths greater than critical)

    2= SUPERcritical ilow (Flow regime is limited to flow depths less than criticaL)

    Select flow re9i~e MODEL desired =:=)

    Enter hydraulic cnntrol water surface(ELEVATION) at cross-section __ . ===> :ALLOWABLE VALUES ARE [-9999 ] TO [9999 J

    "KM(lOEL"

    "YCON"

  • Hydraulic Elements II 41

    ---DATA ENTRl FOR IRREGULAR C~ANNEL WATER SURFACE PROFILE--- PAGE 3

    CHANNEL CROSS-SECTION DATA ENTRY GROUP OF 2:

    Enter TOTAL number of nodal points to describe cross-section .. ;;=> :ALLOWABLE VALUES ARE [3J TO [20 J (NOTE: INCLUDE BOTH END POINTS IN TOTAL NUMBER)

    Enter Mann~n9$ friction factor ... =;=> :ALLOWABLE VALUES ARE [.008 J TO [.99 J

    Enter kinetic energy correction factor ===> :ALLOWABLE VALUES ARE [1.0 J TO [2.0 J (NOTE: THIS CROSS-SECTION FACTOR INCREASES T~E VELOCITY HEAD TERM IN ORDER TO ACCOUNT FOR VARIATIONS IN VELOCITY FROM THE AVERAGE FLOW VELOCITY. GENERALLY, [1.0J IS AN ADEQUATE VALUE FOR TYPICAL CHANNEL FLOWS.)

    "XMANCI)II

    '"ALPHA CI) II

    ---TYPE;-EiiT-t~-L;~~e-p;09ra;-;-TOP--t~-gO-to-top-Of-p~g;-------------------

    ; BACK to go back one page

    ---nATA ENTRY FOR IRREGULAR CHANNEL WATER SURFACE PROFILE---PAGE 3A

    CHANNEL CROSS-SECTION DATA ENTRY GROUP 1 OF 2:

    Enter eddy loss coefficient . ===> "EDDye!)" :ALLOWABLE VALUES ARE [0.0 J TO [3.0 J (NOTE: T~IS VALUE IS USED TO APPROXIMATE ENERGY LOSSES DUE TO CHANGES IN THE CHANNEL SHAPE AND OTHER RELATED LOSSES. GENERALLY, THE MORE IRREGULAR THE CHANNEL, THE HIGHER THE EDDV LOSS TERM. THE PROGRAM USER MAY ALSO INCLUDE OTHER ENERGY LCSSES IN THE ANALYSIS BY SELECTING AN EQUIVALENT EDDY LOSS.)

    EACH C~ANNEL CROSS-SECTION IS LOCATED WITHIN THE CHANNEL BY ITS DISTANCE(FEET) FROM CROSS-SECTION l(THE MOST DOWNSTREAM SECTION). ALL CHANNEL LOCATIONS WILL BE REFERENCED WITH RESPECT TO CROSS-SECTION NUMBER ONE.

  • 42 Hydraulic Elements II

    ---DATA ENTRY FOR IRRE6ULAR CHANNEL WATER SURfACE PROfILE---PAGE 3A

    CHANNEL CROSS-SECTION DATA ENTRY 6ROUP 2 OF 2:

    Enter eddy loss ~oefficient ===> "EDDY(I)" :ALLOWABLE VALUES ARE [0.0 J TO [3.0 J

    Enter distanceCFEET) fro. the most downstream section defined . ===> IfDISTS(I)" iALLOWABLE VALUES ARE [ 1.00l TO [ 10000.00J

    ---DATA ENTRY FOR IRREGULAR CHANNEL WATER SURFACE PROFILE---PAGE 38 CROSS-SECTION i 1 NODAL POINT 1 OF 3:

    Enter (X) cQordinate . ===> "X(I,J)" :ALLOWABLE VALUES ARE [0 J TO [9999 1

    Enter (Y) elevation . ===> "YCI,J)" :ALLOWABLE VALUES ARE [-9999 ] TO [9999 ]

    NODE (X) COORDINATE (Y) ELEVATION [ J [ J [ ] [ ] [ J [ J [ J [ J [ J [ J [ J [ ] [ J [ J [ J [ J [ J [ J [ J [ J

  • Hydraulic Elements II 43

    ---PATA ENTRY FOR IRREGULAR CHANNEL WATER SURFACE PROFILE--- PAGE 4 This c~mputer progra. uses straight line interpoLation oetween cross-sections to define the total irregular channel. Consequently, channel shape,slope,friction, and other factors are all averaged with respect to distance between cross-sections. For water-surface profiLe determination, the locations where the hydraulic energY balances are to be made is important to the correct soLution.

    On the next page, the user is requested to enter the locations where the hydraulic energy baLances are to be made. These Locations may be specified at or bet~een the various channel cross-sections previously entered. Again, onLy subcritical (or. supercriticaL) flow is analysed by this program, and criticaL-depth wiLL be assumed at all sections where supercritical (subcritical) flow occurs. Hydraulic ju.ps,transitions between supercriticaL and s~bcritical fLow (and ~ice versa), and rapidly varying flow effects are ignored.

    Enter total number of locations where hydrautic energy baLances are to be made(STANDARD STEP METHOD) ===> :ALLOWABLE VALUES ARE [5J TO [200 ]

    ---iYPE: ... ~iii-t;;-T;a;;;-prog;:a;-;-ToP--to-QO-to-top-of-P;"g;-------------------

    ---DATA ENTRY FOR IRREGULAR CHANNEL WATER SURFACE PROFILE--- PAGE 5

    HYPRAULIC ENERGY BALANCE LOCATION 1 OF 5:

    Enter (FEET) from cross-section 1 to where energy balance is to be made ===> :ALLOWABLE VALUES ARE [ 1.00J TO [ 495.00]

    LOCATION HYDRAULIC ENERGY BALANCE DISTANCES

    [ ]

    [ J [ ]

    [ J [ J [ J [ J [ J [ J [ J

    "DIST(I)"

  • 44 Hydraulic Elements "

    PROGRIIM 1

    C ----------------------------------------------------------------_______ _ SUBROUTINE PROFIE(YCON,IERR)

    C ----------------------------------------------------------------_______ _ C

    c

    c

    C

    c C

    COMMON /NUT/NUT COMMON/MISC/IFF

    COMMON/BLKl/X(50,20) ,Y(50,20) ,NFL(50) ,M(50) COMMON/BLK2/DISTS(50) ,ALPHA(50) ,XMAN(50) ,EDDY(50) COMMON/BLK3/TOL,QQ,N,DIST(200),NE,KMODEL

    NUT = 6

    OPEN 5, "PROF. OAT" OPEN 6, "PROF.ANS"

    C READ DATA INPUT

    c

    READ FREE (5) N,QQ,TOL,YCON KMODEL=1 IF(TOL. LT. 0) KMODEL=2 IF(TOL.LT.O)TOL = TaL *(-1)

    DO 10 l=l,N READ FREE (5) M(I) ,XMAN(I) ,ALPHA(I),EDDY(I) ,DISTS(I) MM=M(I) DO 20 J=l,MM READ FREE (5) X(I,J),Y(I,J)

    20 CONTINUE 10 CONTINUE c

    30 C C END C

    C

    C C

    READ FREE (5) NE DO 30 I=l,NE READ FREE (5) DIST(I) CONTINUE

    OF INPUT

    CALL PROF5(NU~,YCON) CALL PROF6 (NUT) CALL PROF2(NUT,YCON)

    RETURN END

    C ------------------------------------------------------------------------SUBROUTINE PROF2(NT,YCON)

    C ------------------------------------------------------------------------C

    C C

    CHARACTER*1 NOTE,IST,BLANK,ITYPE CHARACTER*l IFF CHARACTER*30 MODEL,MODELl,MODEL2,BUFF*7 COMMON/TEXTF/NOTE,BLANK,IST(26) ,IWT(12) ,IWTS(5) COMMON/BLK 1/X(50,20) ,Y(50,20),NFL(50),M(50) COMMON/BLK 2/DISTS(50) ,ALPHA(50) ,XMAN(50),EDDY(50) COMMON/BLK 3/TOL,Q,N, DIST (200.) ,NE, KNODEL COMMON/MIse/IFF

  • C C

    C

    C C

    C

    DATA MODEL1/' *~ SUBCRITICAL FLOW MODEL** 'I, MODEL2/'** SUPERCRITICAL FLOW MODEL **'1

    IFIRST=O ICOUNT=l DCON=YCON ITYPE=BLANK

    MODEL = MODELl IF(KMODEL.EQ.2) MODEL = MODEL2

    IF(KMODEL.EQ.2)GO TO 201

    Hydraulic Elements II 45

    C SUBCRITICAL FLOW

    C C

    CALL PROF4(0,YC,YN,J,K,NT,A,V,R,FR,ERROR) I1'(YC.GE.YCON) DCON=YC IF(YC.GE.YCON) I TYPE=NOTE IF(YC.GE.YCON)GOTO 10 CALL PROF3(l,YCON,A,V,P,DH,TW,R,FR,1.,XPM,NT,ERROR) GO TO 10

    C SUPERCRITlCAL FLOW C 201 CONTINUE.

    C

    C

    C C 10 1000

    1001

    1002

    1010

    1003

    C

    c c c

    c

    CALL PROF4(1000,YC,YN,J,K,NT,A,V,R,FR,ERROR)

    JY = NFL(N) YMINE = Y(N,JY) DMIN = YCON-(YMINE + .05) I1'(DMIN .LT. 0.) YCON = YC

    IF(YCON.GE.YC) DCON = YC I1'(YCON.GE.YC) ITYPE = NOTE IF(YCON.GE.YC) YCON = YC I1'(YCON.GE.YC) FR = 1. CALL PROF3(N,YCON,A,V,P,DH,TW,R,FR,1.,XPM,NT,ERROR)

    WRITE (NT,lOOO) IFF FORMAT(lX,Al,I,50X,'CUT ALONG OUTSIDE BORDER* *',1, 76X,'*',1,76X,'V') WRITE (NT, 1001) FORMAT (lOX, '+' ,109('-'), '+') WRITE(NT,l002)MODEL FORMAT (2 (lOX, ' I ' , 109X, ' I ' ./) , lOX, ' I ' ,39X,A3 0,4 OX, , I ' ,I, lox,'I*** IRREGULAR CHANNEL WATER SURFACE PROFILE ANALYSIS *~*' 3X,'copyright 1983,86,87 Advanced Engineering Software', '1',/, lOX,' I Standard step Method irre9ular channel', , analysis. Based on development in "OPEN CHANNEL' , HYDRAULICS",CHOW(1959) I') WRITE(NT,lOlO)Q FORMAT(lOX,'1 STUDY NAME:',46X,'Channel Flow = ',F9.2,' cis', 4X,'PAGE NUMBER:',4X,'I') WRITE (NT ,1001) WRITE (NT, 1003) FORMAT(lOX,'1 LENGTH I WATER I FLOW I FLOW I FLOW I "

  • 46 Hydraulic Elements II

    , 2 I TOTAL I HYDR I FRICTION I AVERAGE I REACH", 'LOSS!EDDYI TOTAL! 1',/,lOX,' from ISURFACEI" 'DEPTH AREA I v aV /2g HEAD RADIUS I SLOPE " , REACH I LENGTH I Hf ILOSS HEAD Fr 1',/,

    c c C C C C

    lOX,' I CONTROL I (elev.) I (ft) (ft*ft) I (fps) I (ft) I (ft) , (tt) I Sf I Sf I Cft) I (ft) I (ft) I (ft) I WRITE(NT,l004)

    I ' , I ' )

    FORMAT(10X,'I-------------------------------I" C '------,--~-----,------I--------,--------I------ " C '-----1----1--------1-----1')

    1004

    C . USE KINGS HANDBOOK(S-136) FORMULA C

    C

    c

    c

    1005 C C

    13

    131

    14 C 151 C

    141 C

    78 79 C 17

    C

    ITEMP~l

    IF(KMODEL.EQ.2)ITEMP ~ N

    S~XMAN(ITEMP)*XMAN(ITEMP)*V*V/2.2082/R**1.3333 AHV~ALPHA(ITEMP)*V*V/64.4

    HVA = AHV HVB ~ O. EDA ~ EDDY(ITEMP) EDB ~ o.

    Hl~DCON+AHV

    H2=Hl NODE~NFL(ITEMP) YY~DCON-Y(ITEMP,NODE) WRITECNT,1005)DISTS(1),DCON,YY,A,V,AHV,Hl,R,SF,H2,ITYPE,FR FORMAT (lOX, , I 'F7 .1, , I ' , F7 a 2, I I ' I F5. 2, , I ' I F7 .. 1, , I ' , F5.2,'I',F6.3,'I',FS.3,'1 ',F6.2,'I',F8.6,'1 I', , , , ",FS.3,"',Al,F4.2,'I') DO 13 IJ~l, 5 IWTS (IJ)~BLANK DO 131 IJ~1,12 IWT(IJ)=BLANK IF(ERROR.EQ.O.)GOTO 151 DO 14 IJ~1,5 IWT(IJ)~IST(IJ)

    CONTINUE

    DO 141 IJ~6, 12 IWT(IJ}=IST(lO+IJ}

    DO 78 IJ=1,5 IWTS(IJ)=IST(IJ+IO) IFIRST=IFIRST+l

    NTEM~l IF(KMODEL.EQ.2)NTEMP = N

    WRITE (NT, 1011) (IWT(IJ),IJ=6,10) ,NTEMP,(IWT(IJ),IJ=1,5), ALPHA(NTEMP),XMAN(1),(IWTS(IJ),IJ=1,5)

    1011 FORMAT (lOX, 'I , ,5Al,I2,' I' ,lX,SAl,lX,' I '5X,' I' ,7X,'I' ,5X,' Ja=', C F4 .. 2,' I' ,8x,'I' ,6X,' In=' ,F6.4,'!' ,8X,' I' ,6X r '!', C 5X,' I ' , 4X, , , ' , ax, , I ' , 5Al , , I ')

    WRITE (NT, 1004) c . INITIALIZE SFI

    SFl=SF c

  • Hydraulic Elements II 47

    C . MAIN LOOP C

    c

    c

    c

    c

    c

    C

    00 100 Llrl,NE

    L=LL IF (KMODEL.EQ.2) L = NE-LL+l

    CALL PROF4{L,YC,YN,J,K,NT,A,V,R,FR,ERROR) YMIN~YC

    YMAX=YC+250.

    R=(DIST(L)-DISTS(J/(DISTS(K)-DISTS(J Rl=L-R JFL=NFL(J) KFL=NFL(K) YMINJ=Y(J,JFL) YMINR=Y(K,KFL) VFL=R*YMINK+Rl*VMINJ

    IF(KMODEL.EQ.2} YMIN = .01 + YFL IF (KMODEL.EQ.2) YMAX ~ YC

    C ....... ESTlMATE SECTION BANK-ELEVATIONS XLBNK=R*Y(K,l)+Rl*Y(J,l) MMJ=M(J)

    C C

    C

    C

    c

    c

    c

    c

    MMK=M(K) XRBNK=R*Y (K,MMK)+Rl*Y (J,MMJ)

    DO 50 LLL=1,18 YTEST-.5*(YMIN+~) DY=YTEST-YFL YJ=YMINJ+DY Y}(~YMINK+DY

    CALL PROF3 (J, YJ, AJ, V, PJ ,DHJ, TWJ, XR, FR, 1. ,XPMJ, NT, ERROR) CALL PROF3(K,YK,AK,V,PK,DHK,TWK,XR,FR,1.,XPMK,NT,ERROR) A=R*AK+Rl*AJ

    YBARA = R*XPMK + R1*XPMJ

    V=Q/A AL=R*ALPHA(K)+R1*ALPHA(J) XN=R*XMAN(K)+Rl*XMAN(J) AHV=AL*V*V/64.36

    XPM = (0/32.18 * QlA + YBARA) * 62.4 RYB = AHV TW=R*TWK+Rl*TWJ P=R*PK+R1*PJ RH=A/P DH=A/TW SF=XN*XN*V*V/2.22/RH**1.3333 DX=DIST(l) IF(L.GT.l)DX=DIST(L)-DIST(L-l)

    IF(KMODEL.EQ.2) DX = DISTS(N) - DIST[NE) IF{KMODEL.EQ.2 .AND. LL.GT.l)DX = DIST(L+l) - DIST(L)

  • 48 Hydraulic Elements II

    C

    C

    C

    C

    SFM=. 5* (SFl+SF) HF=DX*SFM

    EDB = R*EDDY(K) + Rl*EDDY(J) ED = .5* (EDA+EDB)

    HE = ED*(ABS(HVB - HVA IF(KMODEL .EQ. 2)GO TO 51

    H2T=H2+HE+HF H1T=YTEST+AHV IF(H2T-HIT)30,60,40

    30 YMAX=YTEST GOTO 50

    40 YMIN=YTEST C C

    GO TO 50 51 CONTINUE

    C

    H2T = H2-HE-HF HIT = YTEST + AHV IF(H2T - H1T)511,60,513

    511 YMIN = YTEST GO TO 50

    513 YMAX = YTEST C 50 CONTINUE 60 H1=H1T

    H2=Hl C .... OUTPUT RESULTS

    00 61 IJ=1,5 61 IWTS (IJ) =BLANK

    00 611 IJ=1,12 611 IWTCIJ)=BLANK C

    C C

    BUFF = ,

    IF(YTEST.LT.XLBNK.AND.YTEST.LT.XRBNK)GOTO 70 DO 62 IJ=1,5

    62 IWT(IJ)=IST(IJ) 70 CONTINUE

    c

    c

    C C

    C C

    FR=SQRT(AL*V*VjDHj32.18)

    HVA = HVB EDA = EDB SF1 = SF

    ITYPE=BLANK TEST=ABS (1. -FR) IF(TEST.LT .. 01)ITYPE=NOTE

    IFCKMODEL.EQ.1 .AND. YN.GT.YC)GO TO 77 IF(KMODEL.EQ.2 .AND. YN.LT.YC)GO TO 77 IF(KMODEL.EQ.2) GO TO 751

  • DO 75 IJ=1,5 75 IWTS(IJ)=IST(IJ+5) C C

    GO TO 753 751 CONTINUE

    DO 752 IJ=1,5 IWTS(IJ) = IST(22+IJ)

    752 CONTINUE 753 CONTINUE 77 CONTINUE C

    XDISTL = DIST(L) IF(KMODEL.EQ.2) XDISTL = DISTS(N) - XDISTL

    c

    Hydraulic Elements 11 49

    WRITE(NT,1006)XDISTL,YTEST,DY,A,V,AHV,H1,RH,SF,SFM,DX,HF, HE,H2T,ITYPE,FR

    C 1006 FORMAT (lOX, , I ' , F7 .1, , I' , F7 .2, , I' , F5. 2, , I ' , F7 1, , I' ,

    C F5. 2, , /' , F6. 3, ' I ' ,Fa. 3, , / ' , F6. 2, ' I' , F8 .6, , I ' ,Fa. 6, ' I' , C F6.1,' ',F5.2,' ',F4.2,' ',Fa.3,t ',Al,F4.2,'I')

    C ... SEE IF LOCATION =CROSS-SECTION IF(DIST(L).EQ.DISTS(J).OR.DIST(L).EQ.DISTS(KGOTO 82 GOTO 85

    C 82 DO 83 1J=6,12 83 IWT(IJ)=IST(10+IJ)

    IF(DIST(L) .EQ. DISTS(J ISEC = J IF(DIST(L) .EQ. DISTS(K ISEC = K WRITE (BUFF, 95) (IWT (IJ) ,IJ=6, 10) ,ISEC

    95 FORMAT (5A1, 12) C 85 CONTINUE C C

    1012

    C

    WRITE (NT, 1012) BUFF, (IWT(1J),1J=1,5),L, C AL,XN,XPM,ED,(IWTS(IJ),IJ=1,5)

    FORMAT (lOX, , I' ,A7,' I' ,IX,5A1,lX"I' ,'EB' ,13,' I' ,7X,' 1',5X, 'Ia=', C F4.2,' I' ,ax,' I ' ,6X, I In=' ,F6 .. 4, I , ,'P+M=',Fll.2,' I' ,5X, C 'e=', F5. 3, 7x,'I' I 5Al, '-1')

    WRITE (NT, 1004) C . PAGE COSMETICS

    ICOUNT=ICOUNT+1 IF(ICOUNT.LT.13)GOTO 100 WRITE (NT, 1001)

    C

    IF(KMODEL.EQ.1 .AND. L.EQ.NE)GO TO 200 IF(KMODEL.EQ.2 .AND. L.EQ.I )GO TO 200

    WRITE(NT,IOOO) IFF WRITE (NT, 1001) WRITE(NT,1002) WRITE(NT,lOlO)Q WRITE (NT, 1001) WRITE (NT, 1003) WRITE (NT, 1004) ICOUNT=O

    100 CONTINUE C

    NREM=13-ICOUNT

  • 50 Hydraulic Elements II

    1007

    lS0

    200

    2000 C

    C C

    C C

    DO 150 Ks 1,NREM WRITE(NT,1007) WRITE(NT,1007) FORMAT(10X,'I' ,7X, 'I' ,7X,' I' ,5x,'I' ,7X,' I' ,5X,' I' ,6X, 'I ',ax,'I' ,6x,'1 ',8x,'I' ,8x,'I',6x,'I' ,5X,'!' ,4X, 'I', ax, ' 1 ' , SX, 'I ' ) WRITE(NT,1004) CONTINUE WRITE(NT,1001) CONTINUE WRITE (NT, 2000) FORMAT(/)

    RETURN END

    C ------------------------------------------------------------------------SUBROUTINE PROF3(L,YDEPTH,A,V,P,DH,TW,R,FR,S,XPM,NT,ERROR)

    C ------------------------------------------------------------------------C c

    C C

    COMMON/BLK 1/X(50,20),Y(50,20),NFL(SO) ,M(SO) COMMON/BLK 2/DISTS(50),ALPHA(SO),XMAN(50),EDDY(SO) COMMON/BLK 3/TOL,Q,N,DIST(200),NE,KMODEL

    HYPOT(B,C)=B*B)+(C*C.*.S ERRORsO. YBARA = O. XPM= O. I=L p==o. VsO. TW=O. A=O. KKsM(I)-l DO 200 J s 1,KK IFYDEPTH.LE.Y(I,J .ANU.(YDEPTH.LE.Y(I,(J+1GOTO 200 XDIF=X(I,(J+1-X(I,J) YDIFsY(I, (J+1-Y(I,J) IF(YDIF)150,1S0,160

    1S0 YDIF=-YDIF YUP=OY (I ,J) YLOW-Y(I, (J+1 GOTO 170

    160 yUP=oY(I,(J+1 YLOW=Y(I,J)

    170 TEMP=oYUP-YDEPTH

    C

    IF(TEMP.LE.O.)GOTO 155 GOTO 16S

    155 AA=(ABS(YDEPTH-YUP)*XDIF)+(,S*XDIF*ABS(YDIF C

    C

    C

    PP=HYPOT (XDIF, YDIF) TWTW=XDIF

    DYBARA = .5*(YDEPTH-YUP} * (YDEPTH-YUP) * XDIF + (ABS(YDEPTH-YUP) + ABS(YDIF)/3.) * .S*XDIF*ABS(YDIF)

  • GOTO 198 C 165 IF(ABS(YDIF).LT 002)GOTO 155 C

    C

    C

    YDEEP=YDEPTH-YLOW TWTW=XDIF*(YDEEP/YDIF) AA=.5*YDEEP*TWTW PP=(YDEEP/YDIF)*HYPOT(XDIF,YDIF)

    DYBARA - (YDEEP/3.)*AA

    198 A=A+AA

    c

    C

    P=P+PP TW=TW+TWTW

    YBARA = YBARA + DYBARA

    200 CONTINUE C

    C C

    IF(P.LE 01)WRITE(NT,220)

    Hydraulic Elements II 51

    22D FORMAT(lX,'NOTE: FLOW DEPTH ESTIMATE OF WETTED PERIMETER "

    C C

    C

    .'IS LESS THAN .DOl',/lX, 'SUGGEST: (1) ADDING MORE ENERGY BALANCE LOCATIONS' ,I1X, .' (2) CHECKING CROSS-SECTION DATA' ,/lX, .'NOTE: WETTED PERIMETER SET TO .01 FEET.')

    IF(P.LE 01) P =.01

    R=A/P V=QjA DH=A/TW FR=SQRT(ALPHA(I) *V*V/32. 18/DH) XPM = YBARA

    180 CONTINUE C CHECK FOR OVERFLOW

    KK=KK+l C C ERROR=l => FLOW ABOVE CHANNEL CONFINES C

    C C

    C C

    IF(YDEPTH.GT.Y(I,l).OR.YDEPTH.GT.Y(I,KKERROR=l.

    RETURN END

    C ------------------------------------------------------------------------

    c C C C C C C C

    SUBROUTINE PROF4(I,YC,YN,J,K,NT,A,V,RH,FR,ERROR) ------------------------------------------------------------------------

    DETERMINES DC AND DN SECTIONS "J" AND "K"

    ELEVATION AND SURROUNDING

    I IS INDEX TO ENERGY-BALANCE LOCATION 1=0 IMPLIES CONTROL SECTION ANALYSIS

    C ... FIND J AND K:

  • 52 Hydraulic Elements II

    c

    c c

    c

    C

    c

    COMMON/BLK 1/X(50,ZO) ,Y(50,ZO) ,NFL(50) ,M(50) COMMON/BLK 2/DISTS(50) ,ALPHA(50) ,XMAN(50) ,EDDY(50) COMMON/BLK 3/TOL,Q,N,DIST(200),NE,KMODEL

    DD~.Ol

    L=2 IF(I.EQ.O)GOTO 15

    DO = DISTS(N) - .01 L=N IF(I .EQ. 1000)GO TO 15

    IF(I.GT.O)D~DIST(I)

    DO 10 L=l,N IF{DD.GT.DISTS(LGOTO 10 GOTe 15

    10 CONTINUE 15 J=L-l

    K=L C . GET LENGTH RATIO R

    R=(DD-DISTS(J/(DISTS(K)-DISTS(J Rl=l.-R .

    C . FIND YC

    C

    C

    C

    C

    JFL=NFL(J) KFL=NFL(K) YMINJ=Y(J,JFL) TI'lINK=Y(K,KFL) YMIN=R*TI'lINK+Rl*YMINJ YFL=YMIN

    YMAX=YMIN+250.

    AL=R*ALPHA(K) +R1*ALPHA (J)

    DO 100 1.=1,18

    YTEST=.5*(YMIN+YMAX) DY=YTEST-YFL YJ=YMINJ+OY YK=YMINK+DY CALL PROF3(J,YJ,AJ,V,PJ,DHJ,TWJ,XR,FR,1.,XPM,NT,ERROR) CALL PROF3(K,YK,AK,V,PK,DHK,TWK,XR,FR,1.,XPM,NT,ERROR) A=R*AK+R1*AJ TW=R*TWK+R1*TWJ P=R*PK+Rl"PJ RH=A/P DH=A/TW V=QjA FR=(AL*V*V/32.1B/DH) IF(FR-l.)20,12D,40

    20 YMAX=YTEST GOTO 100

    40 YMIN=YTEST 100 CONTINUE 120 YC=YTEST

    FR-SQRT(FR) C ... GET YN

  • C C

    XN=R*XMAN(K)+Rl*XMAN(J) SLOPE=(YMINK-YMINJ)/(DISTS(K)-DISTS(J YN=O. IF(I.EQ.O)GOTO 300

    IF (SLOPE. LT 00001)WRITE(NT,77)

    Hydraulic Elements II 53

    77 FORMAT(5X,'CHANNEL SLOPE ASSUMED AT PROGRAMMED DEFAULT VALUE', , OF .00001')

    C C

    c

    C

    IF(SLOPE .LT 00001)SLOPE = .00001

    FACT=1.486/XN*SQRT(SLOPE) YMIN=R*YMINK+Rl*YMINJ

    YMAX=YMIN+250.

    DO 200 L=1,18 YTEST=.5*(YMIN+YMAX) DY=YTEST-YFL YJ=XMINJ+DY YK=YMINK+DY CALL PROF3(J,YJ,AJ,V,PJ,DHJ,TWJ,XR,FR,1.,XPM,NT,ERROR) CALL PROF3(K,YK,AK,V,PK,DHK,TWK,XR,FR,1.,XPM,NT,ERROR) A=R*AK+Rl*AJ P=R*PK+Rl*PJ RH=A/P QTEST=FACT*A*RH**.6667 IF(QTEST-Q)150,220,180

    150 YMIN=YTEST GOTO 200

    180 YMAX=YTEST 200 CONTINUE 220 YN=YTEST 300 CONTINUE C

    C C

    RETURN END

    C ------------------------------------------------------------------------SUBROUTINE PROF5(NT,YCON)

    C ------------------------------------------------------------------------C C

    C COMMON/BLK 3/TOL,Q,N,DIST(200) ,NE,KMODEL

    WRITE (NT, 10) . 10 FORMAT(16X,'IRREGULAR CHANNEL WATER SURFACE PROFILE ANALYSIS',

    ///5X,'study Name:',39('_'),4X,'Page Number ____ ') WRITE(NT,ll)

    11 FORMAT(//5X,'The following study is based on the well known " .'STANDARD STEP METHOD to',/5X, 'analyse gradually varied flow in an irregular channel. Energy-', 'head' ,/5X, .'losses and corresponding notation used in the program are as " 'follows: ',/10X, 'FRICTION LOSSES: . n Mannings friction factor',/lOX, . 'EDDY LOSSES: e eddy loss coefficient',/lOX, . 'KINETIC ENERGY',/lOX,

  • 54 Hydraulic Elements II

    .'CORRECTION FACTOR: a = correction factor') WRITE (NT, 15)

    15 FORMAT(/5X,'The PROGRAM determines gradually varied flow water', .' surface elevations',/5X, .'by balancin9 the classical energy equation between user-', .'specified',/5X, .'''energy balance" locations. All geometric and parameter infor', 'mation is' ,/5X, .'averaged between defined channel cross-sections by straight " 'line' ,/5X, .'interpolation.')

    WRITE (NT, 20) 20 FORMAT (J5X, 'THE ONLY LOSSES INCLUDED ARE FRICTION AND EDDY',

    .'LOSSES. The analysis' ,/5X,

    .'formulation and presentation of results follow the develop', 'ment given in' ,/5X, '''OPEN CHANNEL HYDRAULICS", by Chow(1959). ')

    WRITE(NT,25) 25 FORMAT(/5X,'The PROGRAM will default to a flow-depth of CRIT',

    .'ICAL DEPTH whenever the',/5X,

    .'flow regime changes between SUBcritical and SUPERcritical flow',

    .' (or vice',/5X,

    .'versa). Therefore, supercritical water surface information is I, 'not' ,/5X, .'computed in a subcritical flow model; nor is subcritical water', .' surface' ,/5X, . 'information developed in a supercritical flOW model. In a " 'subcritical' ,/5X, , 'flow model where flow may be supercritical, critical depth is', .' assumed' ,/5X, .'as a minimum flow depth which exceeds the actual supercritical', ./5X,'flowdepth in the channel. Similarly in a supercritical ' .'flow model',/5X, .'critical depth is assumed as a maximum flow depth. Conse', 'quently,' ,/5X, .'rapidly varied flow effects, hydraulic jumps, and transitions', .' between' ,/5X, .'flow regimes ARE NOT INCLUDED in the PROGRAM.')

    WRITE(NT,30)Q,N,NE 30 FORMAT (/5X, 'For thiQ ~tudy, tho following information is used:',

    ./IOX,'Channel flow(cfs) = ',F8.1,/IOX,

    .'Number of channel cross-sections = ',I2,/10X,

    .'Number of Energy-Balance locations = ',12) IF(KMODEL.EQ.l)WRITE(NT,32)YCON IF (KMODEL.EQ. 2) WRITE (NT, 33)YCON,N

    32 FORMAT(/5X,'COMPUTER RESULTS are based upon SUBCRITICAL flow' .'model with assumed',/5X, .'control water surface elevation(feet) = ',F8.2,' at " .'Cross-section I')

    33 FORMAT(/5X,'COMPUTER RESULTS are based upon SUPERCRITICAL flow', .' model with assumed' ,/5X, .'control water surface elevation(feet) = ',F8.2,' at ' .'cross-section '(12)

    WRITE(NT,40) 40 FORMAT (/5X, 'Special notation given in the computer results are',

    .' as follows:' ,/lOX,

    .'(1) SECT the section number appears in the first column',

    ./23X,'whenever the energy-balance channel location occurs',

    ./23X 'at one of the defined channel cross-sections. ',/lOX,

    .'(2) 'FLOOO .... this word appears in the second column whenever I

  • C C

    C C

    Hydraulic Elements II 55

    .'the',/23X,'estimated flowdepth exceeds either bank of the',/23X,

    .'channel section.',/lOX,

    .'(3) EB the energy balance number is listed in "

    .'column 3.