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


Download files

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

Source Distribution

colebrook-0.0.5.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

colebrook-0.0.5-py3-none-any.whl (17.4 kB view details)

Uploaded Python 3

File details

Details for the file colebrook-0.0.5.tar.gz.

File metadata

  • Download URL: colebrook-0.0.5.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for colebrook-0.0.5.tar.gz
Algorithm Hash digest
SHA256 847f2ef90f9a2d612b4ce2211187faa3f4a11ce40af271e98192340df5aab487
MD5 511e14ef396f9cba6beebdbadf572dfc
BLAKE2b-256 db17cc7125ca8305f5ab7affcf9ad387c560d9bb2a726b29c37f8ce1e1a1825e

See more details on using hashes here.

File details

Details for the file colebrook-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: colebrook-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 17.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for colebrook-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 616145dc06f39629955d5add489f1818576aaa34bb56adad2f8a11bc2466856c
MD5 12b21832b450320f79436ada1ac6ecd2
BLAKE2b-256 2c53d8b7fe8e64221abd95aa3a6ac04d0212fa3907edec4ff6e2935ac273f4be

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page