weac.components package¶
Submodules¶
- weac.components.config module
- weac.components.criteria_config module
CriteriaConfig
CriteriaConfig.fn
CriteriaConfig.fm
CriteriaConfig.gn
CriteriaConfig.gm
CriteriaConfig.stress_envelope_method
CriteriaConfig.scaling_factor
CriteriaConfig.order_of_magnitude
CriteriaConfig.fn
CriteriaConfig.fm
CriteriaConfig.gn
CriteriaConfig.gm
CriteriaConfig.stress_envelope_method
CriteriaConfig.scaling_factor
CriteriaConfig.order_of_magnitude
CriteriaConfig.model_config
- weac.components.layer module
Layer
WeakLayer
WeakLayer.rho
WeakLayer.h
WeakLayer.nu
WeakLayer.E
WeakLayer.G
WeakLayer.kn
WeakLayer.kt
WeakLayer.G_c
WeakLayer.G_Ic
WeakLayer.G_IIc
WeakLayer.rho
WeakLayer.h
WeakLayer.collapse_height
WeakLayer.nu
WeakLayer.E
WeakLayer.G
WeakLayer.kn
WeakLayer.kt
WeakLayer.G_c
WeakLayer.G_Ic
WeakLayer.G_IIc
WeakLayer.sigma_c
WeakLayer.tau_c
WeakLayer.E_method
WeakLayer.grain_type
WeakLayer.grain_size
WeakLayer.hand_hardness
WeakLayer.model_config
WeakLayer.model_post_init()
WeakLayer.validate_positive_E_G()
- weac.components.model_input module
- weac.components.scenario_config module
- weac.components.segment module
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
andnu
.- Type:
float, optional
- kn¶
Normal (compression) spring stiffness kₙ [N mm⁻³]. If omitted it is computed as
E_plane / t
whereE_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.
- 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_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
andnu
.- 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.
- 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_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:
weak_layer (WeakLayer)
layers (List[Layer])
scenario_config (ScenarioConfig)
segments (List[Segment])
- scenario_config¶
Scenario configuration.
- Type:
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- scenario_config: ScenarioConfig¶