The classes for damage calculation#

The following classes perform lifetime assessment according to the guideline FKM nonlinear. The objects are given a load collective and a damage parameter woehler curve. They calculate the damage parameters values for the collective and use the woehler curve to calculate a lifetime or infinite strength.

  • DamageCalculatorPRAM: uses the P_RAM damage parameter

  • DamageCalculatorPRAJ: uses the P_RAJ damage parameter

  • DamageCalculatorPRAJMinerElementary uses the P_RAJ damage parameter but omits the horizontal finite strength line in the Woehler curve, corresponding to the Miner Elementary method.

class pylife.strength.fkm_nonlinear.damage_calculator.DamageCalculatorPRAM(collective, component_woehler_curve_P_RAM)[source]#

Calculate lifetime from a P_RAM damage-parameter collective.

Use this calculator for the FKM nonlinear assessment path based on the P_RAM damage parameter. It expects the first and second HCM runs in one collective and evaluates them against a WoehlerCurvePRAM component Wöhler curve.

Parameters:
  • collective (pandas.DataFrame) – Damage-parameter collective. Each row represents one hysteresis and must contain P_RAM as damage parameter value, is_closed_hysteresis as full-cycle flag, run_index as HCM run number, and S_min for the hysteresis count. A missing index is replaced by a two-level MultiIndex with hysteresis_index and assessment_point_index.

  • component_woehler_curve_P_RAM (WoehlerCurvePRAM) – Component Wöhler curve for the P_RAM damage parameter.

Notes

Implement the FKM nonlinear guideline assessment for P_RAM, especially the load-sequence repetition rule of clause 2.6, equation (2.6-90). The damage of hysteresis i is accumulated as

\[\begin{split}D_i = \begin{cases} 1 / N_i, & \text{closed hysteresis}, \\ 0.5 / N_i, & \text{memory-3 hysteresis}. \end{cases}\end{split}\]

The resulting damage sum is dimensionless; a value of 1.0 means failure.

property P_RAM_max#

Return the maximum P_RAM value of the second HCM run.

Returns:

Maximum P_RAM damage parameter per assessment point. Values below or equal to the fatigue strength limit indicate infinite life for this criterion.

Return type:

float or pandas.Series

property collective#

Return the evaluated P_RAM collective.

Returns:

Copy of the input collective enriched with bearable cycle numbers, damage per hysteresis, and cumulative damage per assessment point.

Return type:

pandas.DataFrame

get_lifetime_functions(assessment_parameters)[source]#

Return probabilistic lifetime functions for the P_RAM assessment.

The returned callables scale the deterministic lifetime with the material scatter and safety factor of the FKM nonlinear guideline.

Parameters:

assessment_parameters (pandas.Series) – Assessment parameters. Only the material group is required here to select the f_2.5% scatter constant for P_RAM.

Returns:

  • N_max_bearable (callable) – Function N_max_bearable(P_A, clip_gamma=False) returning the maximum bearable number of cycles for failure probability P_A.

  • failure_probability (callable) – Function failure_probability(N) returning the failure probability for N load cycles.

Notes

Use FKM nonlinear guideline clause 2.5, equation (2.5-38), for the material safety factor. If clip_gamma is True, gamma_M is clipped to at least 1.1 for the P_RAM assessment.

property is_life_infinite#

Return whether the P_RAM assessment predicts infinite life.

Returns:

True where P_RAM_max does not exceed the fatigue strength limit of the component Wöhler curve; otherwise False.

Return type:

bool or pandas.Series

property lifetime_n_cycles#

Return load cycles until P_RAM failure.

Returns:

Number of cycles in the collective until the accumulated damage sum reaches 1.0. The value is expressed in counted load cycles, not in seconds or load-sequence repetitions.

Return type:

float or numpy.ndarray

property lifetime_n_times_load_sequence#

Return load-sequence repetitions until P_RAM failure.

Returns:

Number of complete load sequence repetitions until the damage sum reaches 1.0. A value of 0 means that failure occurs before the end of the second HCM run.

