WEAC API Documentation¶
WEAC (Weak Layer Anticrack Nucleation Model) is a Python implementation of closed-form analytical models for the analysis of dry-snow slab avalanche release.
What is WEAC?¶
WEAC implements closed-form analytical models for the mechanical analysis of dry-snow slabs on compliant weak layers, the prediction of anticrack onset, and allows for the analysis of stratified snow covers.
The model covers: - Propagation saw tests (a) - Skier-loaded weak layers (b) - Weak-layer crack nucleation (c)

Installation¶
Install globally using the pip Package Installer for Python:
pip install -U weac
Or clone the repository for local use:
git clone https://github.com/2phi/weac
Requirements: - Python ≥ 3.12 - Numpy ≥ 2.0.1 - Scipy ≥ 1.14.0 - Matplotlib ≥ 3.9.1 - Pydantic ≥ 2.11.7 - Snowpylot ≥ 1.1.3
Quick Start¶
import weac
# Create a scenario configuration
scenario = weac.components.scenario_config.ScenarioConfig()
# Run analysis
results = weac.analysis.analyzer.Analyzer.analyze(scenario)
🐙 View on GitHub: GitHub Repository
Key Features¶
Closed-form analytical models for snow slab mechanics
Weak layer analysis with compliance and collapse modeling
Anticrack prediction using mixed-mode failure criteria
Stratified snow cover analysis capabilities
Python-native implementation with comprehensive documentation
Jupyter notebook support for interactive analysis
Multiple scenario types: Skier loading, PST (Propagation Saw Test), and more
Advanced visualization tools for deformations and stress analysis
Usage Examples¶
Basic usage involves creating snow layers, weak layers, and scenario configurations:
from weac.components import Layer, WeakLayer, ScenarioConfig, Segment, ModelInput, Config
from weac.core.system_model import SystemModel
from weac.analysis.analyzer import Analyzer
# Define snow layers (from top to bottom)
layers = [
Layer(rho=170, h=100), # Surface layer
Layer(rho=190, h=40),
Layer(rho=230, h=130),
Layer(rho=250, h=20),
Layer(rho=210, h=70),
Layer(rho=380, h=20),
Layer(rho=280, h=100) # Last slab layer above weak layer
]
# Define weak layer
weak_layer = WeakLayer(rho=125, h=20)
# Create skier scenario
skier_config = ScenarioConfig(system_type='skier', phi=30)
skier_segments = [
Segment(length=5000, has_foundation=True, m=0),
Segment(length=0, has_foundation=False, m=80), # 80kg skier
Segment(length=0, has_foundation=False, m=0),
Segment(length=5000, has_foundation=True, m=0),
]
# Build and analyze system
system = SystemModel(
model_input=ModelInput(
weak_layer=weak_layer,
scenario_config=skier_config,
layers=layers,
segments=skier_segments,
),
config=Config(touchdown=True)
)
# Analyze results
analyzer = Analyzer(system)
xsl, z, xwl = analyzer.rasterize_solution(mode="cracked")
Gdif, GdifI, GdifII = analyzer.differential_ERR()
Documentation Structure¶
Getting Started
Utilities & Tools
Examples & Reference
Research & Citations¶
Cite the software: Rosendahl, P. L., Schneider, J., & Weissgraeber, P. (2022). Weak Layer Anticrack Nucleation Model (WEAC). Zenodo. https://doi.org/10.5281/zenodo.5773113
Key publications: - A closed-form model for layered snow slabs (Weißgraeber & Rosendahl, 2023) - Modeling snow slab avalanches caused by weak-layer failure (Rosendahl & Weißgraeber, 2020)
Support & Community¶
Getting Help¶
Documentation: This site provides comprehensive API documentation
Examples: Check the modules section for usage examples
Demo: Interactive Jupyter notebook with examples
Research Papers: Refer to the publications listed above for theoretical background
GitHub: Visit the repository for source code and issue tracking
Need help? Open an issue on GitHub or check the documentation structure below.
License¶
WEAC is licensed under CC BY-NC-SA 4.0.
Contact¶
Email: mail@2phi.de
Web: https://2phi.de
Project: https://github.com/2phi/weac