The input data frame with the pipe data must contain a pipe ID column with
the pipe numbers used in the loops input list. There are three options for
input column of the pipe roughness data frame:
Column Name | Approach for Determining K |
ks | f calculated using Colebrook equation, K using Darcy-Weisbach |
f | f treated as fixed, K calculated using Darcy-Weisbach |
K | K treated as fixed |
In the case where absolute pipe roughness, \(ks\) (in m or ft), is input,
the input pipe data frame must also include columns for the length, \(L\) and
diameter, \(D\), (both in m or ft) so \(K\) can be calculated. In this case,
a new \(f\) and \(K\) are calculated at each iteration, the final values of
which are included in the output. If input \(K\) or \(f\) columns are provided, values
for \(ks\) are ignored. If an input \(K\) column is provided, \(ks\) and \(f\) are
ignored. If the Colebrook equation is used to determine \(f\), a water
temperature of \(20^{o}C\) or \(68^{o}F\) is used.
The number of iterations to perform may be specified with the n_iter input
value, but execution stops if the average flow adjustment becomes smaller
than 1 percent of the average flow in all pipes.
The Darcy-Weisbach equation is used to estimate the head loss in each
pipe segment, expressed in a condensed form as \(h_f = KQ^{2}\)
where: $$K = \frac{8fL}{\pi^{2}gD^{5}}$$
If needed, the friction factor \(f\) is calculated using the Colebrook
equation. The flow adjustment in each loop is calculated at each iteration as:
$$\Delta{Q_i} = -\frac{\sum_{j=1}^{p_i} K_{ij}Q_j|Q_j|}{\sum_{j=1}^{p_i} 2K_{ij}Q_j^2}$$
where \(i\) is the loop number, \(j\) is the pipe number, \(p_i\) is the number of
pipes in loop \(i\) and \(\Delta{Q_i}\) is the flow adjustment to be applied
to each pipe in loop \(i\) for the next iteration.