StressStrainProfile#

class concreteproperties.stress_strain_profile.StressStrainProfile(strains: list[float], stresses: list[float])[source]#

Bases: object

Abstract base class for a material stress-strain profile.

Implements a piecewise linear stress-strain profile. Positive stresses & strains are compression.

Parameters:
  • strains (list[float]) – List of strains (must be increasing or at least equal to last)

  • stresses (list[float]) – List of stresses

Raises:
  • ValueError – If length of strains is not equal to length of stresses

  • ValueError – If length of strains/stresses is not greater than 1

  • ValueError – If strains do not contain increasing or equal values

Methods

get_compressive_strength

Returns the most positive stress.

get_elastic_modulus

Returns the elastic modulus of the stress-strain profile.

get_stress

Returns a stress given a strain.

get_tensile_strength

Returns the most negative stress.

get_ultimate_compressive_strain

Returns the largest compressive strain.

get_ultimate_tensile_strain

Returns the largest tensile strain.

get_unique_strains

Returns an ordered list of unique strains.

get_yield_strength

Returns the yield strength of the stress-strain profile.

plot_stress_strain

Plots the stress-strain profile.

print_properties

Prints the stress-strain profile properties to the terminal.

Attributes

strains

stresses

get_stress(strain: float) float[source]#

Returns a stress given a strain.

Parameters:

strain (float) – Strain at which to return a stress.

Returns:

Stress

Return type:

float

get_elastic_modulus() float[source]#

Returns the elastic modulus of the stress-strain profile.

Raises:

ValueError – Elastic modulus is zero

Returns:

Elastic modulus

Return type:

float

get_compressive_strength() float[source]#

Returns the most positive stress.

Returns:

Compressive strength

Return type:

float

get_tensile_strength() float[source]#

Returns the most negative stress.

Returns:

Tensile strength

Return type:

float

get_yield_strength() float[source]#

Returns the yield strength of the stress-strain profile.

Raises:

NotImplementedError – If this method has not been implemented by the child class

Return type:

float

get_ultimate_compressive_strain() float[source]#

Returns the largest compressive strain.

Returns:

Ultimate strain

Return type:

float

get_ultimate_tensile_strain() float[source]#

Returns the largest tensile strain.

Returns:

Ultimate strain

Return type:

float

get_unique_strains() list[float][source]#

Returns an ordered list of unique strains.

Returns:

Ordered list of unique strains

Return type:

list[float]

print_properties(fmt: str = '8.6e') None[source]#

Prints the stress-strain profile properties to the terminal.

Parameters:

fmt (str) – Number format

plot_stress_strain(title: str = 'Stress-Strain Profile', fmt: str = 'o-', **kwargs) matplotlib.axes.Axes[source]#

Plots the stress-strain profile.

Parameters:
Returns:

Matplotlib axes object

Return type:

matplotlib.axes.Axes