The notch approximation law classes

The following classes are available: ExtendedNeuber, SeegerBeste, and Binned.

The ExtendedNeuber and SeegerBeste classes implement the respective notch approximations.

The Binned class implements binning to a predefined number of bins. It contains an object of either ExtendedNeuber or SeegerBeste. The respective stress and strain values from the notch approximation for equi-spaced load values get precomputed and stored in a lookup table. This speeds up the computation as only the initialization step is compute intense.

class pylife.materiallaws.notch_approximation_law.ExtendedNeuber(E, K, n, K_p=None)[source]

Implementation of the extended Neuber notch approximation material relation.

This notch approximation law is used for the P_RAM damage parameter in the FKM nonlinear guideline (2019). Given an elastic-plastic stress (and strain) from a linear FE calculation, it derives a corresponding elastic-plastic stress (and strain).

Note, the input stress and strain follow a linear relationship \(\sigma = E \cdot \epsilon\). The output stress and strain follow the Ramberg-Osgood relation.

Parameters:
  • E (float) – Young’s Modulus

  • K (float) – The strain hardening coefficient, often also designated \(K'\), or K_prime.

  • n (float) – The strain hardening exponent, often also designated \(n'\), or n_prime.

  • K_p (float, optional) – The shape factor (de: Traglastformzahl)

Notes

The equation implemented is described in the FKM nonlinear reference, chapter 2.5.7.

property E

Young’s Modulus

property K

the strength coefficient

property K_p

Traglastformzahl)

Type:

the shape factor (de

property K_prime

the strength coefficient

load(stress, *, rtol=0.0001, tol=0.0001)[source]

Apply the notch-approximation law “backwards”, i.e., compute the linear-elastic stress (called “load” or “L” in FKM nonlinear) from the elastic-plastic stress as from the notch approximation. This backward step is needed for the pfp FKM nonlinear surface layer & roughness.

This method is the inverse operation of “stress”, i.e., L = load(stress(L)) and S = stress(load(stress)).

Parameters:
  • stress (array-like float) – The elastic-plastic stress as computed by the notch approximation

  • rtol (float, optional) – The relative tolerance to which the implicit formulation of the load gets solved, by default 1e-4

  • tol (float, optional) – The absolute tolerance to which the implicit formulation of the load gets solved, by default 1e-4

Returns:

load – The resulting load or lienar-elastic stress.

Return type:

array-like float

load_secondary_branch(delta_stress, *, rtol=0.0001, tol=0.0001)[source]

Apply the notch-approximation law “backwards”, i.e., compute the linear-elastic stress (called “load” or “L” in FKM nonlinear) from the elastic-plastic stress as from the notch approximation. This backward step is needed for the pfp FKM nonlinear surface layer & roughness.

This method is the inverse operation of “stress”, i.e., L = load(stress(L)) and S = stress(load(stress)).

Parameters:
  • delta_stress (array-like float) – The increment of the elastic-plastic stress as computed by the notch approximation

  • rtol (float, optional) – The relative tolerance to which the implicit formulation of the stress gets solved, by default 1e-4

  • tol (float, optional) – The absolute tolerance to which the implicit formulation of the stress gets solved, by default 1e-4

Returns:

delta_load – The resulting load or lienar-elastic stress.

Return type:

array-like float

property n

the strain hardening coefficient

property ramberg_osgood_relation

the Ramberg-Osgood relation object, i.e., an object of type RambergOsgood

strain(stress, load)[source]

Calculate the strain of the primary path in the stress-strain diagram at a given stress and load. The formula is given by eq. 2.5-42 of FKM nonlinear. load / stress * self._K_p * e_star

Parameters:
  • stress (array-like float) – The stress

  • load (array-like float) – The load

Returns:

strain – The resulting strain

Return type:

array-like float

strain_secondary_branch(delta_stress, delta_load)[source]

Calculate the strain on secondary branches in the stress-strain diagram at a given stress and load. The formula is given by eq. 2.5-46 of FKM nonlinear.

Parameters:
  • delta_sigma (array-like float) – The stress increment

  • delta_load (array-like float) – The load increment

Returns:

strain – The resulting strain

Return type:

array-like float

stress(load, *, rtol=0.0001, tol=0.0001)[source]

Calculate the stress of the primary path in the stress-strain diagram at a given elastic-plastic stress (load), from a FE computation. This is done by solving for the root of f(sigma) in eq. 2.5-45 of FKM nonlinear.

Parameters:
  • load (array-like float) – The elastic von Mises stress from a linear elastic FEA. In the FKM nonlinear document, this is also called load “L”, because it is derived from a load-time series. Note that this value is scaled to match the actual loading in the assessment, it equals the FEM solution times the transfer factor.

  • rtol (float, optional) – The relative tolerance to which the implicit formulation of the stress gets solved, by default 1e-4

  • tol (float, optional) – The absolute tolerance to which the implicit formulation of the stress gets solved, by default 1e-4

Returns:

stress – The resulting elastic-plastic stress according to the notch-approximation law.

Return type:

array-like float

stress_secondary_branch(delta_load, *, rtol=0.0001, tol=0.0001)[source]

Calculate the stress on secondary branches in the stress-strain diagram at a given elastic-plastic stress (load), from a FE computation. This is done by solving for the root of f(sigma) in eq. 2.5-46 of FKM nonlinear.

Parameters:
  • delta_load (array-like float) – The load increment of the hysteresis

  • rtol (float, optional) – The relative tolerance to which the implicit formulation of the stress gets solved, by default 1e-4

  • tol (float, optional) – The absolute tolerance to which the implicit formulation of the stress gets solved, by default 1e-4

Returns:

delta_stress – The resulting stress increment within the hysteresis

Return type:

array-like float

class pylife.materiallaws.notch_approximation_law_seegerbeste.SeegerBeste(E, K, n, K_p=None)[source]

Implementation of the Seeger-Beste notch approximation material relation.

This notch approximation law is used for the P_RAJ damage parameter in the FKM nonlinear guideline (2019). Given an elastic-plastic stress (and strain) from a linear FE calculation, it derives a corresponding elastic-plastic stress (and strain).

Note, the input stress and strain follow a linear relationship \(\sigma = E \cdot \epsilon\). The output stress and strain follow the Ramberg-Osgood relation.

Parameters:
  • E (float) – Young’s Modulus

  • K (float) – The strength coefficient, often also designated \(K'\), or K_prime.

  • n (float) – The strain hardening coefficient, often also designated \(n'\), or n_prime.

  • K_p (float) – The shape factor (de: Traglastformzahl)

Notes

The equation implemented is described in the FKM nonlinear reference, chapter 2.8.7.

property E

Young’s Modulus

property K

the strength coefficient

property K_p

Traglastformzahl)

Type:

the shape factor (de

property K_prime

the strength coefficient

load(stress, *, rtol=0.0001, tol=0.0001)[source]

Apply the notch-approximation law “backwards”, i.e., compute the linear-elastic stress (called “load” or “L” in FKM nonlinear) from the elastic-plastic stress as from the notch approximation. This backward step is needed for the pfp FKM nonlinear surface layer & roughness.

This method is the inverse operation of “stress”, i.e., L = load(stress(L)) and S = stress(load(stress)).

Note that this method is only implemented for the scalar case, as the FKM nonlinear surface layer & roughness also only handles the scalar case with one assessment point at once, not with entire meshes.

Parameters:

stress (array-like float) – The elastic-plastic stress as computed by the notch approximation

Returns:

load – The resulting load or linear elastic stress.

Return type:

array-like float

load_secondary_branch(delta_stress, *, rtol=0.0001, tol=0.0001)[source]

Apply the notch-approximation law “backwards”, i.e., compute the linear-elastic stress (called “load” or “L” in FKM nonlinear) from the elastic-plastic stress as from the notch approximation. This backward step is needed for the pfp FKM nonlinear surface layer & roughness.

This method is the inverse operation of “stress”, i.e., L = load(stress(L)) and S = stress(load(stress)).

Note that this method is only implemented for the scalar case, as the FKM nonlinear surface layer & roughness also only handles the scalar case with one assessment point at once, not with entire meshes.

Parameters:

delta_stress (array-like float) – The increment of the elastic-plastic stress as computed by the notch approximation

Returns:

delta_load – The resulting load or linear elastic stress.

Return type:

array-like float

property n

the strain hardening coefficient

property ramberg_osgood_relation

the Ramberg-Osgood relation object, i.e., an object of type RambergOsgood

strain(stress, load)[source]

Calculate the strain of the primary path in the stress-strain diagram at a given stress and load. The formula is given by eq. 2.8-39 of FKM nonlinear. load / stress * self._K_p * e_star

Parameters:
  • stress (array-like float) – The stress

  • load (array-like float) – The load

Returns:

strain – The resulting strain

Return type:

array-like float

strain_secondary_branch(delta_stress, delta_load)[source]

Calculate the strain on secondary branches in the stress-strain diagram at a given stress and load. The formula is given by eq. 2.8-43 of FKM nonlinear.

Parameters:
  • delta_sigma (array-like float) – The stress increment

  • delta_load (array-like float) – The load increment

Returns:

strain – The resulting strain

Return type:

array-like float

stress(load, *, rtol=0.0001, tol=0.0001)[source]

Calculate the stress of the primary path in the stress-strain diagram at a given elastic-plastic stress (load), from a FE computation. This is done by solving for the root of f(sigma) in eq. 2.8-42 of FKM nonlinear.

The secant method is used which does not rely on a derivative and has good numerical stability properties, but is slower than Newton’s method. The algorithm is implemented in scipy for multiple values at once. The documentation states that this is faster for more than ~100 entries than a simple loop over the individual values.

We employ the scipy function on all items in the given array at once. Usually, some of them fail and we recompute the value of the failed items afterwards. Calling the Newton method on a scalar function somehow always converges, while calling the Newton method with same initial conditions on the same values, but with multiple at once, fails sometimes.

Parameters:

load (array-like float) – The load

Returns:

stress – The resulting stress

Return type:

array-like float

stress_secondary_branch(delta_load, *, rtol=0.0001, tol=0.0001)[source]

Calculate the stress on secondary branches in the stress-strain diagram at a given elastic-plastic stress (load), from a FE computation. This is done by solving for the root of f(sigma) in eq. 2.8-43 of FKM nonlinear.

Parameters:

delta_load (array-like float) – The load increment of the hysteresis

Returns:

delta_stress – The resulting stress increment within the hysteresis

Return type:

array-like float

Todo

In the future, we can evaluate the runtime performance and try a Newton method instead of the currently used secant method to speed up the computation.

fprime=self._d_stress_secondary_implicit_numeric
class pylife.materiallaws.notch_approximation_law.Binned(notch_approximation_law, maximum_absolute_load, number_of_bins=100)[source]

Binning for notch approximation laws, as described in FKM nonlinear 2.5.8.2, p.55. The implicitly defined stress function of the notch approximation law is precomputed for various loads at a fixed number of equispaced bins. The values are stored in two look-up tables for the primary and secondary branches of the stress-strain hysteresis curves. When stress and strain values are needed for a given load, the nearest value of the corresponding bin is retrived. This is faster than invoking the nonlinear root finding algorithm for every new load.

There are two variants of the data structure.

  • First, for a single assessment point, the lookup-table contains one load, strain and stress value in every bin.

  • Second, for vectorized assessment of multiple nodes at once, the lookup-table contains at every load bin a list with stress and strain values for every node. The DataFrame has a multi-index over class_index and node_id.

property ramberg_osgood_relation

The ramberg osgood relation object

strain(stress, load)[source]

Get the strain of the primary path in the stress-strain diagram at a given stress and load by using the value of the look-up table.

Parameters:
  • stress (array-like float) – The stress

  • load (array-like float) – The load

Returns:

strain – The resulting strain

Return type:

array-like float

strain_secondary_branch(delta_stress, delta_load)[source]

Get the strain on secondary branches in the stress-strain diagram at a given stress and load by using the value of the look-up table.

Parameters:
  • delta_stress (array-like float) – The stress increment

  • delta_load (array-like float) – The load increment

Returns:

strain – The resulting strain

Return type:

array-like float

stress(load, *, rtol=1e-05, tol=1e-06)[source]

The stress of the primary path in the stress-strain diagram at a given load by using the value of the look-up table.

Note

The exact value would be computed by self._notch_approximation_law.stress(load).

Parameters:
  • load (array-like float) – The load, either a scalar value or a pandas DataFrame with RangeIndex (no named index)

  • rtol (float, optional) – The relative tolerance to which the implicit formulation of the stress gets solved. In this case for the Binning class, the parameter is not used.

  • tol (float, optional) – The absolute tolerance to which the implicit formulation of the stress gets solved. In this case for the Binning class, the parameter is not used.

Returns:

stress – The resulting stress

Return type:

array-like float

stress_secondary_branch(delta_load, *, rtol=1e-05, tol=1e-06)[source]

Get the stress on secondary branches in the stress-strain diagram at a given load by using the value of the look-up table.

Parameters:
  • delta_load (array-like float) – The load increment of the hysteresis

  • rtol (float, optional) – The relative tolerance to which the implicit formulation of the stress gets solved. In this case for the Binning class, the parameter is not used.

  • tol (float, optional) – The absolute tolerance to which the implicit formulation of the stress gets solved. In this case for the Binning class, the parameter is not used.

Returns:

delta_stress – The resulting stress increment within the hysteresis

Return type:

array-like float