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

Uploaded Python 3

File details

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

File metadata

  • Download URL: hlrainflow-0.0.4.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.4.tar.gz
Algorithm Hash digest
SHA256 4c7f1ab1c17999076fe68e0d21decc1a4b6537d3145143fd687c429825c2a89f
MD5 d9e03497efeaf2e0aa7a87fd9a1a816f
BLAKE2b-256 1dfed34123fc6b91b0d9684eabdc8369dc68309e5ec9b2b66f21a8dfe978a1d8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: hlrainflow-0.0.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 5afa98c54201dcc34f1a4dd18608de198f4f2612c0b0e9691c8660c9b85ac20f
MD5 c92f83644867e74175fcdeea647e397f
BLAKE2b-256 c47ae9daf384d3aa71e183487683349e79dfdf61a61c3d3587c98b75d72e95ed

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