SNOWPACK 3.7.0
ElementData Class Reference

Detailed Description

ELEMENT DATA used as a pointer in the SnowStation structure NOTE on M below: this is the mass of an element that is neither changed by phase changes nor densification.
It is set in the data initialization and used to compute the stress field. It can ONLY be changed by the WATER TRANSPORT or SURFACE SUBLIMATION or WIND TRANSPORT routines.

#include <DataClasses.h>

Public Types

enum  Young_Modulus { Sigrist , Pow , Exp }
 This enum provides names for possible Young's modulus calculations. More...
 

Public Member Functions

 ElementData (const unsigned short int &in_ID)
 
 ElementData (const ElementData &cc)
 
ElementDataoperator= (const ElementData &)=default
 Assignement operator. More...
 
bool checkVolContent ()
 Check volumetric content. More...
 
void heatCapacity ()
 Computes heat capacity of an element based on volumetric contents. More...
 
double coldContent () const
 Computes cold content of an element, taking meltfreeze_tk as reference. More...
 
void updDensity ()
 Updates element density. More...
 
double extinction () const
 Density dependent extinction coefficient -> Michi's magic trick... out of his magic hat. More...
 
void opticalEquivalentGrainSize ()
 Opical equivalent grain size
CROCUS implementation as described in Vionnet et al., 2012. The detailed snowpack scheme Crocus and its implementation in SURFEX v7.2, Geosci. Model Dev., 5, 773-791, 10.5194/gmd-5-773-2012. (see section 3.6) More...
 
void snowResidualWaterContent ()
 
double soilFieldCapacity () const
 Field Capacity Soil is dependent on grain properties. This nice formulation is based on some tedious curve fitting by Martina Luetschg. The data stems from Scheffer und Schachtschabel (Richtwerte Baugrund), which once more proves that "nomen est omen". If my name was "Schachtschabel", I would never ever be dealing with wet soils and Baugrund. For the USDA soil classes used if Richards equation is used, the field capacity is obtained using the Saxton formula (K.E. Saxton et al., 1986, Estimating generalized soil-water characteristics from texture. Soil Sci. Soc. Amer. J. 50(4):1031-1036) and defined in the VG class. More...
 
double RelativeHumidity () const
 RelativeHumidity. More...
 
double snowElasticity () const
 SNOW ELASTICITY : This important routine was programmed by Marc Christen, who took it directly from Mellor's famous 1975 paper on SNOW MECHANICS in the GRINDLEWALD symposium. Dimensions are in [Pa]. (Presently, it is NOT temperature dependent.) More...
 
double neckStressEnhancement () const
 Computes the enhancement of hydrostatically applied stress (overburden) in the necks (or bonds) More...
 
double concaveNeckRadius () const
 A non-generic function to compute the concave neck radius (mm).
It is assumed that the neck is bound by a sphere fitting between the two grains side by side such as the sphere goes to RB from the axis (this is a quick and dirty approximation) More...
 
double neckLength () const
 Computes the neck (or bond) length (mm) More...
 
double neck2VolumetricStrain () const
 Relates the neck strain to the global volumetric strain. More...
 
void snowType ()
 
unsigned short int getSnowType () const
 Determine the type of snow
First revisited by Fierz and Bellaire 2006 and 2007 TODO needs to be adapted to international classification. More...
 
const std::string toString () const
 

Static Public Member Functions

static double snowResidualWaterContent (const double &theta_i)
 Estimate the residual water content RWC by Vol
From work by Coleou and Lesaffre, 1998, Ann. Glaciol., 26, 64-68.
Experimental range: More...
 
static unsigned short int snowType (const double &dendricity, const double &sphericity, const double &grain_dia, const unsigned short int &marker, const double &theta_w, const double &res_wat_cont_loc)
 
static double getYoungModule (const double &rho_slab, const Young_Modulus &model)
 

Public Attributes

mio::Date depositionDate
 Date of deposition. More...
 
double L0
 
double L
 Original and present element thickness (m) More...
 
double Te
 mean element temperature (K) More...
 
double gradT
 temperature gradient over element (K m-1) More...
 
double meltfreeze_tk
 melt/freeze temperature of layer (principally initialized as 0 degC, but enables possibility for freezing point depression) More...
 
std::vector< double > theta
 volumetric contents: SOIL, ICE, WATER, WATER_PREF, AIR (1) More...
 
