Skip to main content

A small module that calculate colebrook-white approximations

Project description

colebrook.py

Current Status: Development

Version: 20190213

TABLE OF CONTENTS

TODO

  • Add further approximation functions.
  • Add warnings for parameters outside of the range for given formula.

DISCLAIMER

No guarantee of accuracy is provided, confirm results with other sources.

BACKGROUND

The Colebrook-White equation is used to solve for the Darcy Friction Factor (f) for use in the determination of friction losses in pipe and open-channel flows.

The equation is expressed in terms of:

Parameters Description
Reynolds Number A dimensionless value that describes the type of flow - As per
Pipe Relative Roughness A value which describes the roughness of the pipe material compared to its inner diameter.

This module implements various approximations of the function for use in pipe flow calculations.

HOW TO USE

USE AS MODULE

Each approximation takes the Reynolds Number and Relative Roughness as required arguments, with the number of significant figures as an optional argument, in the format of function(reynolds, relative roughness, signficant figures)

For example:

    import colebrook
    factor = colebrook.sjFriction( 60000, 0.0023)
    print(factor)

Which outputs

    0.027

USE AS STAND ALONE APPLICATION

There is also limited ability to run the script from the command line. The script will run against all available functions.

python colebrook.py <reynolds number> <roughness> [Optional Significant figures]
$ python colebrook.py 60000 0.0023
Ensure values are within range of applicability for equations (specifically around transition and laminar region)!
|METHOD          | VALUE  |
---------------------------
|sjFriction      | 0.027  |
|bntFriction     | 0.0203 |
|fngFriction     | 0.0267 |
|akFriction      | 0.0262 |
|bkcFriction     | 0.0271 |
|eptFriction     | 0.0269 |
DISCLAIMER: Use secondary verification. No guarantee of accuracy

COLEBROOK-WHITE APPROXIMATIONS

The following functions are available in this module. They have been adapted from the Wikipedia Darcy Friction Factor Formulae Table of Approximation page.

FUNCTIONAME AUTHOR YEAR VALIDITY RANGE REF
sjFriction() Swamee and Jain 1976 Re= 5000 to 10^8 and e/D = 0.00001 - 0.05 Paper
btnFriction() Bellos, Nalbantis, Tsarkris 2018 All Flow Regimes Paper
fngFriction() Fang et al. 2011 R>=2300 Paper
eptFriction() Evangelides, Papaevangelou, Tzimopoulos 2010 R>=2300 Paper
akFriction() Avci, Kargoz 2009 R>=2300 Paper
bkcFriction() Brkic 2011 R>=2300 Paper

REVISION HISTORY

REVISION DESCRIPTION
20190213 Initial Development Version

Project details


Release history Release notifications

This version

0.0.5

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for colebrook, version 0.0.5
Filename, size File type Python version Upload date Hashes
Filename, size colebrook-0.0.5-py3-none-any.whl (17.4 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size colebrook-0.0.5.tar.gz (4.3 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page