Package weac

WEak Layer AntiCrack nucleation model.

Implementation of closed-form analytical models for the analysis of dry-snow slab avalanche release.

Expand source code
"""
WEak Layer AntiCrack nucleation model.

Implementation of closed-form analytical models for the analysis of
dry-snow slab avalanche release.
"""

# Module imports
from weac.layered import Layered
from weac.inverse import Inverse
from weac import plot

# Version
__version__ = '2.0.0'

# Public names
__all__ = [
    'Layered',
    'Inverse',
    'plot'
]

Sub-modules

weac.eigensystem

Base class for the elastic analysis of layered snow slabs.

weac.fracture

Fracture mechanics methods for WEak Layer AntiCrack nucleation model.

weac.inverse

Class for the elastic analysis of layered snow slabs.

weac.layered

Class for the elastic analysis of layered snow slabs.

weac.mixins

Mixins for the elastic analysis of layered snow slabs.

weac.plot

Plotting resources for the WEak Layer AntiCrack nucleation model.

weac.tools

Helper functions for the WEak Layer AntiCrack nucleation model.

Classes

class Inverse (system='pst-', layers=None, parameters=(6.0, 4.6, 0.25))

Fit the elastic properties of the layers of a snowpack.

Allows for the inverse identification of the elastic properties of the layers of a snowpack from full-field displacement measurements.

Inherits methods for the eigensystem calculation from the base class Eigensystem(), methods for the calculation of field quantities from FieldQuantitiesMixin(), methods for the solution of the system from SolutionMixin() and methods for the output analysis from AnalysisMixin().

Initialize model with user input.

Arguments

system : str, optional
Type of system to analyse. Default is 'pst-'.
layers : list, optional
List of layer densities and thicknesses. Default is None.
parameters : tuple, optional
Fitting parameters C0, C1, and Eweak. Multiplicative constant of Young modulus parametrization, exponent constant of Young modulus parametrization, and weak-layer Young modulus, respectively. Default is (6.0, 4.6, 0.25).
Expand source code
class Inverse(FieldQuantitiesMixin, SolutionMixin, AnalysisMixin, Eigensystem):
    """
    Fit the elastic properties of the layers of a snowpack.

    Allows for the inverse identification of the elastic properties
    of the layers of a snowpack from full-field displacement
    measurements.

    Inherits methods for the eigensystem calculation from the base
    class Eigensystem(), methods for the calculation of field
    quantities from FieldQuantitiesMixin(), methods for the solution
    of the system from SolutionMixin() and methods for the output
    analysis from AnalysisMixin().
    """

    def __init__(
            self, system='pst-', layers=None, parameters=(6.0, 4.6, 0.25)):
        """
        Initialize model with user input.

        Arguments
        ---------
        system : str, optional
            Type of system to analyse. Default is 'pst-'.
        layers : list, optional
            List of layer densities and thicknesses. Default is None.
        parameters : tuple, optional
            Fitting parameters C0, C1, and Eweak. Multiplicative constant
            of Young modulus parametrization, exponent constant of Young
            modulus parametrization, and weak-layer Young modulus,
            respectively. Default is (6.0, 4.6, 0.25).
        """
        # Call parent __init__
        super().__init__(system=system)

        # Unpack fitting parameters
        C0, C1, Eweak = parameters

        # Set material properties
        self.set_beam_properties(layers=layers, C0=C0, C1=C1)
        self.set_foundation_properties(E=Eweak)

        # Set up model
        self.calc_foundation_stiffness()
        self.calc_laminate_stiffness_matrix()
        self.calc_system_matrix()
        self.calc_eigensystem()

Ancestors

Inherited members

class Layered (system='pst-', layers=None)

Layered beam on elastic foundation model application interface.

Inherits methods for the eigensystem calculation from the base class Eigensystem(), methods for the calculation of field quantities from FieldQuantitiesMixin(), methods for the solution of the system from SolutionMixin() and methods for the output analysis from AnalysisMixin().

Initialize model with user input.

Arguments

system : {'pst-', '-pst', 'skier', 'skiers'}, optional
Type of system to analyse: PST cut from the right (pst-), PST cut form the left (-pst), one skier on infinite slab (skier) or multiple skiers on infinite slab (skiers). Default is 'pst-'.
layers : list, optional
2D list of layer densities and thicknesses. Columns are density(kg/m ^ 3) and thickness(mm). One row corresponds to one layer. Default is [[240, 200], ].
Expand source code
class Layered(FieldQuantitiesMixin, SolutionMixin, AnalysisMixin, Eigensystem):
    """
    Layered beam on elastic foundation model application interface.

    Inherits methods for the eigensystem calculation from the base
    class Eigensystem(), methods for the calculation of field
    quantities from FieldQuantitiesMixin(), methods for the solution
    of the system from SolutionMixin() and methods for the output
    analysis from AnalysisMixin().
    """

    def __init__(self, system='pst-', layers=None):
        """
        Initialize model with user input.

        Arguments
        ---------
        system : {'pst-', '-pst', 'skier', 'skiers'}, optional
            Type of system to analyse: PST cut from the right (pst-),
            PST cut form the left (-pst), one skier on infinite
            slab (skier) or multiple skiers on infinite slab (skiers).
            Default is 'pst-'.
        layers : list, optional
            2D list of layer densities and thicknesses. Columns are
            density(kg/m ^ 3) and thickness(mm). One row corresponds
            to one layer. Default is [[240, 200], ].
        """
        # Call parent __init__
        super().__init__(system=system)

        # Set material properties
        self.set_beam_properties(layers if layers else [[240, 200], ])
        self.set_foundation_properties()

        # Set up model
        self.calc_foundation_stiffness()
        self.calc_laminate_stiffness_matrix()
        self.calc_system_matrix()
        self.calc_eigensystem()

Ancestors

Inherited members