-
Notifications
You must be signed in to change notification settings - Fork 0
Getting Started
Four ways in, from most to least common. Python 3.11 or newer for everything except the standalone Windows app, which needs nothing.
pip install "lcf-strain-life[mcp]"The base package is the library alone. The mcp extra adds the MCP
server. Start the server with lcf-mcp, then register it with your
client, see MCP Client Setup.
Any MCP client can launch the server without a prior install:
uvx --from "lcf-strain-life[mcp]" lcf-mcpuv resolves and caches the package on first run. Install uv itself from docs.astral.sh/uv.
pip install "lcf-strain-life[gui]"
lcf-guiA guided local app in the browser: upload test files or type in reduced data, fit the constants, predict life, export plots and a report. A bundled published example dataset, SAE 1137, lets you try the whole flow without any files. Everything runs on your machine and no data leaves it.
A standalone exe, no Python needed, is attached to GitHub releases starting with v0.2.0. Download, double-click, and the app opens in the browser. It unpacks itself on every launch, so starting takes a while. It is currently unsigned, so Windows SmartScreen warns on first run. Choose "More info", then "Run anyway".
import lcf
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,
)
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 reversalsWith the server registered, ask your assistant in plain language:
Using the lcf tools, fit the strain-life constants for this data and
tell me the transition life.
total strain amplitude: 0.009, 0.007, 0.005, 0.003, 0.002, 0.00175
stress amplitude (MPa): 553, 522, 464, 405, 350, 319
reversals to failure: 4234, 7398, 14768, 77104, 437498, 3327958
elastic modulus E: 208000 MPa
The agent calls fit_strain_life and reads the result back. Every tool
and its units are documented in Agent Usage.
Computed results are saved to a local store directory for recall without
recomputation. The location comes from the LCF_STORE_DIR environment
variable and defaults to .lcfstore in the working directory.
lcf-strain-life, by David Fieser and Hugh Shortt, both authors contributed equally. MIT license. Cite via CITATION.cff or DOI 10.5281/zenodo.21222820.
Getting started
Reference
Help
Elsewhere