A simple and efficient implementation of the Rainflow counting algorithm for fatigue analysis in Python.
Project description
HLrainflow
HLrainflow
A simple and efficient implementation of the Rainflow counting algorithm for fatigue analysis in Python.
Features
- Rainflow cycle counting for fatigue analysis
- Lightweight and dependency-free
- Supports peak-valley sequences or raw time-series input
- Easy to test and extend
Installation
You can install the package via pip:
pip install HLrainflow
Usage
from HLrainflow import rainflow
Sample1=[-2,1,-3,5,-1,3,-4,4,-2]
peak=Sample1
hl=rainflow.HL()
hl.SetPeak(peak)
halfR,halfM=hl.hloop()
print('half range=',halfR)
print('half mean=',halfM)
Example Output
half range= [4.0, 4.0, 3.0, 4.0, 8.0, 9.0, 8.0, 6.0]
half mean= [1.0, 1.0, -0.5, -1.0, 1.0, 0.5, 0.0, 1.0]
License
This project is licensed under the MIT License - see the LICENSE file for details.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hlrainflow-0.0.2.tar.gz.
File metadata
- Download URL: hlrainflow-0.0.2.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b03f366f5d0f62203f8596c606aab153b371f31d94ef7688d4666cf312eef30
|
|
| MD5 |
e8f2455a65a0f9bfc0c6ff8c1526ff0e
|
|
| BLAKE2b-256 |
1962b175033756eb51bbd192bd475a594425a24eede2f89e9813f026d6b0e7ec
|
File details
Details for the file hlrainflow-0.0.2-py3-none-any.whl.
File metadata
- Download URL: hlrainflow-0.0.2-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4cf1b32ddabf5b3c4fb4ca3bc078e94fd00170ddbd188d6ce96f2e962bdf101d
|
|
| MD5 |
79a5600e3cd640dae20c997654452d13
|
|
| BLAKE2b-256 |
f100a0a75e1ea3c761992f3f9075d740d431766d8ffa42fc76776d7234e084a7
|