Return type:

float or numpy.ndarray

class pylife.strength.fkm_nonlinear.damage_calculator.DamageCalculatorPRAJ(collective, assessment_parameters, component_woehler_curve_P_RAJ)[source]#

Calculate lifetime from a P_RAJ collective by guideline accumulation.

Use this calculator for the official FKM nonlinear P_RAJ assessment. It uses the damage values computed during damage-parameter evaluation, classes the second HCM run logarithmically, and accounts for the guideline’s crack-growth based degradation of the endurance limit.

Parameters:
  • collective (pandas.DataFrame) – Damage-parameter collective with one row per hysteresis. Required columns are P_RAJ, P_RAJ_D, D, run_index, and S_min. A missing index is replaced by a two-level MultiIndex with hysteresis_index and assessment_point_index.

  • assessment_parameters (pandas.Series) – Parameters of the nonlinear P_RAJ assessment, including P_RAJ_klass_max, P_RAJ_D_e, d_RAJ, a_0, a_end, l_star, and optionally n_bins. Default for n_bins is 200.

  • component_woehler_curve_P_RAJ (WoehlerCurvePRAJ) – Component Wöhler curve for the P_RAJ damage parameter.

See also

DamageCalculatorPRAM

Calculate damage from P_RAM with elementary accumulation.

Notes

Implement the FKM nonlinear guideline assessment for P_RAJ in clause 2.9, including equations (2.9-126), (2.9-135), and (2.9-138). The class evaluates

\[\bar{N} = H_0\,(2 + \bar{x}_{-2})\]

as the bearable number of cycles until crack initiation. Choose DamageCalculatorPRAJMinerElementary instead only for the modified Miner-type P_RAJ accumulation, not for a strict guideline assessment.

property P_RAJ_max#

Return the maximum P_RAJ value of the second HCM run.

Returns:

Maximum P_RAJ damage parameter per assessment point. Values below or equal to the fatigue strength limit indicate infinite life for this criterion.

Return type:

float or pandas.Series

property collective#

Return the evaluated P_RAJ collective.

Returns:

Input collective enriched with cumulative damage per assessment point.

Return type:

pandas.DataFrame

get_lifetime_functions()[source]#

Return probabilistic lifetime functions for the P_RAJ assessment.

Returns:

  • N_max_bearable (callable) – Function N_max_bearable(P_A, clip_gamma=False) returning the maximum bearable number of cycles for failure probability P_A.

  • failure_probability (callable) – Function failure_probability(N) returning the failure probability for N load cycles.

Notes

Use FKM nonlinear guideline clause 2.8, equation (2.8-38), for the material safety factor. If clip_gamma is True, gamma_M is clipped to at least 1.2 for the P_RAJ assessment.

property is_life_infinite#

Return whether the P_RAJ assessment predicts infinite life.

Returns:

True where P_RAJ_max does not exceed the fatigue strength limit of the component Wöhler curve; otherwise False.

Return type:

bool or pandas.Series

property lifetime_n_cycles#

Return load cycles until P_RAJ failure.

Returns:

Number of cycles in the collective until crack initiation according to the guideline P_RAJ accumulation.

Return type:

float or numpy.ndarray

property lifetime_n_times_load_sequence#

Return load-sequence repetitions until P_RAJ failure.

Returns:

Number of complete load sequence repetitions until the damage sum reaches 1.0. A value of 0 means that failure occurs before the end of the second HCM run.

Return type:

float or numpy.ndarray

class pylife.strength.fkm_nonlinear.damage_calculator_praj_miner.DamageCalculatorPRAJMinerElementary(collective, component_woehler_curve_P_RAJ)[source]#

Calculate P_RAJ lifetime by elementary Miner-type accumulation.

Use this calculator when a direct Miner-type damage sum for P_RAJ is wanted instead of the official guideline P_RAJ classing and crack-growth accumulation implemented by DamageCalculatorPRAJ. The class adapts the P_RAJ Wöhler curve to the DamageCalculatorPRAM interface and then reuses the elementary damage calculation.

Parameters:
  • collective (pandas.DataFrame) – Damage-parameter collective with one row per hysteresis. Required columns are P_RAJ, is_closed_hysteresis, run_index, and S_min.

  • component_woehler_curve_P_RAJ (WoehlerCurvePRAJ) – Component Wöhler curve for the P_RAJ damage parameter.

Notes

Implement the modified Miner-type accumulation

\[D = \sum_i D_i\]

for P_RAJ values. This is useful for comparisons and non-guideline workflows; use DamageCalculatorPRAJ for the FKM nonlinear guideline’s own P_RAJ lifetime assessment.

class ComponentWoehlerCurvePRAMStub(component_woehler_curve_P_RAJ)[source]#

Adapt a WoehlerCurvePRAJ to the P_RAM calculator interface.

Parameters:

component_woehler_curve_P_RAJ (WoehlerCurvePRAJ) – Component Wöhler curve whose P_RAJ methods and properties are exposed under the names expected by DamageCalculatorPRAM.

property P_RAM_D#

Return the adapted endurance-limit damage parameter.

Returns:

P_RAJ_D value exposed as P_RAM_D for the adapted elementary calculator interface.

Return type:

float or pandas.Series

property P_RAM_Z#

Return the adapted damage parameter at 1e3 cycles.

Returns:

P_RAJ value at 1e3 cycles, exposed as P_RAM_Z for the adapted elementary calculator interface.

Return type:

float or pandas.Series

calc_N(P_RAM)[source]#

Calculate cycles for an adapted damage-parameter value.

Parameters:

P_RAM (float or array_like) – Damage-parameter value passed through to the underlying P_RAJ Wöhler curve.

Returns:

Number of cycles corresponding to P_RAM.

Return type:

float or array_like

calc_P_RAM(N)[source]#

Calculate the adapted damage parameter for cycle numbers.

Parameters:

N (float or array_like) – Number of cycles.

Returns:

P_RAJ values exposed as P_RAM values for the adapted elementary calculator interface.

Return type:

float or array_like

property d_1#

Return the Wöhler slope below 1e3 cycles.

Returns:

Slope exponent of the adapted P_RAJ Wöhler curve.

Return type:

float

property d_2#

Return the Wöhler slope from 1e3 cycles onward.

Returns:

Slope exponent of the adapted P_RAJ Wöhler curve.

Return type:

float

property fatigue_life_limit#

Return the fatigue life limit of the adapted curve.

Returns:

Number of cycles at the adapted fatigue strength limit.

Return type:

float or pandas.Series

property fatigue_strength_limit#

Return the adapted fatigue strength limit.

Returns:

P_RAJ value below which the adapted Wöhler curve predicts infinite life.

Return type:

float or pandas.Series

property P_RAJ_max#

Return the maximum P_RAJ value of the second HCM run.

Returns:

Maximum P_RAJ damage parameter per assessment point. Values below or equal to the fatigue strength limit indicate infinite life for this criterion.

Return type:

float or pandas.Series

property collective#

Return the evaluated Miner-type P_RAJ collective.

Returns:

Copy of the input collective with P_RAJ mirrored to P_RAM for the adapted elementary calculator.

Return type:

pandas.DataFrame

property is_life_infinite#

Return whether the Miner-type P_RAJ assessment predicts infinite life.

Returns:

True where P_RAJ_max does not exceed the fatigue strength limit of the component Wöhler curve; otherwise False.

Return type:

bool or pandas.Series

property lifetime_n_cycles#

Return load cycles until Miner-type P_RAJ failure.

Returns:

Number of cycles in the collective until the elementary damage sum reaches 1.0.

Return type:

float or numpy.ndarray

property lifetime_n_times_load_sequence#

Return load-sequence repetitions until Miner-type P_RAJ failure.

Returns:

Number of complete load sequence repetitions until the elementary damage sum reaches 1.0. A value of 0 means that failure occurs before the end of the second HCM run.

Return type:

float or numpy.ndarray