pyflange.fatigue

Fatigue calculation tools.

This module defines functions and classes to support structural fatigue calculations for large flanges. It includes utilities for reading Markov matrices, defining various types of S-N curves (fatigue curves), and performing bolt fatigue analysis.

BoltFatigueAnalysis dataclass

Fatigue analysis for a flange bolt.

Calculates fatigue damage and life for a bolt given its flange segment model, load history, and fatigue curve.

Attributes:
  • fseg (FlangeSegment) –

    The FlangeSegment object for the analysis.

  • flange_mkvm (MarkovMatrix) –

    The Markov matrix representing the bending moments history on the flange.

  • custom_fatigue_curve (FatigueCurve) –

    The fatigue curve for the bolt. If None, a BoltFatigueCurve is generated based on the bolt diameter. Defaults to None.

  • allowable_damage (float) –

    The maximum allowable fatigue damage. Defaults to 1.0.

  • SMF (float) –

    Stress Multiplication Factor applied to bolt stress ranges. Defaults to 1.0.

bolt_mkvm cached property

MarkovMatrix: The Markov matrix of axial+bending stress ranges in the bolt.

damage cached property

float: The total cumulated fatigue damage.

fatigue_curve cached property

FatigueCurve: The fatigue curve used in the analysis.

fatigue_life cached property

float: The fatigue life in the same units as flange_mkvm.duration.

BoltFatigueCurve

Bases: DoubleSlopeFatigueCurve

Bolt Fatigue Curve according to IEC 61400-6 AMD1.

Creates a DoubleSlopeFatigueCurve with logarithmic slopes m1=3 and m2=5, a knee point at 2 million cycles, and a stress range depending on the bolt diameter as specified by IEC 61400-6 AMD1.

Parameters:
  • diameter (float) –

    The bolt diameter in meters.

  • DS_ref (float, default: 50000000.0 ) –

    Reference stress range at 2e6 cycles. Defaults to 50 MPa (50e6 Pa).

  • gamma_M (float, default: 1.1 ) –

    The material factor. Defaults to 1.1.

DoubleSlopeFatigueCurve

Bases: MultiSlopeFatigueCurve

Wöhler curve with double logarithmic slope.

This class implements the FatigueCurve interface for a curve with two slopes m1 and m2, intersecting at a specific point (DS12, N12).

__init__(m1, m2, DS12, N12)

Initializes the DoubleSlopeFatigueCurve.

Parameters:
  • m1 (float) –

    The logarithmic slope of the lower cycle values.

  • m2 (float) –

    The logarithmic slope of the higher cycle values.

  • DS12 (float) –

    The stress range at the knee point where slopes meet.

  • N12 (float) –

    The number of cycles at the knee point where slopes meet.

FatigueCurve

A Wöhler (S-N) curve base class.

This is a base class for creating Wohler curves. It should not be instantiated directly.

DS(N)

Calculates the stress range for a given number of cycles.

Parameters:
  • N (float or ndarray) –

    The number of cycles to failure.

Returns:
  • float or np.ndarray: The corresponding stress range that produces fatigue failure.

N(DS)

Calculates the number of cycles to failure for a given stress range.

Parameters:
  • DS (float or ndarray) –

    The stress range(s).

Returns:
  • float or np.ndarray: The number of cycles that produce a fatigue failure.

cumulated_damage(markov_matrix)

Calculates the cumulated damage according to Miner's rule.

Parameters:
  • markov_matrix (MarkovMatrix) –

    The load history expressed as a MarkovMatrix object.

Returns:
  • float

    The cumulated fatigue damage under the given load history.

damage(n, DS)

Calculates the fatigue damage for a given number of cycles and stress range.

Calculates the damage as D = n / N(DS).

Parameters:
  • n (float or ndarray) –

    The number of applied cycles.

  • DS (float or ndarray) –

    The stress range(s).

Returns:
  • float or np.ndarray: The fatigue damage.

MarkovMatrix dataclass

A Markov Matrix representing a load history.

This class represents a load history in the form of a Markov Matrix. The 'load' can be expressed in terms of moments, forces, stresses, etc.

Attributes:
  • range (ndarray) –

    Array of stress ranges (or load ranges in general).

  • mean (ndarray) –

    Array of mean stress values (or load values in general).

  • cycles (ndarray) –

    Array of cycles corresponding to each load value.

  • duration (float) –

    Duration of the load history. Defaults to 1.

MultiSlopeFatigueCurve

Bases: FatigueCurve

Multi-Slope Fatigue Curve.

This class represents a FatigueCurve composed of multiple slopes. It takes any number of SingleSlopeFatigueCurve objects and uses the maximum number of cycles (or stress range) among them for a given input.

Attributes:
  • curves (tuple) –

    A tuple of SingleSlopeFatigueCurve objects.

DS(N)

Calculates the stress range.

Parameters:
  • N (float or ndarray) –

    The number of cycles.

Returns:
  • float or np.ndarray: The maximum stress range from the component curves.

N(DS)

Calculates the number of cycles to failure.

Parameters:
  • DS (float or ndarray) –

    The stress range(s).

Returns:
  • float or np.ndarray: The maximum number of cycles from the component curves.

__init__(*fatigue_curves)

Initializes the MultiSlopeFatigueCurve.

Parameters:

SingleSlopeFatigueCurve dataclass

Bases: FatigueCurve

Wöhler curve with a single logarithmic slope.

This class implements the FatigueCurve interface for a curve with a single slope m.

Attributes:
  • m (float) –

    The logarithmic slope of the fatigue curve.

  • DS_ref (float) –

    Arbitrary reference stress range.

  • N_ref (float) –

    The number of cycles that produce failure under the stress range DS_ref.

a cached property

float: The constant 'a' in the S-N curve equation N * DS^m = a.