Skip to content

Commit 435217f

Browse files
Drop maximum_absolute_load parameter for FKM NK rainflow counter
Signed-off-by: Johannes Mueller <johannes.mueller4@de.bosch.com>
1 parent 1867584 commit 435217f

File tree

1 file changed

+8
-26
lines changed

1 file changed

+8
-26
lines changed

src/pylife/strength/fkm_nonlinear/assessment_nonlinear_standard.py

Lines changed: 8 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -213,17 +213,15 @@ def perform_fkm_nonlinear_assessment(assessment_parameters, load_sequence, calcu
213213
assessment_parameters, component_woehler_curve_P_RAM, component_woehler_curve_P_RAJ \
214214
= _compute_component_woehler_curves(assessment_parameters)
215215

216-
maximum_absolute_load = _get_maximum_absolute_load(assessment_parameters, scaled_load_sequence)
217-
218216
result = {}
219217

220218
# HCM rainflow counting and damage computation for P_RAM
221219
if calculate_P_RAM:
222-
result = _compute_lifetimes_P_RAM(assessment_parameters, result, scaled_load_sequence, component_woehler_curve_P_RAM, maximum_absolute_load)
220+
result = _compute_lifetimes_P_RAM(assessment_parameters, result, scaled_load_sequence, component_woehler_curve_P_RAM)
223221

224222
# HCM rainflow counting and damage computation for P_RAJ
225223
if calculate_P_RAJ:
226-
result = _compute_lifetimes_P_RAJ(assessment_parameters, result, scaled_load_sequence, component_woehler_curve_P_RAJ, maximum_absolute_load)
224+
result = _compute_lifetimes_P_RAJ(assessment_parameters, result, scaled_load_sequence, component_woehler_curve_P_RAJ)
227225

228226
# additional quantities
229227
result["assessment_parameters"] = assessment_parameters
@@ -389,7 +387,7 @@ def _compute_component_woehler_curves(assessment_parameters):
389387
return assessment_parameters, component_woehler_curve_P_RAM, component_woehler_curve_P_RAJ
390388

391389

392-
def _compute_hcm_RAM(assessment_parameters, scaled_load_sequence, maximum_absolute_):
390+
def _compute_hcm_RAM(assessment_parameters, scaled_load_sequence):
393391
"""Perform the HCM rainflow counting with the extended Neuber notch approximation.
394392
The HCM algorithm is executed twice, as described in the FKM nonlinear guideline."""
395393

@@ -479,7 +477,7 @@ def _store_additional_objects_in_result_RAM(result, recorder, damage_calculator,
479477
return result
480478

481479

482-
def _compute_hcm_RAJ(assessment_parameters, scaled_load_sequence, maximum_absolute_load):
480+
def _compute_hcm_RAJ(assessment_parameters, scaled_load_sequence):
483481
"""Perform the HCM rainflow counting with the Seeger-Beste notch approximation.
484482
The HCM algorithm is executed twice, as described in the FKM nonlinear guideline."""
485483

@@ -595,31 +593,15 @@ def _store_additional_objects_in_result_RAJ(result, recorder, damage_calculator,
595593
return result
596594

597595

598-
def _get_maximum_absolute_load(assessment_parameters, scaled_load_sequence):
599-
"""Compute the maximum absolute load, separately for every node (max_load_independently_for_nodes=True).
600-
# The value is used to initialize the binning in the notch approximation schemes. Using 'True' yields smaller bin sizes
601-
# and higher accuracy but takes longer runtime. Using 'False' generates only one lookup-table for the whole assessment, which is
602-
# most accurate for the nodes with the highest loads.
603-
"""
604-
605-
if "max_load_independently_for_nodes" not in assessment_parameters:
606-
assessment_parameters["max_load_independently_for_nodes"] = False
607-
608-
maximum_absolute_load = scaled_load_sequence.fkm_load_sequence.maximum_absolute_load(
609-
max_load_independently_for_nodes=assessment_parameters.max_load_independently_for_nodes)
610-
611-
return maximum_absolute_load
612-
613-
614-
def _compute_lifetimes_P_RAJ(assessment_parameters, result, scaled_load_sequence, component_woehler_curve_P_RAJ, maximum_absolute_load):
596+
def _compute_lifetimes_P_RAJ(assessment_parameters, result, scaled_load_sequence, component_woehler_curve_P_RAJ):
615597
"""Compute the lifetimes using the given parameters and woehler curve, with P_RAJ.
616598
617599
* Execute the HCM algorithm to detect closed hysteresis.
618600
* Use the woehler curve and the damage parameter to predict lifetimes.
619601
* Do statistical assessment and store all results in a dict.
620602
"""
621603

622-
detector_1st, detector, seeger_beste_binned, recorder = _compute_hcm_RAJ(assessment_parameters, scaled_load_sequence, maximum_absolute_load)
604+
detector_1st, detector, seeger_beste_binned, recorder = _compute_hcm_RAJ(assessment_parameters, scaled_load_sequence)
623605

624606
result, damage_calculator = _compute_damage_and_lifetimes_RAJ(assessment_parameters, recorder, component_woehler_curve_P_RAJ, result)
625607

@@ -631,14 +613,14 @@ def _compute_lifetimes_P_RAJ(assessment_parameters, result, scaled_load_sequence
631613
return result
632614

633615

634-
def _compute_lifetimes_P_RAM(assessment_parameters, result, scaled_load_sequence, component_woehler_curve_P_RAM, maximum_absolute_load):
616+
def _compute_lifetimes_P_RAM(assessment_parameters, result, scaled_load_sequence, component_woehler_curve_P_RAM):
635617
"""Compute the lifetimes using the given parameters and woehler curve, with P_RAM.
636618
637619
* Execute the HCM algorithm to detect closed hysteresis.
638620
* Use the woehler curve and the damage parameter to predict lifetimes.
639621
* Do statistical assessment and store all results in a dict.
640622
"""
641-
detector_1st, detector, extended_neuber_binned, recorder = _compute_hcm_RAM(assessment_parameters, scaled_load_sequence, maximum_absolute_load)
623+
detector_1st, detector, extended_neuber_binned, recorder = _compute_hcm_RAM(assessment_parameters, scaled_load_sequence)
642624

643625
result, damage_calculator = _compute_damage_and_lifetimes_RAM(assessment_parameters, recorder, component_woehler_curve_P_RAM, result)
644626

0 commit comments

Comments
 (0)