double h
 capillary pressure head (m) More...
 
mio::Array2D< double > conc
 Concentration for chemical constituents in (kg m-3) More...
 
std::vector< double > k
 For example, heat conductivity of TEMPERATURE field (W m-1 K-1) More...
 
std::vector< double > c
 For example, specific heat of TEMPERATURE field (J kg-1 K-1) More...
 
std::vector< double > soil
 Contains the heat conductivity, capacity and dry density of the soil (solid, non-ice) component phase. More...
 
double Rho
 mean element density (or BULK density; kg m-3), that is, rho=M/V=sum( theta(i)*rho(i) ) More...
 
double M
 the total mass of the element (kg m-2) More...
 
double sw_abs
 total absorbed shortwave radiation by the element (W m-2) More...
 
double rg
 grain radius (mm) More...
 
double dd
 snow dendricity: 0 = none, 1 = newsnow More...
 
double sp
 sphericity: 1 = round, 0 = angular More...
 
double ogs
 optical equivalent grain size (mm) More...
 
double rb
 grain bond radius (mm) More...
 
double N3
 grain Coordination number (1) More...
 
size_t mk
 grain marker (history dependent) More...
 
unsigned short int type
 grain class More...
 
double metamo
 keep track of metamorphism More...
 
double salinity
 bulk salinity (PSU, which is g/kg) More...
 
double dth_w
 Subsurface Melting & Freezing Data: change of water content. More...
 
double res_wat_cont
 Residual water content. More...
 
double Qmf
 Subsurface Melting & Freezing Data: change of energy due to phase changes (melt-freeze) More...
 
double QIntmf
 Apparent change in internal energy due to phase change (caused by difference in heat capacity of water and ice) More...
 
double dEps
 
double Eps
 
double Eps_e
 
