A program capable of evaluating the Darcy coefficient given the Reynolds number, the relative roughness and the dimensions of a pipe, factoring also different pipe geometry.
Coolebrok equation
Whilst for laminar flow it uses some simple approximated formulae, for turbulent flow the coefficient is calculated through the more complex Coolebrok equation:
where
Since it's an implicit equation, it can't be solved analytically, at least in a reasonable time span. The solution is calculated iteratively with the help of the "scipy.optimize.fsolve" function from the scipy library.