5. 1D unsteady flow with width variation
5.1. Basic equations
The previous chapter described a method for calculating 1D unsteady flow when the channel width is constant in the flow direction. This section describes the case where the channel width changes in the flow direction. When the channel width is constant, the unit width discharge \(q\) is used as the discharge, but here, we use the full flow discharge, \(Q\). The equation of motion and the equation of continuity for 1D unsteady flow in a channel with a general cross section are…
Where, \(t\) is the time, \(x\) is the distance in the flow direction, \(A\) is the cross-sectional area, \(Q\) is the discharge, \(g\) is the gravitational acceleration, \(u\) is the cross-sectional average velocity, \(H\) is the water level, and \(I_f\) is the energy gradient. Equation (5.1) is an equation of continuity for when the difference in discharge between the upstream end and the downstream end is equivalent to the temporal changes in the cross sectional area. Other terms than the first term, Equation (5.2) is the equation of continuity for steady flow. The first term expresses the temporal sequence of momentum.
The above equations are applicable to any cross sectional shape. Since the final goal is to apply the equations to 1D riverbed deformation, hereinafter the cross section is treated as rectangular. This means that the relationships of
are assumed to be satisfied, where, \(B\) is the channel width, \(h\) is the water depth, and \(H=h+z_b\), \(z_b\) is the riverbed elevation.
Taking into account of that \(h\) is a function of \(x\) and \(t\), and that \(B\) is exclusively a function of \(x\), (\(B\) does not change with time), then by using the relationship of Equation (5.3), we can transform Equation (5.1) and Equation (5.2) as follows.
The left side of Equation (5.5) is expressed in a form called “the conservation form”. This makes the equation applicable to a water surface with a discontinuous profile. When the water surface has a continuous profile, in other words when \(\displaystyle{{\partial h}\over{\partial x}}\) and \(\displaystyle{{\partial u}\over{\partial x}}\) are present, then the left side of Equation (5.5) is as follows.
The equation can now be developed. Using the equation of continuity, (5.4), we transform Equation (5.5), as follows.
By applying the Manning formula to the energy gradient, \(I_f\), assuming a wide rectangular cross-section, and using the relationship of…
Equation (5.7) can be transformed as follows. Where, \(n_m\) is the Manning roughness coefficient.
The following explanations use this non-conservation form of Equation (5.9) for the equation of motion. The non-conservation form of the equation of motion cannot usually address discontinuous flow. However, as was explained in the previous chapter, Equation (5.9) can be applied to discontinuous flows, to some extent.
5.2. Preparation for applying the CIP method (the split method)
Again, the basic formulas are…
Calculate \(h\) with Equation (5.10), and \(u\) with Equation (5.11). Now, let us apply the split method to Equation (5.11). We split the equation as follows.
Note that the relationship of \(H=h+z_b\) is applied. In order to use Equation (5.11) to calculate \(u^n \rightarrow u^{n+1}\), we place \(\widetilde{u}\) in the middle, calculate \(u^n \rightarrow \widetilde{u}\) with Equation (5.12), and calculate \(\widetilde{u} \rightarrow u^{n+1}\) with Equation (5.13). Equation (5.12) includes \(h\). Therefore, when calculating Equation (5.12), Equation (5.10) must be satisfied at the same time. Let us express it \(h^n \rightarrow \widetilde{h}\). Equation (5.13) does not include \(h\). Therefore, it is impossible to relate it to Equation (5.10). For \(h^{n+1}\), \(\widetilde{h}\), the simultaneous solution to Equation (5.10) and Equation (5.12) is used as is, as follows.
The above is summarized in the table below.
Phase name |
Updating \(u\) and \(h\) |
Equation used |
---|---|---|
[A] Non-advection Phase |
\(u^n \rightarrow \widetilde{u}, h^n \rightarrow \widetilde{h}\) |
|
[B] Advection Phase |
\(\widetilde{u} \rightarrow u^{n+1}, \widetilde{h} \rightarrow h^{n+1}\) |
5.3. The non-advection phase
First, we calculate \(u^n \rightarrow \widetilde{u}\) with Equation (5.12). At the same time, we perform \(h^n \rightarrow \widetilde{h}\). Then, Equation (5.12) is expressed as follows.
Therefore, we obtain…
On the other hand, we calculate \(h^n \rightarrow \widetilde{h}\) with Equation (5.10). The following equation should be satisfied.
Therefore, simultaneous solutions to Equation (5.16) and Equation (5.17), i.e., \(\widetilde{h}\) and \(\widetilde{u}\), need to be obtained.
When the CIP method is applied to the calculation of a fluid, we use a “staggered grid”, in which the calculation points of \(u\) and \(h\) are alternatively arranged. Here, let us deploy the arrangement of calculation points shown in Figure 5.1.
Taking into account the arrangement of calculation points in Figure 5.1, the difference expression of Equation (5.16) is as follows.
Where, \(\widetilde{h_p}=[\widetilde{h}(i)+\widetilde{h}(i+1)]/2\). To substitute this into the second term on the left side of Equation (5.16), we define discharge \(Q\) that satisfies…
(the calculation points for \(Q\) are the same as those for \(u\).) Considering the arrangement of grid points, we have…
Where, \(B_u\) is the value of B at the calculation points of \(u\), and is expressed as…
The difference equation for Equation (5.17) that applies \(Q\) of Equation (5.20) is…
We can obtain \(\widetilde{h}\) from this. However, because \(\widetilde{Q}\) on the right side of Equation \(bsa_7\) includes \(\widetilde{h}\) in negative form, repetitions of calculation are required. This procedure is shown in Figure 5.2.
Once we obtain, \(\widetilde{u}(i)\) for non-advection phase, then we need to obtain \(\displaystyle{\widetilde{{\partial u}\over{\partial x}}}\) for non-advection phase. It can be obtained from the following equation, which is obtained by replacing \(f\) with \(u\) in Equation (3.38).
5.4. Advection phase
In the advection phase , the CIP method can be applied directly to Equation (5.13). Because this has been mentioned many times, here I give you only the results. They can be obtained by the following equation.
Where, \(\widetilde{u}(i)\) and \(\displaystyle{\widetilde{{\partial u}\over{\partial x}}(i)}\) are the spatial differentiation amounts of \(u\) and \(u\), respectively, in the non-advection phase. \(\displaystyle{\widetilde{{\partial u}\over{\partial x}}(i)}\) They are obtained from Equation (5.18) and Equation (5.22), respectively. \(U(X)\) is the spatial differentiation amount of \(u\) in the non-advection phase, given by the following equation.
Therefore, using \(U(X)\), \(u\) in the advection phase, is given by…
Similarly, the spatial differentiation amount of \(u\) in the advection phase is given by…
and
5.5. Summary
Flowchart Figure 5.3 summarizes the calculation of 1D free surface flow where the channel width varies in the downstream direction.
5.6. The Python code
An example of code for calculating the above 1D unsteady flow for a channel whose width varies in the longitudinal direction is below.
https://github.com/YasuShimizu/1D-Free-Water-Surface-with-Width-Variation
The files in this GitHub folder with the extension “py” are the calculation files. Of these, “main.py” files are those of the main body of the calculation code. Regarding the calculation conditions, [config.yml] is described below. Calculations can be carried out while changing the conditions by modifying the items in the comments as appropriate.
xl : 200 # channel length (m)
nx: 51 # number of grids in the x-direction
j_channel: 1 # condition of the channel (1 = constant gradient, 2 = gradient changes)
# when j_channel = 1
slope: 0.002 # entire gradient
# when j_channel = 2
x_slope : 100 # gradient changing point
slope1 : 0.001 # upstream gradient
slope2 : 0.01 # downstream gradient
xb1 : 90 # distance from the upstream end to the bump starting point (m)
xb2 : 100 # distance from the upstream end to the bump crest (m)
xb3 : 110 # distance from the upstream end to bump ending point (m)
dbed : 0. # bump height(m)
xw1 : 80 # location of channel width variation point 1 (m)
xw2 : 100 # location of channel width variation point 2 (m)
xw3 : 120 # location of channel width variation point 3 (m)
w0: 1 # channel width 1 (m) (upstream end)
w1: 1 # channel width 2 (m)
w2: 0.75 # channel width 3 (m)
w3: 1 # channel width 4 (m)
w4: 1 # channel width 5 (m) (downstream end)
qp : 1 # unit width discharge (m**2/2)
g : 9.8 # gravitational acceleration
snm : 0.025 # coefficient of roughness
alh : 0.6 # relaxation factor for water level calculation
lmax : 50 # max. replication number of water level calculation
errmax : 0.0001 # truncation error
hmin : 0.01 # min. water depth (m)
j_upstm : 2 # condition of upstream end (=wall, 2=free, 3=fixed value)
j_dwstm : 3 # condition of the downstream end
alpha_up: 1.0 # water depth at the upstream end (ratio over the neutral depth)
alpha_dw: 0.7 # water depth at the downstream end (ratio over the neutral depth)
etime : 400 # calculation end time (sec)
dt : 0.05 # calculation time step
tuk : 10 # output interval
The changes in channel width are assumed to be given by xw1, xw2, xw3, w0, w1, w2, w3, and w4. These parameters are explained in the figure below.
5.7. A calculation example
5.7.1. Example of 1D flow calculation for a straight channel with a constriction
The figure below shows the calculation results for a channel whose width is 1m except for a constriction with a width of 0.75m at the longitudinal midpoint of the channel. In this example, a “drawdown” that is lower than the water depth of uniform flow is given to the downstream edge. The figure that shows the calculation results includes the uniform flow water level and the critical water level.