double Eps_v
 Total element strain (GREEN'S strains – TOTAL LAGRANGIAN FORMULATION): Eps_e is elastic and Eps_v is viscous. More...
 
double Eps_Dot
 
double Eps_vDot
 Total Strain Rate, elastic and viscous, respectively (s-1) (Simply, Eps/sn_dt) More...
 
double E
 Young's modulus of elasticity (Pa) More...
 
double S
 Total Element Stress (Pa), S being the energy conjugate stress. More...
 
double C
 Total Element Stress (Pa), C being the real or the Cauchy stress, which is output. More...
 
double CDot
 Stress rate (Pa s-1), that is the overload change rate. More...
 
double ps2rb
 proportion of grain bond growth due to pressure sintering (1) More...
 
double s_strength
 Parameterized snow shear strength (kPa) More...
 
double hard
 Parameterized hand hardness (1) More...
 
double S_dr
 Stability Index based on deformation rate (Direct Action Avalanching) More...
 
double crit_cut_length
 Critical cut length (m) More...
 
vanGenuchten VG
 Van Genuchten Model for water retention. More...
 
double lwc_source
 Source/sink term for Richards equation (m^3/m^3 / timestep) More...
 
double PrefFlowArea
 Preferential flow path relative area (-) More...
 
double theta_w_transfer
 Volumetric content of water transferred from preferential flow to matrix domain (1) More...
 
double theta_i_reservoir
 Volumetric ice content in ice reservoir (1) More...
 
double theta_i_reservoir_cumul
 Volumetric ice content in cumulated ice reservoir (1) More...
 
double SlopeParFlux
 Slope parallel flux (m^3/m^3 * m / timestep) More...
 
double Qph_up
 Heat source/sink due to phase changes for the heat equation (W/m^3), at the upper node of the element. More...
 
double Qph_down
 Heat source/sink due to phase changes for the heat equation (W/m^3), at the lower node of the element. More...
 
double dsm
 Dry snow metamorphism factor. More...
 
double rime
 Rime index. More...
 
unsigned short int ID
 Element ID used to track elements. More...
 
double rhov
 vapor density...(kg/m^3) More...
 
double Qmm
 Heat source/sink due to phase changes in the case of vapor transport (W/m^3) More...
 
double vapTrans_fluxDiff
 vapor dissusion flux in the case of vapor transport (W/m^2/s) More...
 
double vapTrans_snowDenChangeRate
 snow density change rate in the case of vapor transport (kg/m^3/s) More...
 
double vapTrans_cumulativeDenChange
 cumulative density change in the case of vapor transport (kg/m^3) More...
 
double vapTrans_underSaturationDegree
 the degree of undersaturation, (rhov-rohv_sat)/rhov_sat (-) More...
 

Static Public Attributes

static const unsigned short int noID = static_cast<unsigned short int>(-1)
 

Friends

std::ostream & operator<< (std::ostream &os, const ElementData &data)
 
std::istream & operator>> (std::istream &is, ElementData &data)
 

Member Enumeration Documentation

◆ Young_Modulus

This enum provides names for possible Young's modulus calculations.

Enumerator
Sigrist 

Sigrist, 2006.

Pow 

another power law

Exp 

exponential law

Constructor & Destructor Documentation

◆ ElementData() [1/2]

ElementData::ElementData ( const unsigned short int &  in_ID)

◆ ElementData() [2/2]

ElementData::ElementData ( const ElementData cc)

Member Function Documentation

◆ checkVolContent()

bool ElementData::checkVolContent ( )

Check volumetric content.

Version
11.01
Returns
sum of volumetric contents (1)

◆ coldContent()

double ElementData::coldContent ( ) const

Computes cold content of an element, taking meltfreeze_tk as reference.

Version
10.08
Returns
Cold content (J m-2)

◆ concaveNeckRadius()

double ElementData::concaveNeckRadius ( ) const

A non-generic function to compute the concave neck radius (mm).
It is assumed that the neck is bound by a sphere fitting between the two grains side by side such as the sphere goes to RB from the axis (this is a quick and dirty approximation)

Author
Mathias Bavay
Version
9.mm
Returns
Concave neck radius (mm)

◆ extinction()

double ElementData::extinction ( ) const

Density dependent extinction coefficient -> Michi's magic trick... out of his magic hat.

Version
9Y.mm
Returns
Density dependent extinction coefficient (m-1)

◆ getSnowType()

unsigned short int ElementData::getSnowType ( ) const

Determine the type of snow
First revisited by Fierz and Bellaire 2006 and 2007 TODO needs to be adapted to international classification.

Version
11.11
Returns
snow type code according to old-fashioned Swiss tradition

◆ getYoungModule()

double ElementData::getYoungModule ( const double &  rho_slab,
const Young_Modulus model 
)
static

◆ heatCapacity()

void ElementData::heatCapacity ( )

Computes heat capacity of an element based on volumetric contents.

Version
11.01 set the effective heat capacity (J kg-1 K-1)

◆ neck2VolumetricStrain()

double ElementData::neck2VolumetricStrain ( ) const

Relates the neck strain to the global volumetric strain.

Version
11.01
Returns
Macro factor (1)

◆ neckLength()

double ElementData::neckLength ( ) const

Computes the neck (or bond) length (mm)

Version
11.01
Returns
Neck length (mm)

◆ neckStressEnhancement()

double ElementData::neckStressEnhancement ( ) const

Computes the enhancement of hydrostatically applied stress (overburden) in the necks (or bonds)

Version
11.01
Returns
Enhancement factor for neck stress (1))

◆ operator=()

ElementData & ElementData::operator= ( const ElementData )
default

Assignement operator.

◆ opticalEquivalentGrainSize()

void ElementData::opticalEquivalentGrainSize ( )

Opical equivalent grain size
CROCUS implementation as described in Vionnet et al., 2012. The detailed snowpack scheme Crocus and its implementation in SURFEX v7.2, Geosci. Model Dev., 5, 773-791, 10.5194/gmd-5-773-2012. (see section 3.6)

◆ RelativeHumidity()

double ElementData::RelativeHumidity ( ) const

RelativeHumidity.

Author
Nander Wever et al.

Relative humidity in soil. The formulation is based on Saito et al., 2006 "Numerical analysis of coupled water vapor and heat transport in the vadose zone". Calculated from the pressure head using a thermodynamic relationship between liquid water and water vapor in soil pores (Philip and de Vries, 1957)

Author
Margaux Couttet
Parameters
Edataelement data
Temperaturetemperature (K)
Returns
Soil relative humidity (-)

◆ snowElasticity()

double ElementData::snowElasticity ( ) const

SNOW ELASTICITY : This important routine was programmed by Marc Christen, who took it directly from Mellor's famous 1975 paper on SNOW MECHANICS in the GRINDLEWALD symposium. Dimensions are in [Pa]. (Presently, it is NOT temperature dependent.)

