Learn R Programming

rivr (version 1.2-3)

compute_profile: Gradually-varied flow profiles

Description

Compute the gradually-varied flow profile of a prismatic channel.

Usage

compute_profile(
  So,
  n,
  Q,
  y0,
  Cm,
  g,
  B,
  SS,
  z0 = 0,
  x0 = 0,
  stepdist,
  totaldist
)

Arguments

So

Channel slope [\(L L^{-1}\)].

n

Manning's roughness coefficient.

Q

Flow rate [\(L^3 T^{-1}\)].

y0

The water depth at the control section [\(L\)].

Cm

Unit conversion coefficient for Manning's equation. For SI units, Cm = 1.

g

Gravitational acceleration [\(L T^{-2}\)].

B

Channel bottom width [\(L\)].

SS

Channel sideslope [\(L L^{-1}\)].

z0

Elevation reference datum at control section [\(L\)]. Default is 0.

x0

Distance reference at control section [\(L\)]. Default is 0.

stepdist

The spatial interval used in the Standard step method [\(L\)].

totaldist

The total distance upstream (or downstream) to compute the profile [\(L\)].

Value

data.frame with columns:

x

Along-channel distance.

z

Elevation.

y

Flow depth.

v

Flow velocity.

A

Flow area.

Sf

Friction slope.

E

Total energy.

Fr

Froude Number.

Details

Computes the longitudinal water surface profile of a prismatic channel using the standard step method by solving the non-linear ODE $$\frac{dy}{dx} = \frac{S_0 - S_f}{1 - Fr^2}$$ The standard-step method operates by stepping along the channel by a constant distance interval, starting from a cross-section where the flow depth is known (the control section). The flow depth is computed at the adjacent cross-section (target section). The computed value at the target is then used as the basis for computing flow depth at the next cross-section, i.e. the previous target section becomes the new control section for each step. A Newton-Raphson scheme is used each step to compute the flow depth and friction slope. Technically, the average friction slope of the control and target section is used to compute the flow depth at the target section.

Examples

Run this code
# NOT RUN {
# example M1 profile
compute_profile(0.001, 0.045, 250, 2.7, 1.486, 32.2, 100, 0, stepdist = 10, totaldist = 3000)
# example M2 profile
compute_profile(0.001, 0.045, 250, 0.64, 1.486, 32.2, 100, 0, stepdist = 10, totaldist = 3000)
# example S2 profile
compute_profile(0.005, 0.01, 250, 2.65, 1.486, 32.2, 10, 0, stepdist = 10, totaldist = 2000)
# example S3 profile
compute_profile(0.005, 0.01, 250, 0.5, 1.486, 32.2, 10, 0, stepdist = 10, totaldist = 2000)
# }

Run the code above in your browser using DataLab