Material-agnostic Low Cycle Fatigue (LCF) strain-life analysis: core library + MCP server.
Project description
lcf-strain-life
Readme | Physics Review | Agent Usage | Changelog | MIT License
An AI-agent-native toolkit for fatigue analysis of materials. It is a Python library plus an MCP server, so AI agents can run the whole analysis by calling tools.
Provide your own strain-controlled fatigue test data and get the standardized reduction, fitted material constants, life predictions, and plots. Results are reproducible and are saved for recall.
Why this exists: plenty of fatigue software exists, but none is built for AI agents to drive directly. The agent-native design over MCP is the point. Every capability is reachable through tools an agent can call.
Convention: all analysis uses true stress and true strain. Engineering input is converted at ingestion. The fatigue exponents
bandcare negative throughout.
What it does
| Stage | What happens |
|---|---|
| Ingest and normalize | raw time, strain, force plus parameters become true stress-strain |
| Cycle reduction | peak and valley per cycle, half-life cycle, cycles-to-failure N_f |
| Per-cycle metrics | stress amplitude, plastic strain amplitude, mean stress, T/C ratio, hysteresis energy |
| Strain-life fits | Basquin, Coffin-Manson, Ramberg-Osgood, transition life |
| Constant estimation | five published methods estimate the constants from tensile properties or hardness when no fatigue data exists |
| Mean stress | Morrow, modified Morrow, SWT, Walker corrections |
| Variable amplitude | rainflow, level-crossing, and peak counting (ASTM E1049), racetrack filter, spectrum life |
| Damage | Miner, DLDR, Corten-Dolan, Woehler knee variants including Haibach |
| Notch and statistics | Neuber and Glinka local strain, design curves with runout handling, outlier screening |
| High temperature | frequency-modified Coffin-Manson, time-fraction creep-fatigue |
| Provenance | every method maps to its published source through the citations registry |
| Save and recall | results persisted per test or material, recalled without recomputation, rendered as plots |
The toolkit is general purpose and material agnostic. It focuses on strain-life and per-cycle evolution, which the established stress-based high-cycle libraries such as pyLife, py-fatigue, and fatpack do not cover. It is input compatible with their pandas data shapes.
Install
python -m venv .venv
.venv\Scripts\activate # Windows
pip install -e ".[mcp,dev]"
Requires Python 3.11 or newer.
Quick start, library
import lcf
# fit strain-life constants from per-test reduced data, here SAE 1137
fit = lcf.fit_strain_life(
total_strain_amp=[0.009, 0.007, 0.005, 0.003, 0.002, 0.00175],
stress_amp=[553, 522, 464, 405, 350, 319], # MPa, half-life
reversals=[4234, 7398, 14768, 77104, 437498, 3327958],
E=208000, # MPa
min_plastic_strain=5e-4, # exclude near-runout points from the plastic branch
)
print(fit.coffin_manson.eps_f, fit.coffin_manson.c) # about 1.11, -0.62
print(fit.basquin.sigma_f, fit.basquin.b) # about 1073 MPa, -0.084
print(fit.transition_reversals) # about 22,000 reversals
Quick start, MCP server
lcf-mcp # runs the stdio MCP server
# or
python -m lcf
Register with Claude Code or Claude Desktop over stdio:
{ "mcpServers": {
"lcf": { "command": "lcf-mcp" } } }
Documentation
- docs/PHYSICS_REVIEW.md is the science-only physics record: every equation defined and cited, no software detail. docs/PHYSICS_REVIEW.pdf is the same content typeset with a reviewer sign-off table, the file to share with a materials scientist for review.
- examples/ holds runnable scripts: a strain-life fit and a machine-style CSV ingestion.
- docs/AGENT_USAGE.md describes the MCP tools and the compute, save, recall pattern for AI agents using the toolkit.
- CHANGELOG.md is the chronological log of changes.
Project layout
src/lcf/ core library and MCP server
tests/ unit tests including golden-value validation, SAE 1137
examples/ runnable example scripts
docs/ the physics PDF and the agent usage guide
Authors and citation
David Fieser and Hugh Shortt. Both authors contributed equally to this project. To cite the software, use the "Cite this repository" button on GitHub or CITATION.cff.
License
MIT. See LICENSE.
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 lcf_strain_life-0.1.1.tar.gz.
File metadata
- Download URL: lcf_strain_life-0.1.1.tar.gz
- Upload date:
- Size: 303.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
24ca92b680abbabb6cc6e8815f886aba13b1195f29aeb811adfd3a630027f4e7
|
|
| MD5 |
3672802562e36c69946938aea8914e8a
|
|
| BLAKE2b-256 |
19012a02d86e969d54c7f4d2267a6db23499310ab2b2b76d87390d0702c57260
|
Provenance
The following attestation bundles were made for lcf_strain_life-0.1.1.tar.gz:
Publisher:
publish.yml on dfieser/lcf-strain-life
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lcf_strain_life-0.1.1.tar.gz -
Subject digest:
24ca92b680abbabb6cc6e8815f886aba13b1195f29aeb811adfd3a630027f4e7 - Sigstore transparency entry: 2087415471
- Sigstore integration time:
-
Permalink:
dfieser/lcf-strain-life@88b960d15b489557c686fe049499c52a72bc67cc -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/dfieser
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@88b960d15b489557c686fe049499c52a72bc67cc -
Trigger Event:
push
-
Statement type:
File details
Details for the file lcf_strain_life-0.1.1-py3-none-any.whl.
File metadata
- Download URL: lcf_strain_life-0.1.1-py3-none-any.whl
- Upload date:
- Size: 74.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
71b8412f03cc12e71fce68be71bb2eeb3cab4a65163d584a2945cb80952811a0
|
|
| MD5 |
54830468e836b696c2fc9937a1cf4ab5
|
|
| BLAKE2b-256 |
12623e6fd0918c8a2e9b3efaab03cdc76993ee26e72954c6b0e21118f551f1a7
|
Provenance
The following attestation bundles were made for lcf_strain_life-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on dfieser/lcf-strain-life
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lcf_strain_life-0.1.1-py3-none-any.whl -
Subject digest:
71b8412f03cc12e71fce68be71bb2eeb3cab4a65163d584a2945cb80952811a0 - Sigstore transparency entry: 2087415537
- Sigstore integration time:
-
Permalink:
dfieser/lcf-strain-life@88b960d15b489557c686fe049499c52a72bc67cc -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/dfieser
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@88b960d15b489557c686fe049499c52a72bc67cc -
Trigger Event:
push
-
Statement type: