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 parameterDamageCalculatorPRAJ: uses the P_RAJ damage parameterDamageCalculatorPRAJMinerElementaryuses 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_RAMdamage-parameter collective.Use this calculator for the FKM nonlinear assessment path based on the
P_RAMdamage parameter. It expects the first and second HCM runs in one collective and evaluates them against aWoehlerCurvePRAMcomponent Wöhler curve.- Parameters:
collective (pandas.DataFrame) – Damage-parameter collective. Each row represents one hysteresis and must contain
P_RAMas damage parameter value,is_closed_hysteresisas full-cycle flag,run_indexas HCM run number, andS_minfor the hysteresis count. A missing index is replaced by a two-levelMultiIndexwithhysteresis_indexandassessment_point_index.component_woehler_curve_P_RAM (WoehlerCurvePRAM) – Component Wöhler curve for the
P_RAMdamage 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 hysteresisiis 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.0means failure.- property P_RAM_max#
Return the maximum
P_RAMvalue of the second HCM run.- Returns:
Maximum
P_RAMdamage parameter per assessment point. Values below or equal to the fatigue strength limit indicate infinite life for this criterion.- Return type:
- property collective#
Return the evaluated
P_RAMcollective.- Returns:
Copy of the input collective enriched with bearable cycle numbers, damage per hysteresis, and cumulative damage per assessment point.
- Return type:
- get_lifetime_functions(assessment_parameters)[source]#
Return probabilistic lifetime functions for the
P_RAMassessment.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 forP_RAM.- Returns:
N_max_bearable (callable) – Function
N_max_bearable(P_A, clip_gamma=False)returning the maximum bearable number of cycles for failure probabilityP_A.failure_probability (callable) – Function
failure_probability(N)returning the failure probability forNload cycles.
Notes
Use FKM nonlinear guideline clause 2.5, equation (2.5-38), for the material safety factor. If
clip_gammaisTrue,gamma_Mis clipped to at least1.1for theP_RAMassessment.
- property is_life_infinite#
Return whether the
P_RAMassessment predicts infinite life.- Returns:
TruewhereP_RAM_maxdoes not exceed the fatigue strength limit of the component Wöhler curve; otherwiseFalse.- Return type:
- property lifetime_n_cycles#
Return load cycles until
P_RAMfailure.- 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:
- property lifetime_n_times_load_sequence#
Return load-sequence repetitions until
P_RAMfailure.- Returns:
Number of complete load sequence repetitions until the damage sum reaches
1.0. A value of0means that failure occurs before the end of the second HCM run.- Return type:
- class pylife.strength.fkm_nonlinear.damage_calculator.DamageCalculatorPRAJ(collective, assessment_parameters, component_woehler_curve_P_RAJ)[source]#
Calculate lifetime from a
P_RAJcollective by guideline accumulation.Use this calculator for the official FKM nonlinear
P_RAJassessment. 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, andS_min. A missing index is replaced by a two-levelMultiIndexwithhysteresis_indexandassessment_point_index.assessment_parameters (pandas.Series) – Parameters of the nonlinear
P_RAJassessment, includingP_RAJ_klass_max,P_RAJ_D_e,d_RAJ,a_0,a_end,l_star, and optionallyn_bins. Default forn_binsis200.component_woehler_curve_P_RAJ (WoehlerCurvePRAJ) – Component Wöhler curve for the
P_RAJdamage parameter.
See also
DamageCalculatorPRAMCalculate damage from
P_RAMwith elementary accumulation.
Notes
Implement the FKM nonlinear guideline assessment for
P_RAJin 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
DamageCalculatorPRAJMinerElementaryinstead only for the modified Miner-typeP_RAJaccumulation, not for a strict guideline assessment.- property P_RAJ_max#
Return the maximum
P_RAJvalue of the second HCM run.- Returns:
Maximum
P_RAJdamage parameter per assessment point. Values below or equal to the fatigue strength limit indicate infinite life for this criterion.- Return type:
- property collective#
Return the evaluated
P_RAJcollective.- Returns:
Input collective enriched with cumulative damage per assessment point.
- Return type:
- get_lifetime_functions()[source]#
Return probabilistic lifetime functions for the
P_RAJassessment.- Returns:
N_max_bearable (callable) – Function
N_max_bearable(P_A, clip_gamma=False)returning the maximum bearable number of cycles for failure probabilityP_A.failure_probability (callable) – Function
failure_probability(N)returning the failure probability forNload cycles.
Notes
Use FKM nonlinear guideline clause 2.8, equation (2.8-38), for the material safety factor. If
clip_gammaisTrue,gamma_Mis clipped to at least1.2for theP_RAJassessment.
- property is_life_infinite#
Return whether the
P_RAJassessment predicts infinite life.- Returns:
TruewhereP_RAJ_maxdoes not exceed the fatigue strength limit of the component Wöhler curve; otherwiseFalse.- Return type:
- property lifetime_n_cycles#
Return load cycles until
P_RAJfailure.- Returns:
Number of cycles in the collective until crack initiation according to the guideline
P_RAJaccumulation.- Return type:
- property lifetime_n_times_load_sequence#
Return load-sequence repetitions until
P_RAJfailure.- Returns:
Number of complete load sequence repetitions until the damage sum reaches
1.0. A value of0means that failure occurs before the end of the second HCM run.- Return type:
- class pylife.strength.fkm_nonlinear.damage_calculator_praj_miner.DamageCalculatorPRAJMinerElementary(collective, component_woehler_curve_P_RAJ)[source]#
Calculate
P_RAJlifetime by elementary Miner-type accumulation.Use this calculator when a direct Miner-type damage sum for
P_RAJis wanted instead of the official guidelineP_RAJclassing and crack-growth accumulation implemented byDamageCalculatorPRAJ. The class adapts theP_RAJWöhler curve to theDamageCalculatorPRAMinterface 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, andS_min.component_woehler_curve_P_RAJ (WoehlerCurvePRAJ) – Component Wöhler curve for the
P_RAJdamage parameter.
Notes
Implement the modified Miner-type accumulation
\[D = \sum_i D_i\]for
P_RAJvalues. This is useful for comparisons and non-guideline workflows; useDamageCalculatorPRAJfor the FKM nonlinear guideline’s ownP_RAJlifetime assessment.- class ComponentWoehlerCurvePRAMStub(component_woehler_curve_P_RAJ)[source]#
Adapt a
WoehlerCurvePRAJto theP_RAMcalculator interface.- Parameters:
component_woehler_curve_P_RAJ (WoehlerCurvePRAJ) – Component Wöhler curve whose
P_RAJmethods and properties are exposed under the names expected byDamageCalculatorPRAM.
- property P_RAM_D#
Return the adapted endurance-limit damage parameter.
- Returns:
P_RAJ_Dvalue exposed asP_RAM_Dfor the adapted elementary calculator interface.- Return type:
- property P_RAM_Z#
Return the adapted damage parameter at
1e3cycles.- Returns:
P_RAJvalue at1e3cycles, exposed asP_RAM_Zfor the adapted elementary calculator interface.- Return type:
- property d_1#
Return the Wöhler slope below
1e3cycles.- Returns:
Slope exponent of the adapted
P_RAJWöhler curve.- Return type:
- property d_2#
Return the Wöhler slope from
1e3cycles onward.- Returns:
Slope exponent of the adapted
P_RAJWöhler curve.- Return type:
- 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:
- property fatigue_strength_limit#
Return the adapted fatigue strength limit.
- Returns:
P_RAJvalue below which the adapted Wöhler curve predicts infinite life.- Return type:
- property P_RAJ_max#
Return the maximum
P_RAJvalue of the second HCM run.- Returns:
Maximum
P_RAJdamage parameter per assessment point. Values below or equal to the fatigue strength limit indicate infinite life for this criterion.- Return type:
- property collective#
Return the evaluated Miner-type
P_RAJcollective.- Returns:
Copy of the input collective with
P_RAJmirrored toP_RAMfor the adapted elementary calculator.- Return type:
- property is_life_infinite#
Return whether the Miner-type
P_RAJassessment predicts infinite life.- Returns:
TruewhereP_RAJ_maxdoes not exceed the fatigue strength limit of the component Wöhler curve; otherwiseFalse.- Return type:
- property lifetime_n_cycles#
Return load cycles until Miner-type
P_RAJfailure.- Returns:
Number of cycles in the collective until the elementary damage sum reaches
1.0.- Return type:
- property lifetime_n_times_load_sequence#
Return load-sequence repetitions until Miner-type
P_RAJfailure.- Returns:
Number of complete load sequence repetitions until the elementary damage sum reaches
1.0. A value of0means that failure occurs before the end of the second HCM run.- Return type: