Physics-informed fatigue-life prediction library with FEA ingestion, proprietary data validation, ML, SHAP, FastAPI, Docker, and CI/CD.
Project description
PyFatiguePro
Physics-informed fatigue-life prediction library for engineering and aeroengine alloys.
PyFatiguePro combines classical fatigue mechanics, FEA result ingestion, proprietary experimental data validation, machine learning, SHAP explainability, uncertainty estimation, REST API deployment, Docker, tests, and CI/CD.
Features
- Basquin S-N high-cycle fatigue model
- Coffin-Manson strain-life low-cycle fatigue model
- Paris Law crack-growth integration
- Goodman and Gerber mean-stress corrections
- Von Mises multiaxial stress calculation
- FEA CSV ingestion from Abaqus/ANSYS-style exports
- FEA hotspot feature extraction
- Proprietary-data validation and anonymization
- Dataset provenance registry
- Scalable ML training using Random Forest / HistGradientBoosting / GPR
- Batch prediction for large CSV files
- Uncertainty estimation
- SHAP explainability support
- Sensitivity analysis
- FastAPI REST API
- Docker deployment
- GitHub Actions CI/CD
Data disclaimer
This package does not ship proprietary or unpublished fatigue datasets. It provides safe workflows to validate, anonymize, and train models on your own internal/proprietary fatigue-test data.
Synthetic examples are demonstration-only and must not be advertised as physical-test validation.
Installation after PyPI upload
pip install pyfatiguepro
Local development install
pip install -e ".[dev,explain]"
Quick example
from pyfatiguepro.core import fit_basquin, basquin_life
stress = [760, 700, 650, 600, 550]
cycles = [1e4, 3e4, 8e4, 2e5, 7e5]
fit = fit_basquin(stress, cycles)
print(fit)
predicted = basquin_life(625, fit["sigma_f_prime"], fit["b"])
print(predicted)
Train demo model
python examples/train_demo.py
This creates model.joblib.
Run API
uvicorn pyfatiguepro.api:app --host 0.0.0.0 --port 8002
Open:
http://127.0.0.1:8002/docs
Docker
docker build -t pyfatiguepro .
docker run -p 8002:8002 pyfatiguepro
PyPI upload
python -m pip install --upgrade build twine
python -m build
twine check dist/*
twine upload --repository testpypi dist/*
twine upload dist/*
After successful real PyPI upload:
pip install pyfatiguepro
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
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 pyfatiguepro-0.1.0.tar.gz.
File metadata
- Download URL: pyfatiguepro-0.1.0.tar.gz
- Upload date:
- Size: 12.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
abe96e106ec7618703259e4c9df6aa3d91f85188ddede6cd500533e45c8add36
|
|
| MD5 |
e2f89272b549a13efe7e4bf3843c0e4c
|
|
| BLAKE2b-256 |
b253557d7bc2fb71b4e013ed198f32986e2efa6ca31152680d66db50430d0735
|
File details
Details for the file pyfatiguepro-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pyfatiguepro-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
56256cef488674eb323895c4cc9d70268a2280a58310cdf195d804def57db736
|
|
| MD5 |
b38b1e0a5171cdbb9e30ce971419b9de
|
|
| BLAKE2b-256 |
0dfc12a099be7f38ae5a213da09174b8949e012f459ae444fb1e6aaf46c4f09d
|