weac.components.layer module

Mechanical properties of snow-pack layers.

  • Layer - a regular slab layer (no foundation springs)

  • WeakLayer - re-exported from weac.components.weak_layer for compatibility

class weac.components.layer.Layer(*, rho=150, h=200, nu=0.25, E=0.0, G=0.0, tensile_strength=0.0, tensile_strength_method='jamieson_johnson', E_method='bergfeld', grain_type=None, grain_size=None, hand_hardness=None)[source]

Bases: BaseModel

Regular slab layer (no foundation springs).

Parameters:
  • rho (Annotated[float, Gt(gt=0)])

  • h (Annotated[float, Gt(gt=0)])

  • nu (Annotated[float, Ge(ge=0), Lt(lt=0.5)])

  • E (Annotated[float, Ge(ge=0)])

  • G (Annotated[float, Ge(ge=0)])

  • tensile_strength (Annotated[float, Ge(ge=0)])

  • tensile_strength_method (Literal['sigrist', 'adam', 'hybrid', 'jamieson_johnson'])

  • E_method (Literal['bergfeld', 'scapazzo', 'gerling'])

  • grain_type (GrainType | None)

  • grain_size (float | None)

  • hand_hardness (HandHardness | None)

rho

Density of the layer [kg m⁻³].

Type:

float

h

Height/Thickness of the layer [mm].

Type:

float

nu

Poisson’s ratio [-] Defaults to weac.constants.NU).

Type:

float

E

Young’s modulus E [MPa]. If omitted it is derived from rho.

Type:

float, optional

G

Shear modulus G [MPa]. If omitted it is derived from E and nu.

Type:

float, optional

tensile_strength

Tensile strength [kPa].

Type:

float

tensile_strength_method

Method to calculate the tensile strength.

Type:

Literal[“sigrist”, “adam”, “hybrid”, “jamieson_johnson”]

rho: float
h: float
nu: float
E: float
G: float
tensile_strength: float
tensile_strength_method: Literal['sigrist', 'adam', 'hybrid', 'jamieson_johnson']
E_method: Literal['bergfeld', 'scapazzo', 'gerling']
grain_type: GrainType | None
grain_size: float | None
hand_hardness: HandHardness | None
model_post_init(_ctx)[source]

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

validate_positive_E_G()[source]

Validate that E and G are positive.

model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].