# Introduction to stress_life

Package stress_life contains methods for damage calculations via stress life fatigue concept. Everything needed is accessible from class SN_Curve of the module SN_curve.

### SN curve definition

• It is possible to set two slopes of SN curve (low cycle fatique and high cycle fatigue).
• Two types for meanstress sensitivity handling are implemented (see chapter below).
• You can choose the behaviour of the SN curve after reaching the endurance limit.
• There are various methods for modifiing the SN curve (shifting, shifting on endurance limit, changing the endurance limit number of cycles, transformation to different R-ratio ...)

• ### Meanstress influence

1) FMK meanstress influence

• FKM-Guideline specifies various mean stress sensitivity factors depending on the R-ratio of the cycle.
• Four different regimes are distinguished.

2) Goodman meanstress influence

• distinguishes between only two sectios.
• For R > 1 (complete compressive cycle) there is no meanstress influence (same as FKM section I).
• Otherwise constant meanstress factor M is considered.

### Simplest usage

• Always start with SN curve definition. You can call some modification methods on that SN curve.
• Define a load as numpy array.
• Call some SN_Curve method "compute_D_*(load, ...)" to get the result as pandas DataFrame
``````import numpy as np
import pandas as pd
from stress_life import SN_curve

# create SN curve
sn = SN_curve.SN_Curve(SD=250, S1=500, k1=9, k=5, ND=2e6, M=0.22, R=0.4, meanCorrType="goodman", miner="haibach")

# create load (e.g. min and max load, number of cycles, shift factor)
load = np.array([[-800, 400, 1, 1.7],
[-800, 200, 1, 1.0],
[-800, 1000, 1, 0.7]])

# get the Damage in DataFrame object