Package: weac
WEACWeak Layer Anticrack Nucleation ModelImplementation of closed-form analytical models for the analysis of dry-snow slab avalanche release.View the demo·Report a bug·Request a feature·Read the docs·Cite the softwareContentsAbout the projectInstallationUsageRoadmapRelease historyHow to contributeLicenseContactAbout the projectWEAC implements closed-form analytical models for themechanical analysis of dry-snow slabs on compliant weak layers, theprediction of anticrack onset, and, in particular, allows for theanalysis of stratified snow covers. The model covers propagation saw tests (a), and uncracked (b) or cracked (c) skier-loaded buried weak layers.Cite the repository as:Rosendahl, P. L. & Weissgraeber, P. (2022). Weak Layer Anticrack Nucleation Model (WEAC). Zenodo. https://doi.org/10.5281/zenodo.5773113Read the📄 white paperfor model derivations, illustrations, dimensions, material properties, and kinematics:Weißgraeber, P. & Rosendahl, P. L. (2023). A closed-form model for layered snow slabs. The Cryosphere, 17(4), 1475–1496.https://doi.org/10.5194/tc-17-1475-2023For 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-2020Rosendahl, 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-2020Written in🐍 Pythonand built with💻 Visual Studio Code,🐙 GitKraken, and🪐 Jupyter. Note thatrelease v1.0was written and built in🌋 MATLAB.InstallationInstall globally using thepipPackage Installer for Pythonpipinstall-Uweacor clone the repogitclonehttps://github.com/2phi/weacfor local use.NeedsPython≥ 3.10Numpyfor matrix operationsScipyfor solving optimization problemsPandasfor data handlingMatplotlibfor plottingUsageThe following describes the basic usage of WEAC. Please refer to thedemofor more examples and read thedocumentationfor details.Load the module.importweacChoose a snow profile from the database (seedemo) 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 layerCreate 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 lengthL(mm), crack lengtha(mm), and skier weightm(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 constantsCproviding the inclinationphi(counterclockwise positive) in degrees.C=skier.assemble_and_solve(phi=38,**segments)Prepare the output by rasterizing the solution vector at all horizontal positionsxsl(slab). The result is returned in the form of the ndarrayz. We also getxwl(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 plotweac.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')RoadmapSee theopen issuesfor a list of proposed features and known issues.v2.5Finite fracture mechanics implementation for layered snow coversv2.4Implement anistropic weak layerAdd demo gifRelease historyv2.3Stress plots on deformed contoursPSTs now account for slab touchdownv2.2Sign of inclinationphiconsistent with the coordinate system (positive counterclockwise)Dimension arguments to field-quantity methods addedImproved aspect ratio of profile views and contour plotsImproved plot labelsConvenience methods for the export of weak-layer stresses and slab deformations providedWrapper for (re)calculation of the fundamental system addedNow allows for distributed surface loadsv2.1Consistent use of coordinate system with downward pointing z-axisConsitent top-to-bottom numbering of slab layersImplementation of PSTs cut from either left or right sidev2.0Completely rewritten in 🐍 PythonCoupled bending-extension ODE solver implementedStress analysis of arbitrarily layered snow slabsFEM validation ofdisplacementsweak-layer stressesenergy release rates in weak layersDocumentationDemo and examplesv1.0Written in 🌋 MATLABDeformation analysis of homogeneous snow labsWeak-layer stress predictionEnergy release rates of cracks in weak layersFinite fracture mechanics implementationPrediction of anticrack nucleationHow to contributeFork the projectCreate your feature branch (git checkout -b feature/amazingfeature)Commit your changes (git commit -m 'Add some amazing feature')Push to the branch (git push origin feature/amazingfeature)Open a pull requestLicenseCopyright 2phi GbR, 2020-2023.We currently do not offer an open source license. Please contact us for private licensing options.ContactE-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