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.5.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.5-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hlrainflow-0.0.5.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.5.tar.gz
Algorithm Hash digest
SHA256 dc04b2e6e798b7135794d17be0e083865653aa455983ab690aa5980cce663ad4
MD5 693fae1e855844a0e5bdfb8f5342859e
BLAKE2b-256 d3b64664c500a0808a9ae31c23c71233c51adb795aa1277d8279248f9375c41d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: hlrainflow-0.0.5-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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 67470b2636fa2cebef7aa8671b2855f91074726dc5b9f60156d1cb30645fea8c
MD5 d061d15d0bfcb6a847adc6be8fec8e78
BLAKE2b-256 c8673cb6a7b0bcd63955899188e86d40edca901726bb56f93ecf42de6e9390f9

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