pyflange.fatigue

Fatigue calculation tools

This module defines functions and classes to support structural fatigue calculations.

In particular, the module contains the following functions …

  • markov_matrix_from_SGRE_format(pathFile , unitFactor [optional]) which reads a .mkv file from SGRE as markov matrix and converts in into a pandas dataframe

… and the following FatigueCurve classes:

  • SingleSlopeFatigueCurve

  • DoubleSlopeFatigueCurve

  • SNCurve

Each fatigue curve class exxposes the following methods:

  • fatigue_curve.N(DS) returns the number of cycles corresponding to the given stress range DS

  • fatigue_curve.DS(N) returns the stress range corresponding to the given number of cycles N

  • fatigue_curve.damage(n, DS) returns the fatigue damage cumulated by a stress range DS repeated n times

pyflange.fatigue.markov_matrix_from_SGRE_format(pathFile, unitFactor=1000.0)

Reads a .mkv file into a pandas.DataFrame object

Reads a Markov matrix from a SGRE .mkv file and converts in into a padas dataframe having the collowing columns:

  • ‘Cycles’ : Number of cylces

  • ‘Mean’ : mean bending moment

  • ‘Range’ : range of the bending moment

It takes as inputs:

  • pathFilestr

    The path of the .mkv file to be read

  • unitFactorfloat [optional]

    A scalind factor to be applied to the moment values, for unit conversion. If omitted, it defaults to 1000.

class pyflange.fatigue.FatigueCurve

A Wohler curve

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

N(DS)

Number of cycles

Given a stress range DS, this function return the corresponding number of cycles that produce a fatigue failure.

DS(N)

Stress range

Given a number of cycles, this function return the corresponding stress range that produce a fatigue failure.

damage(n, DS)

Fatigue damage

Given a number of cycles n and a stress range DS, this function returns the dorresponding fatigue damage (D = n / N(DS)).

cumulated_damage(markov_matrix)

Cumulated damage according to the Miner’s rule

Parameters:

  • markov_matricpandas.DataFrame

    This is the load history expressed as a Markov matrix, encoded in a pandas DataFrame having three columns: - Cycles: containing the number of cycles; - Mean: containing the mean stress in Pascal; - Range: containing the stress range in Pascal.

class pyflange.fatigue.SingleSlopeFatigueCurve(m: float, DS_ref: float, N_ref: float)

Wohler curve with single logarithmic slope

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

Contructor parameters:

  • mfloat

    The logarithmic slope of the fatigue curve.

  • DS_reffloat

    Arbitrary reference stress range.

  • N_reffloat

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

Attributes:

  • mfloat

    The logarithmic slope of the fatigue curve.

  • DS_reffloat

    Reference stress range.

  • N_reffloat

    Number of cycles at failure corresponding to the stress range D_ref.

  • afloat

    The Wohler curve constant (a = DS_ref**m * N_ref = DS**m * N)

Methods:

This class implements all the methods of FatigueCurve.

N(DS)

Number of cycles

Given a stress range DS, this function return the corresponding number of cycles that produce a fatigue failure.

DS(N)

Stress range

Given a number of cycles, this function return the corresponding stress range that produce a fatigue failure.

class pyflange.fatigue.MultiSlopeFatigueCurve(*fatigue_curves)

Multi-Slope Fatigue Curve

This class is a FatigueCurve with multiple slopes. It takes any number of SingleSlopeFatigueCurve objects as arguments.

N(DS)

Number of cycles

Given a stress range DS, this function return the corresponding number of cycles that produce a fatigue failure.

DS(N)

Stress range

Given a number of cycles, this function return the corresponding stress range that produce a fatigue failure.

class pyflange.fatigue.DoubleSlopeFatigueCurve(m1, m2, DS12, N12)

Wohler curve with double logarithmic slope

This class implements the FatigueCurve interface for a curve with two slopes m1 and m2.

Contructor parameters:

  • m1float

    The logarithmic slope of the lower cycle values.

  • m2float

    The logarithmic slope of the higher cycle values.

  • DS12float

    The stress range where the two branches of the curve meet.

  • N12float

    The number of cycles to failure corresponding to DS12.

Attributes:

  • m1float

    The logarithmic slope of the lower cycle values.

  • m2float

    The logarithmic slope of the higher cycle values.

  • DS12float

    The stress range where the two branches of the curve meet.

  • N12float

    The number of cycles to failure corresponding to DS12.

Methods:

This class implements all the methods of FatigueCurve.

class pyflange.fatigue.BoltFatigueCurve(diameter, gamma_M=1.1)

Bolt Fatigue Curve according to IEC 61400-6 AMD1

Given a bolt diameter, creates a DoubleSlopeFatigueCurve having logaritmic slopes m1=3 and m2=5 and change-of-slope at 2 milion cycles and stress range depending on the bolt diameter as specified by IEC 61400-6 AMD1.

The constructor parameters are:

  • diameterfloat

    The bolt diameter in meters.

  • gamma_Mfloat [optional]

    The material factor. If omitted, it defaults to 1.1.

Thuis class inherits all the properties and methods of the DoubleSlopeFatigueCurve class.