[Next Section] [Previous Section] [Table of Contents]

Full Equations (FEQ) Model for the Solution of the Full, Dynamic Equations of Motion for One-Dimensional Unsteady Flow in Open Channels and Through Control Structures

U.S. GEOLOGICAL SURVEY WATER-RESOURCES INVESTIGATIONS REPORT 96-4240

12. Program Outline


A brief outline of the structure of the FEQ computer program is given here. The program is written in Fortran 77 with extensions limited to those supported by most compilers. FEQ is a complex computer program consisting of about 200 program units: main program, subroutines, and functions. The structure of FEQ is based on the branch and special-feature distinction used to describe the stream system. Because the structure follows that of the simulated unsteady-flow problem, addition of support for a new set of governing equations for a branch or the addition of a new special feature is straightforward.

The program structure is presented here in outline form. This outline is presented visually in figure 43 to illustrate the general computational flow in FEQ. The indentation level and the number of levels in written form give the hierarchy of the relations among program units. The names of the programs units (given in square brackets) are given with the general unit of function. Many details are suppressed here in the interest of clarity and brevity. Many program units are not listed because they are accessed at lower levels or are accessed from various parts of the program. (This is especially true of the program units used for table lookup in the various function tables.) The hierarchy of the program units and subroutines is given below:

  1. Get command-line arguments, check file names, and open the requested files. [FEQ]

  2. Read user input. [INFO, INFO1, INFO2]
    2.1 Read Run Control Block (section 13.1). [INFO1]

    2.2 Read Branch Description Block (section 13.2). [BRIN]

    2.3 Read Tributary Area Block (section 13.3), if needed. [TRIBIN]

    2.4 Read Near-Zero Depth Block (section 13.5), if needed. [NZDCON]

    2.5 Read Network-Matrix Control Block (section 13.6). [EXIN]

    2.6 Develop internal description of the stream network. [SETCON, MAKJUN]

    2.7 Check network for proper connectivity. [DMPJUN]

    2.8 Develop pattern for the Jacobian matrix and allocate matrix blocks. [MAKEMC, MAKMAT]

    2.9 Read Point-Flows Block (section 13.7), if needed. [PFIN]

    2.10 Read Wind Block (section 13.8), if needed. [INFO2]

    2.11 Read Special-Output Block (section 13.9). [OUTIN]

    2.12 Read Inflow Files Block (section 13.10). [RDFIN]

    2.13 Read Outflow Files Block (section 13.11). [WRFIN]

    2.14 Read Operation of Control Structures Block (section 13.12). [OPIN]

    2.15 Read Function Tables Block (section 13.13). [FTABIN, ATABIN, XSECIN]

    2.16 Read Free-Node Initial Conditions Block (section 13.14), if needed. [EXINIT]

    2.17 Resolve internal references and do further validity checking. [CHKBR, CHKEX, PMPCTB, CHKPT, CHKWIN]

    2.18 Do cross-section table interpolation on branches. [SCAN, MERGE, INTERP]

  3. Check geometry, if requested. [CHKGEO]

  4. Do static (once per simulation) initializations. [STINT]
    4.1 Initialize buffers for inflow files, if any. [RDINIT]

    4.2 Read optional initial conditions file. [GETIC]

    4.3 Compute initial conditions if not read from file using data input in the Backwater-Analysis Block (section 13.15). [BCKWTR]

    4.4 Set flow states in stream-system description. [SETSTA]

    4.5 Initialize Operation Control Blocks. [OPINIT]

    4.6 Initialize time-series files, if any. [READOC, BFINIT]

    4.7 Initialize output files, if any. [WROPEN]

    4.8 Write system state to file, if needed. [BWPUT]

  5. Make final check of stream system and initial conditions. [FINCHK]

  6. Do dynamic (potentially more than one per simulation) initializations. [FEQ, BWGET, SETSTA, SYSVOL, FMXMN]

  7. Select next time step. If simulation period is complete, output last time step and extreme values, and stop. [MANTIM, NWDTWT, TIMINC, RESOUT, ZSUMRY]

  8. Compute point inflow, lateral inflow, and wind stress. [LOAD, LKTSF, LKTAB, WSHEAR]

  9. Make first estimate of unknowns. [ESTBN, ESTEN]

  10. Compute and solve the linear system of equations. [CSMAT]
    10.1 Compute the Jacobian matrix and right-hand side vector. [SETEXT, SETINX, SETINW, SETICX, SETICW, CONTRL, EXCON, BDFTAB, PUMP, CBRID, ABREXP, TWOD6, TWOD14, BDFWR, MCHGAT, SIDEWR]

    10.2 Factor the Jacobian matrix. [PROFAC]

    10.3 Compute the solution. [PROSLV]

  11. Compute the corrections to the unknown flows and water-surface elevations and the convergence criteria. [CMPCOR]

  12. Apply the corrections to the unknown flows and water-surface elevations. [MAKCOR]

  13. If convergence is obtained, output values for current time step, prepare for next time step, and update extreme values. Go to step 7 for next time step. [PRTLOG, BDYFLW, CRSET2, WROUT, OPINIT, RPLSET, RSTSTA, FMXMN, RESOUT, ZSUMRY, SYSVOL, OUTSP]

  14. If convergence is not obtained, go to step 10 and repeat subsequent steps. [CSMAT]


[Next Section] [Previous Section] [Table of Contents]