Skip to main content

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

ASTM E1049-85(2017) Rainflow Counting Example
Refer to Astm e 1049 85 standard practice for cycle counting in fatigue analysis

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

hlrainflow-0.0.3.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

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

hlrainflow-0.0.3-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file hlrainflow-0.0.3.tar.gz.

File metadata

  • Download URL: hlrainflow-0.0.3.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.13

File hashes

Hashes for hlrainflow-0.0.3.tar.gz
Algorithm Hash digest
SHA256 f3582ccc31778f637f075506414e82af0375fcf289e794b95c44cf4eabe24ae4
MD5 667c12d135ebd12464392243ca8157d0
BLAKE2b-256 733fddee6736620dff4ab344fa8d60df759bbb8d18915aefec4dba467e460106

See more details on using hashes here.

File details

Details for the file hlrainflow-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: hlrainflow-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.13

File hashes

Hashes for hlrainflow-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 5e2a80ed2cb89eb2ca1561bdf4c8d155e8d3349867a33deb0b3ba5370f6463c2
MD5 3fa172429a8201084dc92934d90b4a7c
BLAKE2b-256 6358e0cefde2be9d70a3f77e7fb8eef91cce09a455b7d1ea37afa9fce469baf1

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