Skip to content

Latest commit

 

History

History
326 lines (246 loc) · 18.2 KB

README.md

File metadata and controls

326 lines (246 loc) · 18.2 KB


WEAC

WEAC
Weak Layer Anticrack Nucleation Model

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

Release Release Release

View the demo · Report a bug · Request a feature · Read the docs · Cite the software


Contents

  1. About the project
  2. Installation
  3. Usage
  4. Roadmap
  5. Release history
  6. How to contribute
  7. License
  8. Contact

About the project

WEAC implements closed-form analytical models for the mechanical analysis of dry-snow slabs on compliant weak layers, the prediction of anticrack onset, and, in particular, allows for the analysis of stratified snow covers. The model covers propagation saw tests (a), and uncracked (b) or cracked (c) skier-loaded buried weak layers.

Systems

Cite the repository as:

Rosendahl, P. L., Schneider, J., & Weissgraeber, P. (2022). Weak Layer Anticrack Nucleation Model (WEAC). Zenodo. https://doi.org/10.5281/zenodo.5773113

Read the 📄 white paper for model derivations, illustrations, dimensions, material properties, and kinematics:

For more background info, please refer to the companion papers:

  • Rosendahl, P. L. & Weißgraeber, P. (2020). Modeling snow slab avalanches caused by weak-layer failure – Part 1: Slabs on compliant and collapsible weak layers. The Cryosphere, 14(1), 115–130. https://doi.org/10.5194/tc-14-115-2020
  • Rosendahl, P. L. & Weißgraeber, P. (2020). Modeling snow slab avalanches caused by weak-layer failure – Part 2: Coupled mixed-mode criterion for skier-triggered anticracks. The Cryosphere, 14(1), 131–145. https://doi.org/10.5194/tc-14-131-2020

Written in 🐍 Python and built with 💻 Visual Studio Code, 🐙 GitKraken, and 🪐 Jupyter. Note that release v1.0 was written and built in 🌋 MATLAB.

Installation

Install globally using the pip Package Installer for Python

pip install -U weac

or clone the repo

git clone https://github.com/2phi/weac

for local use.

Needs (see also requirements.txt):

Usage

The following describes the basic usage of WEAC. Please refer to the demo for more examples and read the documentation for details.

Load the module.

import weac

Choose a snow profile from the database (see demo) or create your own as a 2D array where the columns are density (kg/m^2) and layer thickness (mm). One row corresponds to one layer counted from top (below surface) to bottom (above weak layer).

myprofile = [[170, 100],  # (1) surface layer
             [190,  40],  # (2)
             [230, 130],  #  :
             [250,  20],  #  :
             [210,  70],  # (i)
             [380,  20],  #  :
             [280, 100]]  # (N) last slab layer above weak layer

Create a model instance with optional custom layering.

skier = weac.Layered(system='skier', layers=myprofile)

Calculate lists of segment lengths, locations of foundations, and position and magnitude of skier loads from the inputs total length L (mm), crack length a (mm), and skier weight m (kg). We can choose to analyze the situtation before a crack appears even if a crack length > 0 is set by replacing the 'crack' key thorugh the 'nocrack' key.

segments = skier.calc_segments(L=10000, a=300, m=80)['crack']

Assemble the system of linear equations and solve the boundary-value problem for the free constants C providing the inclination phi (counterclockwise positive) in degrees.

C = skier.assemble_and_solve(phi=38, **segments)

Prepare the output by rasterizing the solution vector at all horizontal positions xsl (slab). The result is returned in the form of the ndarray z. We also get xwl (weak layer) that only contains x-coordinates that are supported by a foundation.

xsl, z, xwl = skier.rasterize_solution(C=C, phi=38, **segments)

Visualize the results.

# Visualize deformations as a contour plot
weac.plot.deformed(skier, xsl=xsl_skier, xwl=xwl_skier, z=z_skier,
                   phi=inclination, window=200, scale=200,
                   field='principal')

# Plot slab displacements (using x-coordinates of all segments, xsl)
weac.plot.displacements(skier, x=xsl, z=z, **segments)

# Plot weak-layer stresses (using only x-coordinates of bedded segments, xwl)
weac.plot.stresses(skier, x=xwl, z=z, **segments)

Compute output quantities for exporting or plotting.

# Slab deflections (using x-coordinates of all segments, xsl)
x_cm, w_um = skier.get_slab_deflection(x=xsl, z=z, unit='um')

# Weak-layer shear stress (using only x-coordinates of bedded segments, xwl)
x_cm, tau_kPa = skier.get_weaklayer_shearstress(x=xwl, z=z, unit='kPa')

Roadmap

See the open issues for a list of proposed features and known issues.

v3.0

  • New mathematical foundation to improve the weak-layer representation
  • Complex terrain through the addition of out-of-plane tilt
  • Up, down, and cross-slope cracks

v2.7

  • Finite fracture mechanics implementation for layered snow covers

v2.6

  • Implement anistropic weak layer
  • Add demo gif

Release history

v2.5

  • Analyze slab touchdown in PST experiments by setting touchdown=True
  • Completely redesigned and significantly improved API documentation

v2.4

  • Choose between slope-normal ('-pst', 'pst-') or vertial ('-vpst', 'vpst-') PST boundary conditions

v2.3

  • Stress plots on deformed contours
  • PSTs now account for slab touchdown

v2.2

  • Sign of inclination phi consistent with the coordinate system (positive counterclockwise)
  • Dimension arguments to field-quantity methods added
  • Improved aspect ratio of profile views and contour plots
  • Improved plot labels
  • Convenience methods for the export of weak-layer stresses and slab deformations provided
  • Wrapper for (re)calculation of the fundamental system added
  • Now allows for distributed surface loads

v2.1

  • Consistent use of coordinate system with downward pointing z-axis
  • Consitent top-to-bottom numbering of slab layers
  • Implementation of PSTs cut from either left or right side

v2.0

  • Completely rewritten in 🐍 Python
  • Coupled bending-extension ODE solver implemented
  • Stress analysis of arbitrarily layered snow slabs
  • FEM validation of
    • displacements
    • weak-layer stresses
    • energy release rates in weak layers
  • Documentation
  • Demo and examples

v1.0

  • Written in 🌋 MATLAB
  • Deformation analysis of homogeneous snow labs
  • Weak-layer stress prediction
  • Energy release rates of cracks in weak layers
  • Finite fracture mechanics implementation
  • Prediction of anticrack nucleation

How to contribute

  1. Fork the project
  2. Create your feature branch (git checkout -b feature/amazingfeature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazingfeature)
  5. Open a pull request

Workflows

Publish Python 🐍 releases 📦 to PyPI
Build and publish Sphinx 🪬 documentation

License

WEAC is licensed under CC BY-NC-SA 4.0

You are free to:

  • Share — copy and redistribute the material in any medium or format
  • Adapt — remix, transform, and build upon the material for any purpose, even commercially.

Under the following terms:

  • Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.

  • NonCommercial — You may not use the material for commercial purposes.

  • ShareAlike — If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original.

Contact

E-mail: mail@2phi.de · Web: https://2phi.de · Project Link: https://github.com/2phi/weac · Project DOI: http://dx.doi.org/10.5281/zenodo.5773113