Skip to main content

Demonstration of an orifice calculation module

Project description

Demo Orifice Calculation

A simple python package containing a single-function module which calculates the orifice diameter required to acheive a given flowrate in a pipe. The calculation itself is straightforward and serves as an example of how Python libraries could be used to manage verified and tested calculations rather than using uncontrolled and untrusted spreadsheets.

Installation

You can install this demo orifice calculation module from PyPI:

pip install demo-orifice-calc

How to use

The module can be imported into any python 3.x environment such as Jupyter. Or, using the Python interpreter:

>>> from demo_orifice_calc import orifice_calc
>>> help(orifice_calc)

As a working example if we want to find the orifice diameter required to give a 1.0 m headloss in a 300 mm diameter pipe at 100 L/s :

>>> orifice_calc(0.1, 0.3, 1.0)
0.1892662941723228

Trust

A test suite can be created to gain confidence in the validity of the results of calculation functions like this. This demo library includes one such test which can be checked by looking for the "build | passing" icon near the top of the page on GitHub. The tests can be run manually by downloading the source repo and running:

pytest

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

demo_orifice_calc-1.0.1.tar.gz (2.4 kB view details)

Uploaded Source

Built Distribution

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

demo_orifice_calc-1.0.1-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file demo_orifice_calc-1.0.1.tar.gz.

File metadata

  • Download URL: demo_orifice_calc-1.0.1.tar.gz
  • Upload date:
  • Size: 2.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2

File hashes

Hashes for demo_orifice_calc-1.0.1.tar.gz
Algorithm Hash digest
SHA256 524e63770f6053d975c9a51c981a8aca903cb47c6a9709d86e129aa8276674de
MD5 c4e2cad932aa6b94fc60e8b5d79d609a
BLAKE2b-256 5d49078965dc598c43f49c4f3da32dc3b4b7fd05b526345db32047025865ed6e

See more details on using hashes here.

File details

Details for the file demo_orifice_calc-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: demo_orifice_calc-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2

File hashes

Hashes for demo_orifice_calc-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2a25b8731571a25cf93787647edecc25189b00dcb8462bab2fdaa6d5c19883a6
MD5 7fc70e4657118384af9778f18ed54426
BLAKE2b-256 e2b23621c2e9f8f279d64cf11461af63fdb9be5da5767fde0c4c797e120793a1

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