Version
9Y.mm
Returns
Module of elasticity (Pa)

◆ snowResidualWaterContent() [1/2]

void ElementData::snowResidualWaterContent ( )

◆ snowResidualWaterContent() [2/2]

double ElementData::snowResidualWaterContent ( const double &  theta_i)
static

Estimate the residual water content RWC by Vol
From work by Coleou and Lesaffre, 1998, Ann. Glaciol., 26, 64-68.
Experimental range:

  • density unsoaked: 235 to 580
  • density soaked: 328 to 589 kg m-3
  • RWC by Mass 0.049 to 0.029
    Note
    That function will limit range to 0.0264 to 0.08 RWC by Vol
    Version
    11.01
    Parameters
    [in]theta_iice volumetric fraction
    Returns
    residual water content of snow element (1)

◆ snowType() [1/2]

void ElementData::snowType ( )

◆ snowType() [2/2]

unsigned short int ElementData::snowType ( const double &  dendricity,
const double &  sphericity,
const double &  grain_dia,
const unsigned short int &  marker,
const double &  theta_w,
const double &  res_wat_cont_loc 
)
static

◆ soilFieldCapacity()

double ElementData::soilFieldCapacity ( ) const

Field Capacity Soil is dependent on grain properties. This nice formulation is based on some tedious curve fitting by Martina Luetschg. The data stems from Scheffer und Schachtschabel (Richtwerte Baugrund), which once more proves that "nomen est omen". If my name was "Schachtschabel", I would never ever be dealing with wet soils and Baugrund. For the USDA soil classes used if Richards equation is used, the field capacity is obtained using the Saxton formula (K.E. Saxton et al., 1986, Estimating generalized soil-water characteristics from texture. Soil Sci. Soc. Amer. J. 50(4):1031-1036) and defined in the VG class.

Author
Michael Lehning & Adrien michel
Version
9Y.mm
Returns
Soil field capacity (-)

◆ toString()

const std::string ElementData::toString ( ) const

◆ updDensity()

void ElementData::updDensity ( )

Updates element density.

Version
17.12

Friends And Related Function Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
const ElementData data 
)
friend

◆ operator>>

std::istream & operator>> ( std::istream &  is,
ElementData data 
)
friend

Member Data Documentation

◆ c

std::vector<double> ElementData::c

For example, specific heat of TEMPERATURE field (J kg-1 K-1)

◆ C

double ElementData::C

Total Element Stress (Pa), C being the real or the Cauchy stress, which is output.

◆ CDot

double ElementData::CDot

Stress rate (Pa s-1), that is the overload change rate.

◆ conc

mio::Array2D<double> ElementData::conc

Concentration for chemical constituents in (kg m-3)

◆ crit_cut_length

double ElementData::crit_cut_length

Critical cut length (m)

◆ dd

double ElementData::dd

snow dendricity: 0 = none, 1 = newsnow

◆ depositionDate

mio::Date ElementData::depositionDate

Date of deposition.

◆ dEps

double ElementData::dEps

◆ dsm

double ElementData::dsm

Dry snow metamorphism factor.

◆ dth_w

double ElementData::dth_w

Subsurface Melting & Freezing Data: change of water content.

◆ E

double ElementData::E

Young's modulus of elasticity (Pa)

◆ Eps

double ElementData::Eps

◆ Eps_Dot

double ElementData::Eps_Dot

◆ Eps_e

double ElementData::Eps_e

◆ Eps_v

double ElementData::Eps_v

