[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

10.1 Example: Single Branch


The simplest example is a single branch with an upstream boundary condition of flow as a function of time (an imposed hydrograph) and a downstream boundary condition of flow as a function of water-surface elevation (a rating curve). The example branch with a total of four nodes, two end nodes and two interior nodes is shown in figure 33. The equations describing flow paths, internal boundary conditions, and external boundary conditions placed in the matrix yielding flow and water-surface elevation throughout the stream system are input to FEQ with the Network-Matrix-Control Input (NMCI) Block (section 13.6). The description of this stream system in the NMCI Block for FEQ is the following:

[. . . , additional input values that are not needed for the discussion of this example; blanks indicate no input in these columns]

Table

Only the parts of the NMCI necessary for discussing how the Jacobian matrix is prepared (a NMCI fragment) are given above and explained below; complete details are included in " Input Description for the Full Equations Model" (section 13.6). Code 6 designates the upstream external boundary condition, and code 4 designates the downstream external boundary condition in the form of a stage-discharge relation. Code 1 denotes a branch. The important items in this discussion are the code numbers, the branch numbers, and the flow-path end node labels (section 3.2.2). The upstream boundary is node U1, and the downstream boundary is node D1. This example is the simplest possible in FEQ--at least one branch is required in any stream system. In line 3 of the NMCI fragment, the first of the two nodes given for code 4, D1, is the node defining the head (water-surface elevation) and the second node, D1, is the node defining the flow through the structure; that is, the discharge node discussed above. In this example, and in all cases at a node requiring an external boundary condition, the node for head and the node for discharge will be the same. In some important cases, however, the node for head and the node for discharge must differ at an internal boundary condition.

The nonlinear-equation system in the example consists of eight equations and eight unknowns, two unknowns for each node. The unknowns will be paired flows and water-surface heights. The water-surface elevation becomes known at a node once the water-surface height is known, so water-surface height is used in most FEQ computations on branches. The order of placing the equations in the solution matrix is important because it affects the structure of the resulting Jacobian matrix. At each time step, this matrix is computed, and the linear system of equations discussed in section 9.1 is solved. If the Jacobian matrix is arranged properly, the solution is efficient.

The equations in this example are ordered in the solution matrix with the upstream boundary equation first
(eq. 121), followed by the six equations for the three computational elements in the branch; that is, the equations for conservation of mass (eq. 68) and momentum (eq. 77) appear in pairwise order. The final equation (eq. 91) is the downstream boundary condition. This order results in a banded Jacobian matrix, a matrix in which all nonzero elements are close to the main diagonal of the matrix. The equation describing the upstream boundary only includes one of the two unknowns, Q 1 and y 1, where the nodes in this example are numbered in downstream order. The Jacobian includes the partial derivatives, F ', of the residual function of each motion equation (eqs. 68 and 77), and each external boundary condition equation (eqs. 121 and 91) with respect to each of the unknown variables. Therefore, the other seven entries in the first row of the Jacobian matrix are zero because the first equation does not include any of these other seven variables. Only four unknowns are included in each pair of equations for the computational elements, the flow and water-surface height at each node. Therefore, at most, four of the eight values in a row of the Jacobian can be nonzero. Finally, the last equation includes only the flow and water-surface height at the downstream node; thus, at most, two values can be nonzero in the last row of the Jacobian. In matrix form, the typical linear system will be similar to

(141)

Equation

The numbering for subscripts is shown in figure 33. The subscripts for the partial derivatives follow the numbers for the generic unknowns; that is, the second subscript refers to the variable involved and the first subscript to the residual-function number. The rule is simple. An odd-numbered generic unknown (variable) is always a flow, and an even-numbered variable is always a water-surface height. In the equations for a branch, the conservation of mass equation always precedes the conservation of momentum equation. One equation for each boundary condition (internal or external) will always precede the conservation equations on the branch, and one will always come after. Thus, other than the boundary equations, the equations for a branch are ordered such that an even-numbered equation is for conservation of mass and an odd-numbered equation is for conservation of momentum. For example, F ' 53 is the partial derivative of the residual function of the conservation of momentum equation in the second element taken with respect to the third variable, which is the flow at the second node.

The Jacobian matrix has a bandwidth of 5 in the example. All branches where the governing algebraic equations as given above are used will have this bandwidth. In this short branch, the Jacobian matrix has 64 elements, but only 27 (less than one-half) are nonzero. However, if 50 nodes are on the branch, then the Jacobian matrix has 10,000 elements, but only 395 are nonzero. The number of computations needed to solve a linear system with no special structure is proportional to Equation. If the system is banded, the number of computations are proportional to nem2, where m is the bandwidth. The approximate ratio of the number of computations is then proportional to
(m/ne) 2. In the current case, m = 5; with 100 equations for a 50-node branch, the ratio is 2.5 x 10 -3. Thus, the computational effort if the band structure is used is less than 1 percent of the effort if the band structure is not used.


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