m_n_kappa.Material#

class m_n_kappa.Material(section_type, stress_strain=None)#

Bases: object

Provides basic functionality for materials

In case custom-type materials are created these must inherit from this class.

Parameters:
  • stress_strain (list[StressStrain]) – list with stress-strain_value-relationship

  • section_type (str) – section_type of section this material is ordered to. Possible values are: - slab - girder

See also

Concrete

material-behaviour of concrete

Steel

material-behaviour of steel

Reinforcement

material-behaviour of reinforcement

Examples

Base class

All material-models needs inheritance from Material to achieve basic functionality.

Stress-strain-points in the stress-strain-relationships need to be defined by StressStrain.

Adding new materials

A new material must inherit from Material.

The following code implements an arbitrary material model that act linear-elastic under compression and ideal-plastic under tension loading.

Two class-properties must be defined after initialization of the material:

  1. stress_strain (_stress_strain at initialization): stress-strain-relationship as a list of StressStrain

  2. section_type: defining the section-type this material is applied to. Possible values are:

    • 'girder'

    • 'slab'

from m_n_kappa.material import Material, StressStrain

class Arbitrary(Material):

    """arbitrary material"""

    def __init__(self):
        self._stress_strain = [
            StressStrain(stress=-10.0, strain=-0.001),
            StressStrain(stress=0.0, strain=0.0),
            StressStrain(stress=10.0, strain=0.001),
            StressStrain(stress=10.0, strain=0.01),
        ]

    @property
    def section_type(self):
        return "girder"

Methods

get_intermediate_strains(strain_1[, ...])

determine material points with strains between zero and given strain_value

get_material_stress(strain)

gives stress from the stress-strain_value-relationship corresponding with the given strain_value

sort_strains([reverse])

sorts stress-strain_value-relationship depending on strains

sort_strains_ascending()

sorts stress-strain_value-relationship so strains are ascending

sort_strains_descending()

sorts stress-strain_value-relationship so strains are descending

Attributes

maximum_strain

maximum strain_value in the stress-strain_value-relationship

minimum_strain

minimum strain_value in the stress-strain_value-relationship

section_type

section section_type

strains

strains from the stress-strain_value-relationship

stress_strain

list of stress-strain_value points

stresses

stresses from the stress-strain_value-relationship

get_intermediate_strains(strain_1, strain_2=0.0, include_strains=False)#

determine material points with strains between zero and given strain_value

Parameters:
  • strain_1 (float) – 1st strain-value

  • strain_2 (float) – 2nd strain-value (Default: 0.0)

  • include_strains (bool) – includes the boundary strain values (Default: False)

Returns:

determine material points with strains between zero and given strain_value

Return type:

list[float]

get_material_stress(strain)#

gives stress from the stress-strain_value-relationship corresponding with the given strain_value

Parameters:

strain (float) – strain_value a corresponding stress value should be given

Returns:

stress corresponding to the given strain-value in the material-model

Return type:

float

Raises:

ValueError – when strain is outside the boundary values of the material-model

sort_strains(reverse=False)#

sorts stress-strain_value-relationship depending on strains

Parameters:

reverse (bool) –

  • True: sorts strains descending

  • False: sorts strains ascending (Default)

Return type:

None

sort_strains_ascending()#

sorts stress-strain_value-relationship so strains are ascending

Return type:

None

sort_strains_descending()#

sorts stress-strain_value-relationship so strains are descending

Return type:

None

property maximum_strain: float#

maximum strain_value in the stress-strain_value-relationship

property minimum_strain: float#

minimum strain_value in the stress-strain_value-relationship

property section_type: str#

section section_type

property strains: list#

strains from the stress-strain_value-relationship

property stress_strain: list[m_n_kappa.material.StressStrain]#

list of stress-strain_value points

property stresses: list#

stresses from the stress-strain_value-relationship