Total element strain (GREEN'S strains – TOTAL LAGRANGIAN FORMULATION): Eps_e is elastic and Eps_v is viscous.

◆ Eps_vDot

double ElementData::Eps_vDot

Total Strain Rate, elastic and viscous, respectively (s-1) (Simply, Eps/sn_dt)

◆ gradT

double ElementData::gradT

temperature gradient over element (K m-1)

◆ h

double ElementData::h

capillary pressure head (m)

◆ hard

double ElementData::hard

Parameterized hand hardness (1)

◆ ID

unsigned short int ElementData::ID

Element ID used to track elements.

◆ k

std::vector<double> ElementData::k

For example, heat conductivity of TEMPERATURE field (W m-1 K-1)

◆ L

double ElementData::L

Original and present element thickness (m)

◆ L0

double ElementData::L0

◆ lwc_source

double ElementData::lwc_source

Source/sink term for Richards equation (m^3/m^3 / timestep)

◆ M

double ElementData::M

the total mass of the element (kg m-2)

◆ meltfreeze_tk

double ElementData::meltfreeze_tk

melt/freeze temperature of layer (principally initialized as 0 degC, but enables possibility for freezing point depression)

◆ metamo

double ElementData::metamo

keep track of metamorphism

◆ mk

size_t ElementData::mk

grain marker (history dependent)

◆ N3

double ElementData::N3

grain Coordination number (1)

◆ noID

const unsigned short int ElementData::noID = static_cast<unsigned short int>(-1)
static

◆ ogs

double ElementData::ogs

optical equivalent grain size (mm)

◆ PrefFlowArea

double ElementData::PrefFlowArea

Preferential flow path relative area (-)

◆ ps2rb

double ElementData::ps2rb

proportion of grain bond growth due to pressure sintering (1)

◆ QIntmf

double ElementData::QIntmf

Apparent change in internal energy due to phase change (caused by difference in heat capacity of water and ice)

◆ Qmf

double ElementData::Qmf

Subsurface Melting & Freezing Data: change of energy due to phase changes (melt-freeze)

◆ Qmm

double ElementData::Qmm

Heat source/sink due to phase changes in the case of vapor transport (W/m^3)

◆ Qph_down

double ElementData::Qph_down

Heat source/sink due to phase changes for the heat equation (W/m^3), at the lower node of the element.

◆ Qph_up

double ElementData::Qph_up

Heat source/sink due to phase changes for the heat equation (W/m^3), at the upper node of the element.

◆ rb

double ElementData::rb

grain bond radius (mm)

◆ res_wat_cont

double ElementData::res_wat_cont

Residual water content.

◆ rg

double ElementData::rg

grain radius (mm)

◆ Rho

double ElementData::Rho

mean element density (or BULK density; kg m-3), that is, rho=M/V=sum( theta(i)*rho(i) )

◆ rhov

double ElementData::rhov

vapor density...(kg/m^3)

◆ rime

double ElementData::rime

Rime index.

◆ S

double ElementData::S

Total Element Stress (Pa), S being the energy conjugate stress.

◆ S_dr

double ElementData::S_dr

Stability Index based on deformation rate (Direct Action Avalanching)

◆ s_strength

double ElementData::s_strength

Parameterized snow shear strength (kPa)

◆ salinity

double ElementData::salinity

bulk salinity (PSU, which is g/kg)

◆ SlopeParFlux

double ElementData::SlopeParFlux

Slope parallel flux (m^3/m^3 * m / timestep)

◆ soil

std::vector<double> ElementData::soil

Contains the heat conductivity, capacity and dry density of the soil (solid, non-ice) component phase.

◆ sp

double ElementData::sp

sphericity: 1 = round, 0 = angular

◆ sw_abs

double ElementData::sw_abs

total absorbed shortwave radiation by the element (W m-2)

◆ Te

double ElementData::Te

mean element temperature (K)

◆ theta

std::vector<double> ElementData::theta

volumetric contents: SOIL, ICE, WATER, WATER_PREF, AIR (1)

◆ theta_i_reservoir

double ElementData::theta_i_reservoir

Volumetric ice content in ice reservoir (1)

◆ theta_i_reservoir_cumul

double ElementData::theta_i_reservoir_cumul

Volumetric ice content in cumulated ice reservoir (1)

◆ theta_w_transfer

double ElementData::theta_w_transfer

Volumetric content of water transferred from preferential flow to matrix domain (1)

◆ type

unsigned short int ElementData::type

grain class

◆ vapTrans_cumulativeDenChange

double ElementData::vapTrans_cumulativeDenChange

cumulative density change in the case of vapor transport (kg/m^3)

◆ vapTrans_fluxDiff

double ElementData::vapTrans_fluxDiff

vapor dissusion flux in the case of vapor transport (W/m^2/s)

◆ vapTrans_snowDenChangeRate

double ElementData::vapTrans_snowDenChangeRate

snow density change rate in the case of vapor transport (kg/m^3/s)

◆ vapTrans_underSaturationDegree

double ElementData::vapTrans_underSaturationDegree

the degree of undersaturation, (rhov-rohv_sat)/rhov_sat (-)

◆ VG

vanGenuchten ElementData::VG

Van Genuchten Model for water retention.


The documentation for this class was generated from the following files: