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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

Supported by

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