Learn R Programming

hydraulics (version 0.2.0)

manningc: Solves the Manning Equation for gravity flow in a circular pipe

Description

This function solves the Manning equation for water flow in a circular pipe at less than full. This is a modification of the comprehensive code prepared by Irucka Embry in his iemisc package. Specifically the iemisc::manningcirc function was adapted here for more limited cases commonly used in classroom exercises, additional checks were included to ensure the pipe is flowing less than full, and a cross-section figure is also available. The iemisc::manningcirc and iemisc::manningcircy sunctions were also combined into a single function.

Usage

manningc(
  Q = NULL,
  n = NULL,
  Sf = NULL,
  y = NULL,
  d = NULL,
  y_d = NULL,
  units = c("SI", "Eng")
)

Arguments

Q

numeric vector that contains the flow rate [m^3/s or or ft^3/s]

n

numeric vector that contains the Manning roughness coefficient.

Sf

numeric vector that contains the slope of the pipe [unitless]

y

numeric vector that contains the water depth [m or ft]

d

numeric vector that contains the pipe diameter [m or ft]

y_d

numeric vector that contains the ratio of depth to diameter [unitless]

units

character vector that contains the system of units [options are SI for International System of Units and Eng for English (US customary) units. This is used for compatibility with iemisc package]

Value

Returns a list including the missing parameter:

  • Q - flow rate

  • V - flow velocity

  • A - cross-sectional area of flow

  • P - wetted perimeter

  • R - hydraulic radius

  • y - flow depth

  • d - pipe diameter

  • Sf - slope

  • n - Manning's roughness

  • Fr - Froude number

  • Re - Reynolds number

  • Qf - Full pipe flow rate

Details

The possible applications of this function for solving the Manning equation for circular pipes are:

Given Solve for
y_d, Q, Sf, n d
d, Sf, Q, n y
y, d, Q, n Sf
y, d, Sf, n Q

Examples

Run this code
# NOT RUN {
#Solving for flow rate, Q: SI Units
manningc(d = 0.6, n = 0.013, Sf = 1./400., y = 0.24, units = "SI")
#returns 0.1 m3/s

#Solving for Sf, if d=600 mm and pipe is to flow half full
manningc(d = 0.6, Q = 0.17, n = 0.013, y = 0.3, units = "SI")
#returns required slope of 0.003

#Solving for diameter, d when given y_d): Eng (US) units
manningc(Q = 83.5, n = 0.015, Sf = 0.0002, y_d = 0.9, units = "Eng")
#returns 7.0 ft required diameter

# }

Run the code above in your browser using DataLab