colebrook: Calculates the Darcy-Weisbach Friction Factor f

View source: R/f_colebrook.R

colebrookR Documentation

Calculates the Darcy-Weisbach Friction Factor f

Description

This function calculates the Darcy-Weisbach friction factor and is only provided in this package for use with water in circular pipes while the equation is technically valid for any liquid or channel. As with many parts of this package, techniques and formatting were drawn from Irucka Embry's iemisc package, which includes some methods with similar functionality. Two utility functions are included for velocity and Reynolds Number.

Usage

velocity(D = NULL, Q = NULL)

reynolds_number(V = NULL, D = NULL, nu = NULL)

colebrook(ks, V, D, nu)

Arguments

D

numeric vector that contains the pipe diameter [m or ft] which should be D >=0.0025 m (0.0082 ft).

Q

(for velocity function only) numeric vector that contains the flow rate [m^3/s or ft^3/s]

V

numeric vector that contains the average Velocity of flow in the pipe, equal to flow divided by area, Q/A [m/s or ft/s]

nu

numeric vector that contains the kinematic viscosity of water, [m^2/s or ft^2/s]. Computed with a utility function in water_properties.R: kvisc(T=T, units=['SI' or 'Eng'])

ks

numeric vector that contains the 'equivalent sand roughness height sand roughness height. Units should be consistent with other input [m or ft]

Details

The Colebrook-White equation was developed to estimate the Darcy-Weisbach friction factor for commercial pipes under turbulent flow conditions. It is recommended for pipe diameters greater than 2.5 mm (0.1 inch). The equation is:

\frac{1}{√{f}} = -2\log≤ft(\frac{\frac{ks}{D}}{3.7} + \frac{2.51}{Re√{f}}\right)

where Re = \frac{VD}{nu} is the unitless Reynolds Number.

Value

f Returns a numeric vector containing the Darcy-Weisbach friction factor

Author(s)

Ed Maurer

See Also

kvisc for kinematic viscosity, velocity for calculating V=Q/A, reynolds_number for Reynolds number

Examples


# A Type 1 problem (solve for hf): US units
D <- 20/12   #diameter of 20 inches
Q <- 4       #flow in ft^3/s
T <- 60      #water temperature in F
ks <- 0.0005 #pipe roughness in ft

f <- colebrook(ks=ks,V=velocity(D,Q), D=D, nu=kvisc(T=T, units="Eng"))


hydraulics documentation built on Dec. 7, 2022, 1:11 a.m.