stress_life#
The module py_fatigue.damage.stress_life
contains all the
damage models related to the stress-life approach.
- class py_fatigue.damage.stress_life.PalmgrenMiner(pandas_obj)#
Accessor for the Palmgren-Miner damage model.
- damage(sn_curve: SNCurve)#
Calculate the damage of the samples.
- Parameters:
sn_curve (SNCurve) – The SNCurve object.
- Returns:
The DataFrame with the damage.
- Return type:
DataFrame
- des(slope: float, equivalent_cycles: float = 10000000.0) float #
Calculate the damage equivalent stress range (DES).
- Parameters:
- Returns:
The DES.
- Return type:
See also
- dem(outer_radius: float, inner_radius: float, slope: float, equivalent_cycles: float = 10000000.0) float #
Calculate the damage equivalent stress range (DES).
- Parameters:
- Returns:
The DES.
- Return type:
See also
- plot_histogram(fig: Figure | None = None, ax: PathCollection | None = None, dens_func: Callable | None = None, **kwargs) Tuple[Figure, PathCollection] #
Plot the damage.
- Parameters:
fig (matplotlib.figure.Figure, optional) – The figure to plot on, by default None
ax (matplotlib.collections.PathCollection, optional) – The axes to plot on, by default None
kwargs – Additional keyword arguments for the plot.
- Returns:
The figure and axes.
- Return type:
matplotlib.figure.Figure, matplotlib.collections.PathCollection
- class py_fatigue.damage.stress_life.Gassner(pandas_obj)#
Accessor for the Gassner shift factor for variable amplitude.
- g(sn_curve: SNCurve)#
Calculate the shift factor of the samples.
The shift factor is a spectrum-dependent factor that allows to shift a Wohler curve and avoids having to calculate the damage using the
PalmgrenMiner
ruleevery time.Once the shift factor has been calculated, it can be applied to the Wohler SN curve. Then, accssing the curve through the maximum amplitude value of the spectrum will return the expected life for said spectrum.
The shift factor for each cycle in the spectrum is:
\[G_j = \frac{n_j}{N_S} \, \left({\frac{\sigma_{{max}_j} \, \sigma_{{alt}_j}} {\max{\sigma_{alt}} ^ {2}}}\right)^{2}\]The shift factor then is:
\[G = \sum_{j=1}^{N_B} G_j\]- Parameters:
sn_curve (SNCurve) – The SNCurve object.
- Returns:
The DataFrame with the shift factor per sample.
- Return type:
DataFrame
- py_fatigue.damage.stress_life.calc_pm(stress_range: float | Series | ndarray, count_cycle: float | Series | ndarray, sn_curve: SNCurve) ndarray #
Calculates the damage using the Palmgren-Miner rule, i.e. the linear damage accumulation rule:
\[D = \sum_{j=1}^{N_{\text{blocks}}} \frac{n_j}{N_j} \leq 1\]- Parameters:
stress_range (Union[pd.Series, np.ndarray]) – The stress range
- count_cycleUnion[pd.Series, np.ndarray]
The number of cycles
- sn_curveSNCurve
The SNCurve object.
- Returns:
The damage according to the Palmgren-Miner rule.
- Return type:
Union[float, np.ndarray]
- py_fatigue.damage.stress_life.calc_des(stress_range: float | Series | ndarray, count_cycle: float | Series | ndarray, slope: float, equivalent_cycles: float = 10000000.0) float #
Calculate the damage equivalent stress range (DES).
- Parameters:
- Returns:
The DES.
- Return type:
- py_fatigue.damage.stress_life.calc_dem(outer_radius: float, inner_radius: float, stress_range: float | Series | ndarray, count_cycle: float | Series | ndarray, slope: float, equivalent_cycles: float = 10000000.0) float #
Calculate the damage equivalent moment (DEM) in Nm.
\[DEM = DES * I_c / r_o = DES * S\]with \(I_c\) the area moment of inertia and \(r_i\) the inner radius, or \(S\) the Section modulus. The Damage Equivalent Stress Range (DES) is calculated using
calc_des()
- Parameters:
outer_radius (float) – The outer radius to calculate the DEM. Must be provided in m
inner_radius (float) – The inner radius to calculate the DEM. Must be provided in m
stress_range (Union[float, pd.Series, np.ndarray]) – The stress range
count_cycle (Union[float, pd.Series, np.ndarray]) – The number of cycles
slope (float) – The SN curve slope
equivalent_cycles (float, optional) – The equivalent number of cycles, by default 1e7
- Raises:
ValueError – If the inner radius is larger than the outer radius.
- Returns:
The DEM in Nm.
- Return type:
- py_fatigue.damage.stress_life.get_pm(cycle_count: CycleCount, sn_curve: SNCurve) ndarray #
Calculates the damage using the Palmgren-Miner rule.
- Parameters:
cycle_count (CycleCount) – The CycleCount object.
sn_curve (SNCurve) – The SNCurve object.
- Returns:
The damage according to the Palmgren-Miner rule.
- Return type:
np.ndarray
- py_fatigue.damage.stress_life.get_des(cycle_count: CycleCount, slope: float, equivalent_cycles: float = 10000000.0) float #
Calculate the damage equivalent stress range (DES).
- Parameters:
cycle_count (CycleCount) – The CycleCount object.
slope (float) – The SN curve slope
equivalent_cycles (float, optional) – The equivalent number of cycles, by default 1e7
- Returns:
The DES.
- Return type:
- py_fatigue.damage.stress_life.get_dem(outer_radius: float, inner_radius: float, cycle_count: CycleCount, slope: float, equivalent_cycles: float = 10000000.0) float #
Calculate the damage equivalent moment (DEM) in Nm.
\[DEM = DES * I_c / r_o = DES * S\]with \(I_c\) the area moment of inertia and \(r_i\) the inner radius, or \(S\) the Section modulus. The Damage Equivalent Stress Range (DES) is calculated using
calc_des()
- Parameters:
outer_radius (float) – The outer radius to calculate the DEM. Must be provided in m
inner_radius (float) – The inner radius to calculate the DEM. Must be provided in m
stress_range (Union[pd.Series, np.ndarray]) – The stress range
count_cycle (Union[pd.Series, np.ndarray]) – The number of cycles
slope (float) – The SN curve slope
equivalent_cycles (float, optional) – The equivalent number of cycles, by default 1e7
- Returns:
The DEM in Nm.
- Return type:
- py_fatigue.damage.stress_life.calc_manson_halford_exponents(cycles_to_failure: ndarray, exponent: float = 0.4) ndarray #
Calculate the Mannson-Halford exponents \(e_{j, j+1}\).
\[e{j, j+1} = \left(\frac{N_{j}}{N_{j+1}}\right)^{exponent}\]- Parameters:
cycles_to_failure (np.ndarray) – The number of cycles to failure.
exponent (float, optional) – The exponent, by default 0.4
- Returns:
The Mannson-Halford exponents.
- Return type:
np.ndarray
- py_fatigue.damage.stress_life.calc_pavlou_exponents(stress_range: ndarray, ultimate_stress: float = 900, exponent: float = -0.75) ndarray #
Calculate the Pavlou exponents \(q(\sigma_j)=e_{j, j+1}\).
\[e_{j, j+1} = \left(\frac{\Delta \sigma_j / 2}{\sigma_U}\right) ^{exponent}\]where \(\Delta \sigma_j\) is the stress amplitude, \(\sigma_U\) is the ultimate stress, \(\Delta \sigma\) is the stress range and \(exponent\) is the exponent.
- py_fatigue.damage.stress_life.calc_si_jian_exponents(stress_range: ndarray) ndarray #
Calculate the Si-Jian et al. exponents as
\[e_{j, j+1} = \sigma_{j+1} / \sigma_{j}\]where \(\sigma_{j+1}\) is the stress amplitude for the \(j\)-th cycle.
- Parameters:
stress_range (np.ndarray) – The stress range.
- Returns:
The Si-Jian et al. exponents.
- Return type:
np.ndarray
- py_fatigue.damage.stress_life.calc_nonlinear_damage(damage_rule: str, stress_range: ndarray, count_cycle: ndarray, sn_curve: SNCurve, **kwargs) float #
Calculate the fatigue damage using a nonlinear damage rule among the allowed ones:
‘Pavlou’: Pavlou damage rule
‘Manson-Halford’: Mannson-Halford damage rule
‘Si-Jian’: Si-Jian et al damage rule
‘Leve’: Leve damage rule
The generic form of a nonlinear damage rule is:
\[D = \left( \left( \dots \left( \left( \left(\frac{n_1}{N_1}\right)^{e_{1, 2}} + \frac{n_2}{N_2} \right)^{e_{2, 3}} + \frac{n_3}{N_3} \right)^{e_{3, 4}} + \dots + \frac{n_{M-1}}{N_{M-1}} \right)^{e_{M-1, M}} + \dots + \frac{n_M}{N_M} \right)^{e_M}\]where \(n_j\) is the number of cycles in the fatigue histogram at the \(j\)-th cycle, \(N_j\) is the number of cycles to failure at the \(j\)-th cycle, \(e_{j, j+1}\) is the exponent for the \(j\)-th and \(j+1\)-th cycles, \(M\) is the number of load blocks in the fatigue spectrum.
The formula is conveniently rewritten as pseudocode:
# retrieve N_j using the fatigue histogram and SN curve # retrieve the exponents e_{j, j+1} # calculate the damage D = 0 for j in range(1, M+1): D = (D + n_j / N_j) ^ e_{j, j+1}
- Parameters:
damage_rule (str) – The damage rule to use. Must be one of the following: ‘Pavlou’, ‘Manson-Halford’, ‘Si-Jian’, ‘Leve’.
stress_range (np.ndarray) – The stress range.
count_cycle (np.ndarray) – The number of cycles.
sn_curve (SNCurve) – The SN curve.
kwargs (dict) –
The keyword arguments for the damage rule. The following keyword arguments are allowed:
’base_exponent’: The exponent for the damage rule.
’ultimate_stress’: The ultimate stress.
- Returns:
The cumulated damage.
- Return type:
- py_fatigue.damage.stress_life.get_nonlinear_damage(damage_rule: str, cycle_count: CycleCount, sn_curve: SNCurve, **kwargs) float #
Calculate the fatigue damage using a nonlinear damage rule.
- Parameters:
damage_rule (str) – The damage rule to use. Must be one of the following: ‘Pavlou’, ‘Manson-Halford’, ‘Si-Jian’, ‘Leve’.
cycle_count (CycleCount) – The cycle count object.
sn_curve (SNCurve) – The SN curve object.
kwargs (dict) –
The keyword arguments for the damage rule. The following keyword arguments are allowed:
’base_exponent’: The exponent for the damage rule.
’ultimate_stress’: The ultimate stress.
- Returns:
The cumulated damage.
- Return type: