SNOWPACK  SNOWPACK-3.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
StabilityAlgorithms.h
Go to the documentation of this file.
1 /*
2  * SNOWPACK stand-alone
3  *
4  * Copyright WSL Institute for Snow and Avalanche Research SLF, DAVOS, SWITZERLAND
5 */
6 /* This file is part of Snowpack.
7  Snowpack is free software: you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation, either version 3 of the License, or
10  (at your option) any later version.
11 
12  Snowpack is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with Snowpack. If not, see <http://www.gnu.org/licenses/>.
19 */
20 #ifndef STABILITYALGORITHMS_H
21 #define STABILITYALGORITHMS_H
22 
23 #include <snowpack/DataClasses.h>
24 
33  public:
38  StabilityData(const double& i_psi_ref) : Sig_c2(Constants::undefined), strength_upper(1001.), phi(0.0),
39  sig_n(Constants::undefined), sig_s(Constants::undefined),
40  alpha_max_rad(54.3*mio::Cst::to_rad), psi_ref(i_psi_ref*mio::Cst::to_rad), cos_psi_ref(cos(i_psi_ref*mio::Cst::to_rad)), sin_psi_ref(sin(i_psi_ref*mio::Cst::to_rad)) {}
41 
42  double Sig_c2;
43  double strength_upper;
44  double phi;
45  double sig_n;
46  double sig_s;
47  double alpha_max_rad;
48  double psi_ref;
49  double cos_psi_ref;
50  double sin_psi_ref;
51 };
52 
63  public:
64  static void classifyStability_SchweizerBellaire(const double& Swl_ssi, const double& Swl_Sk38, SnowStation& Xdata);
65  static void classifyStability_Bellaire(const double& Swl_ssi, SnowStation& Xdata);
66  static void classifyStability_SchweizerBellaire2(const double& Swl_ssi, const size_t& Swl_lemon, const double& Swl_Sk38, SnowStation& Xdata);
68  static bool classifyType_SchweizerLuetschg(SnowStation& Xdata);
69 
70  static bool setShearStrengthDEFAULT(const double& cH, const double& cos_sl, const mio::Date& date,
71  ElementData& Edata, NodeData& Ndata, StabilityData& STpar);
72  static bool setShearStrength_NIED(const double& cH, const double& cos_sl, const mio::Date& date,
73  ElementData& Edata, NodeData& Ndata, StabilityData& STpar);
74 
75  static double getHandHardnessBELLAIRE(const ElementData& Edata, const double& buried_hoar_density);
76  static double getHandHardnessASARC(const ElementData& Edata, const double& buried_hoar_density);
77  static double getHandHardnessMONTI(const ElementData& Edata, const double& buried_hoar_density);
78 
79  static double getHandHardnessMONTI(const int& F, const double& rho, const double& water_content, const double& buried_hoar_density);
80  static double compCriticalStress(const double& epDotn, const double& T_s);
81  static double setDeformationRateIndex(ElementData& Edata);
82  static double compPenetrationDepth(const SnowStation& Xdata);
83  static void compReducedStresses(const double& stress, const double& cos_sl, StabilityData& STpar);
84 
85  static double getNaturalStability(const StabilityData& STpar);
86  static double getLayerSkierStability(const double& penetrationDepth, const double& depth_lay, const StabilityData& STpar);
87  static bool getRelativeThresholdSum(SnowStation& Xdata);
88 
89  static double CriticalCutLength(const double& H_slab, const double& rho_slab, const double& cos_sl, const ElementData& Edata, const StabilityData& STpar);
90 
91  private:
92  static bool normalizeLemon(std::vector<double>& vecData);
93 };
94 
95 #endif
const double undefined
This is the snowpack undefined value.
Definition: Constants.h:47
static double getHandHardnessASARC(const ElementData &Edata, const double &buried_hoar_density)
Assign hand hardness to snow types according to density and grain size, original Canadian version...
Definition: StabilityAlgorithms.cc:312
double alpha_max_rad
Angle from snow surface to peak shear stress, 54.3 at 38 deg.
Definition: StabilityAlgorithms.h:47
static double getLayerSkierStability(const double &penetrationDepth, const double &depth_lay, const StabilityData &STpar)
Returns the skier stability index Sk reduced to psi_ref (usually 38 deg => Sk_38) The classic skier st...
Definition: StabilityAlgorithms.cc:570
static void compReducedStresses(const double &stress, const double &cos_sl, StabilityData &STpar)
Computes normal and shear stresses (kPa) reduced to psi_ref.
Definition: StabilityAlgorithms.cc:542
static double compPenetrationDepth(const SnowStation &Xdata)
Returns the skier's penetration depth Pk Adapted from Jamieson & Johnston, Ann. Glaciol., 26, 296-302 (1998)
Definition: StabilityAlgorithms.cc:495
ELEMENT DATA used as a pointer in the SnowStation structure NOTE on M below: this is the mass of an e...
Definition: DataClasses.h:251
double sin_psi_ref
Sine of psi_ref.
Definition: StabilityAlgorithms.h:50
static void classifyStability_SchweizerBellaire(const double &Swl_ssi, const double &Swl_Sk38, SnowStation &Xdata)
Returns the Profile Stability Classification based on re-analysis by Schweizer/Bellaire, see Schweizer, J., Bellaire, S., Fierz, C., Lehning, M. and Pielmeier, C., "Evaluating and improving the stability predictions of the snow cover model SNOWPACK", Cold Regions Science and Technology, 2006, 46(1), pp.52-59.
Definition: StabilityAlgorithms.cc:858
StabilityData(const double &i_psi_ref)
StabilityData constructor.
Definition: StabilityAlgorithms.h:38
static double setDeformationRateIndex(ElementData &Edata)
Returns the layer stability index The intra-layer stability criteria is given by the ratio S_f = S_c/...
Definition: StabilityAlgorithms.cc:470
static void classifyStability_SchweizerBellaire2(const double &Swl_ssi, const size_t &Swl_lemon, const double &Swl_Sk38, SnowStation &Xdata)
Returns the Profile Stability Classification based on re-analysis after recalibration of settling (No...
Definition: StabilityAlgorithms.cc:827
static double CriticalCutLength(const double &H_slab, const double &rho_slab, const double &cos_sl, const ElementData &Edata, const StabilityData &STpar)
Critical cut length: Estimates the critical cut length.
Definition: StabilityAlgorithms.cc:1321
static bool getRelativeThresholdSum(SnowStation &Xdata)
Returns the Relative Threshold Sum approach (RTA) weak layer. This is according to Monti...
Definition: StabilityAlgorithms.cc:608
double cos_psi_ref
Cosine of psi_ref.
Definition: StabilityAlgorithms.h:49
static bool setShearStrength_NIED(const double &cH, const double &cos_sl, const mio::Date &date, ElementData &Edata, NodeData &Ndata, StabilityData &STpar)
STRENGTH_NIED: Estimates the critical shear stress based on appropriate parameterisations adapted for...
Definition: StabilityAlgorithms.cc:1210
double strength_upper
Shear strength of adjacent upper element.
Definition: StabilityAlgorithms.h:43
static double getNaturalStability(const StabilityData &STpar)
Returns the natural stability index Sn The classic natural stability index Sn, that is...
Definition: StabilityAlgorithms.cc:553
double phi
Correction to normal load.
Definition: StabilityAlgorithms.h:44
Implementations of various algorithms useful for evaluating the stability. These algorithms fall with...
Definition: StabilityAlgorithms.h:62
double sig_n
Normal load on upper element node, perpendicular to slope.
Definition: StabilityAlgorithms.h:45
static bool classifyStability_SchweizerWiesinger(SnowStation &Xdata)
Returns the Profile Stability Classification (Schweizer-Wiesinger Method)
Definition: StabilityAlgorithms.cc:710
double psi_ref
Reference slope angle in radian, corresponds usually to 38 deg.
Definition: StabilityAlgorithms.h:48
static void classifyStability_Bellaire(const double &Swl_ssi, SnowStation &Xdata)
Returns the Profile Stability Classification based on the master thesis of S. Bellaire (September 200...
Definition: StabilityAlgorithms.cc:879
static double getHandHardnessBELLAIRE(const ElementData &Edata, const double &buried_hoar_density)
Assign hardness to snow types according to density, Swiss version by Sascha Bellaire.
Definition: StabilityAlgorithms.cc:166
Layer shear strength evaluation parameters. This class contains layer properties useful for the shear...
Definition: StabilityAlgorithms.h:32
static bool classifyType_SchweizerLuetschg(SnowStation &Xdata)
"Pattern recognition" of 10 profile types according to Schweizer, J. and M. Luetschg (2001)...
Definition: StabilityAlgorithms.cc:902
double Sig_c2
Element shear strength (kPa)
Definition: StabilityAlgorithms.h:42
Station data including all information on snowpack layers (elements and nodes) and on canopy This is...
Definition: DataClasses.h:463
double sig_s
Shear stress on upper element node, parallel to slope.
Definition: StabilityAlgorithms.h:46
static double getHandHardnessMONTI(const ElementData &Edata, const double &buried_hoar_density)
Assign hardness to snow types according to density Implementation according to Fabiano Monti's work...
Definition: StabilityAlgorithms.cc:266
static double compCriticalStress(const double &epDotn, const double &T_s)
Returns the critical stress state of a layer given the temperature and plastic strain rate...
Definition: StabilityAlgorithms.cc:436
NODAL DATA used as a pointer in the SnowStation structure.
Definition: DataClasses.h:336
static bool setShearStrengthDEFAULT(const double &cH, const double &cos_sl, const mio::Date &date, ElementData &Edata, NodeData &Ndata, StabilityData &STpar)
DEFAULT: Estimates the critical shear stress based on appropriate parameterisations.
Definition: StabilityAlgorithms.cc:1097