weac.components package

Submodules

Module contents

Component Classes for Inputs of the WEAC model.

class weac.components.Config(*, touchdown=False)[source]

Bases: BaseModel

Configuration for the WEAC simulation.

Parameters:

touchdown (bool)

touchdown

Whether slab touchdown on the collapsed weak layer is considered.

Type:

bool

model_config: ClassVar[ConfigDict] = {}

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

touchdown: bool
class weac.components.WeakLayer(*, rho=125, h=20, collapse_height=0.0, nu=0.25, E=0.0, G=0.0, kn=0.0, kt=0.0, G_c=1.0, G_Ic=0.56, G_IIc=0.79, sigma_c=6.16, tau_c=5.09, E_method='bergfeld', grain_type=None, grain_size=None, hand_hardness=None)[source]

Bases: BaseModel

Weak layer that also behaves as a Winkler foundation.

Parameters:
  • rho (float)

  • h (float)

  • collapse_height (float)

  • nu (float)

  • E (float)

  • G (float)

  • kn (float)

  • kt (float)

  • G_c (float)

  • G_Ic (float)

  • G_IIc (float)

  • sigma_c (float)

  • tau_c (float)

  • 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

kn

Normal (compression) spring stiffness kₙ [N mm⁻³]. If omitted it is computed as E_plane / t where E_plane = E / (1 - nu²).

Type:

float, optional

kt

Shear spring stiffness kₜ [N mm⁻³]. If omitted it is G / t.

Type:

float, optional

G_c

Total fracture energy Gc [J/m^2]. Default 1.0 J/m^2.

Type:

float

G_Ic

Mode-I fracture toughness GIc [J/m^2]. Default 0.56 J/m^2.

Type:

float

G_IIc

Mode-II fracture toughness GIIc [J/m^2]. Default 0.79 J/m^2.

Type:

float

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True}

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

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.

rho: float
h: float
collapse_height: float
nu: float
E: float
G: float
kn: float
kt: float
G_c: float
G_Ic: float
G_IIc: float
sigma_c: float
tau_c: float
E_method: Literal['bergfeld', 'scapazzo', 'gerling']
grain_type: GrainType | None
grain_size: float | None
hand_hardness: HandHardness | None
class weac.components.Layer(*, rho=150, h=200, nu=0.25, E=0.0, G=0.0, tensile_strength=0.0, tensile_strength_method='sigrist', E_method='bergfeld', grain_type=None, grain_size=None, hand_hardness=None)[source]

Bases: BaseModel

Regular slab layer (no foundation springs).

Parameters:
  • rho (float)

  • h (float)

  • nu (float)

  • E (float)

  • G (float)

  • tensile_strength (float)

  • tensile_strength_method (Literal['sigrist'])

  • 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

model_config: ClassVar[ConfigDict] = {}

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

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.

rho: float
h: float
nu: float
E: float
G: float
tensile_strength: float
tensile_strength_method: Literal['sigrist']
E_method: Literal['bergfeld', 'scapazzo', 'gerling']
grain_type: GrainType | None
grain_size: float | None
hand_hardness: HandHardness | None
class weac.components.Segment(*, length=5000.0, has_foundation=True, m=0)[source]

Bases: BaseModel

Defines a snow-slab segment: its length, foundation support, and applied loads.

Parameters:
  • length (float)

  • has_foundation (bool)

  • m (float)

length

Segment length in millimeters [mm].

Type:

float

has_foundation

Whether the segment is supported (foundation present) or cracked/free-hanging (no foundation).

Type:

bool

m

Skier mass at the segment’s right edge [kg].

Type:

float

model_config: ClassVar[ConfigDict] = {}

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

length: float
has_foundation: bool
m: float
class weac.components.CriteriaConfig(*, fn=2.0, fm=2.0, gn=5.0, gm=2.2222222222222223, stress_envelope_method='adam_unpublished', scaling_factor=1, order_of_magnitude=1)[source]

Bases: BaseModel

Parameters defining the interaction between different failure modes.

Parameters:
  • fn (float)

  • fm (float)

  • gn (float)

  • gm (float)

  • stress_envelope_method (Literal['adam_unpublished', 'schottner', 'mede_s-RG1', 'mede_s-RG2', 'mede_s-FCDH'])

  • scaling_factor (float)

  • order_of_magnitude (float)

fn

Failure mode interaction exponent for normal stress (sigma). Default is 2.0.

Type:

float

fm

Failure mode interaction exponent for shear stress (tau). Default is 2.0.

Type:

float

gn

Failure mode interaction exponent for closing energy release rate (G_I). Default is 5.0.

Type:

float

gm

Failure mode interaction exponent for shearing energy release rate (G_II). Default is 2.22.

Type:

float

stress_envelope_method

Method to calculate the stress failure envelope. Default is “adam_unpublished”.

Type:

str

scaling_factor

Scaling factor for stress envelope. Default is 1.0.

Type:

float

order_of_magnitude

Order of magnitude for stress envelope. Default is 1.0.

Type:

float

model_config: ClassVar[ConfigDict] = {}

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

fn: float
fm: float
gn: float
gm: float
stress_envelope_method: Literal['adam_unpublished', 'schottner', 'mede_s-RG1', 'mede_s-RG2', 'mede_s-FCDH']
scaling_factor: float
order_of_magnitude: float
class weac.components.ScenarioConfig(*, system_type='skiers', phi=0.0, cut_length=0.0, stiffness_ratio=1000.0, surface_load=0.0)[source]

Bases: BaseModel

Configuration for the overall scenario, such as slope angle.

Parameters:
  • system_type (Literal['skier', 'skiers', 'pst-', '-pst', 'rot', 'trans', 'vpst-', '-vpst'])

  • phi (float)

  • cut_length (float)

  • stiffness_ratio (float)

  • surface_load (float)

phi

Slope angle in degrees (counterclockwise positive).

Type:

float, optional

system_type

Type of system. Allowed values are: - skier: single skier in-between two segments - skiers: multiple skiers spread over the slope - pst-: positive PST: down-slope + slab-normal cuts - -pst: negative PST: up-slope + slab-normal cuts - rot: rotation: rotation of the slab - trans: translation: translation of the slab - vpst-: positive VPST: down-slope + vertical cuts - -vpst: negative VPST: up-slope + vertical cuts

Type:

SystemType

cut_length

Cut length for PST/VPST [mm].

Type:

float, optional

stiffness_ratio

Stiffness ratio between collapsed and uncollapsed weak layer.

Type:

float, optional

surface_load

Surface line-load on slab [N/mm] (force per mm of out-of-plane width).

Type:

float, optional

model_config: ClassVar[ConfigDict] = {}

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

system_type: Literal['skier', 'skiers', 'pst-', '-pst', 'rot', 'trans', 'vpst-', '-vpst']
phi: float
cut_length: float
stiffness_ratio: float
surface_load: float
class weac.components.ModelInput(*, weak_layer=<factory>, layers=<factory>, scenario_config=<factory>, segments=<factory>)[source]

Bases: BaseModel

Comprehensive input data model for a WEAC simulation.

Parameters:
scenario_config

Scenario configuration.

Type:

ScenarioConfig

weak_layer

Weak layer properties.

Type:

WeakLayer

layers

List of snow slab layers.

Type:

List[Layer]

segments

List of segments defining the slab geometry and loading.

Type:

List[Segment]

model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}

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

weak_layer: WeakLayer
layers: List[Layer]
scenario_config: ScenarioConfig
segments: List[Segment]