Lubepy provides a basic set of machinery lubrication calculations.
Project description
Lubepy
Lubepy is a library that provides a set of basic calculations related to machinery lubrication. It's thought to be used by machinery lubrication technicians and engineers to quickly solve urgent lubrication problems on field.
Installation
You might want to create a Python virtualenv
before you install Lubepy. If so, you can run the following commands:
$ python3 -m venv venv
$ source venv/bin/activate
(venv) $
Once you have the virtualenv
in place and activated, you can install Lubepy as follows:
On Linux systems:
(venv) $ pip install lubepy
Usage Examples
Say you need to find the viscosity index of an oil. The oil has a viscosity at 40ºC of 104.7 cSt and a viscosity at 100ºC of 13.9 cSt. You can do something like this:
from lubepy.lube.viscosity import viscosity_index
viscosity_index(104.7, 13.9)
# Output: 134
The viscosity index of an oil gives you an idea of how fast the viscosity diminishes when the temperature increases.
Now, suppose you have an oil with a viscosity index of 130 and a viscosity at 40ºC of 112 cSt. You need to know what will be the viscosity of your oil at 100ºC degrees. To solve this problem you can do something like this:
from lubepy.lube.viscosity import viscosity_at_100
viscosity_at_100(112, 130)
# Output: 14.38
Most engines work at 100ºC, so it's important to know what will be the viscosity of an engine oil at 100ºC to have an idea of how well this oil will protect your engine.
There are a lot more calculations that you can perform with Lubepy. Unfortunately, they're not documented yet. If you want to get some additional information about the calculations implemented by Lubepy, then you can do something like this:
>>> from lubepy.lube import viscosity
>>> help(viscosity)
# Output
Help on module lubepy.lube.viscosity in lubepy.lube:
NAME
lubepy.lube.viscosity - This module provides viscosity calculations.
FUNCTIONS
viscosity_at_100(viscosity40: float, index: float) -> float
Calculate the Kinematic Viscosity (KV) at 100°C.
Valid for viscosities between 2 and 500 cSt at 100°C.
viscosity_at_40(viscosity100: float, index: float) -> float
...
Authors
- Leodanis Pozo Ramos – Twitter: @lpozo78 – E-mail: lpozor78@gmail.com
- Alexis Vega Jimenez: Provided formulas and theoretical support.
Contribute to the Code
- Make a fork (https://github.com/lpozo/lubepy/fork)
- Clone your fork locally (
git clone https://github.com/your_user_name/lubepy.git
) - Create your feature branch (
git checkout -b feature_awesome_feature
) - Commit your changes (
git commit -am "Add some awesome feature"
) - Push to the branch (
git push -u origin feature_awesome_feature
) - Create a new Pull Request against the
develop
branch - Wait for code review and feedback
License
Lubepy is distributed under the GNU General Pubic License, v2. See LICENSE for more information.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file lubepy-1.0a0.tar.gz
.
File metadata
- Download URL: lubepy-1.0a0.tar.gz
- Upload date:
- Size: 19.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.8.0 tqdm/4.45.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c2720563e8aa6e1835849930a996ccebc19592933539e7d5f05da7f968ce53e |
|
MD5 | 5decd562b24ef34f028720d2f3e929a2 |
|
BLAKE2b-256 | fb3c587f7e76b009c6c69d4b3b44ff71b60e8ca64a757219975f8244edfb347b |
File details
Details for the file lubepy-1.0a0-py3-none-any.whl
.
File metadata
- Download URL: lubepy-1.0a0-py3-none-any.whl
- Upload date:
- Size: 25.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.8.0 tqdm/4.45.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5ae0baf78e4ce1e1c959b49a9ee5e7a35daa9883cdfbe8f10e8cd4d32848f124 |
|
MD5 | b09957514d6156c6f8aca2e99dc25147 |
|
BLAKE2b-256 | d879b5fe64edcee92d1c6178fe711a2987219739ba07047a4d7f1698f9be704a |