SNOWPACK 3.7.0
vanGenuchten.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*/
23#ifndef VANGENUCHTEN_H
24#define VANGENUCHTEN_H
25
26#include <sstream>
27
34class ElementData;
35
37
38 public:
40 vanGenuchten(const vanGenuchten& c);
41 virtual ~vanGenuchten() {}
43 friend std::iostream& operator<<(std::iostream& os, const vanGenuchten& data);
44 friend std::iostream& operator>>(std::iostream& is, vanGenuchten& data);
45 ElementData *EMS; // Reference to the ElementData where the vanGenuchten class belongs to
46
47 //Soil types
49 //Van genuchten model types
51 //Hydraulic conductivity parameterizations
53
54 // Functions
55 static double AirEntryPressureHead(double MaximumPoreSize, double Temperature);
56
57 // Van Genuchten functions
58 double fromTHETAtoH(const double theta, const double h_d);
59 double fromTHETAtoHforICE(const double theta, const double h_d, const double theta_i);
60 double fromHtoTHETA(const double h);
61 double fromHtoTHETAforICE(const double h, const double theta_i);
62 double dtheta_dh(const double h);
63
64 // Functions to initialize the van Genuchten model
65 void SetVGParamsSnow(VanGenuchten_ModelTypesSnow VGModelTypeSnow, K_Parameterizations K_PARAM, const bool& matrix, const bool& seaice);
66 void SetVGParamsSoil();
67 bool enforceThermalEquilibrium(const bool fixTemp=true);
68
69 double theta_r; //Soil property, residual water content.
70 double theta_s; //Soil property, saturation water content.
71 double alpha; //Soil property in Van Genuchten model. [m^-1]
72 double n; //Soil property in Van Genuchten model.
73 double m; //Soil property in Van Genuchten model.
74 double h_e; //Soil property, air entry pressure, see Ippisch (2006) for details.
75 double Sc; //Saturation at cut-off point h_e (see Ippisch et al (2006)).
76 double ksat; //Soil property. Saturation hydraulic conductivity.
77 double field_capacity; //Soil property, grain size
78 bool defined; //true: the van Genuchten model has been initialized for this layer, false: the van Genuchten model is not initialized and should not be used.
79
80 private:
81 void SetSoil(SoilTypes type);
82};
83#endif // End of vanGenuchten.h}
ELEMENT DATA used as a pointer in the SnowStation structure NOTE on M below: this is the mass of an e...
Definition: DataClasses.h:285
This module contains the van Genuchten model for the water retention curve.
Definition: vanGenuchten.h:36
double Sc
Definition: vanGenuchten.h:75
bool enforceThermalEquilibrium(const bool fixTemp=true)
Enforce thermal equilibrium in the soil layers .
Definition: vanGenuchten.cc:545
bool defined
Definition: vanGenuchten.h:78
VanGenuchten_ModelTypesSnow
Definition: vanGenuchten.h:50
@ YAMAGUCHI2012
Definition: vanGenuchten.h:50
@ YAMAGUCHI2010
Definition: vanGenuchten.h:50
@ YAMAGUCHI2010_ADAPTED
Definition: vanGenuchten.h:50
@ DAANEN
Definition: vanGenuchten.h:50
double theta_s
Definition: vanGenuchten.h:70
static double AirEntryPressureHead(double MaximumPoreSize, double Temperature)
Calculate air entry pressure head Air entry pressure head in [m] that corresponds to a maximum pore ...
Definition: vanGenuchten.cc:110
double m
Definition: vanGenuchten.h:73
void SetVGParamsSoil()
Initialize van Genuchten model for soil layers, based on index approach via grain size .
Definition: vanGenuchten.cc:588
double h_e
Definition: vanGenuchten.h:74
double dtheta_dh(const double h)
Specific moisture capacity This function should return exact value of the derivative d....
Definition: vanGenuchten.cc:369
vanGenuchten(ElementData &pEMS)
Class constructor .
Definition: vanGenuchten.cc:38
K_Parameterizations
Definition: vanGenuchten.h:52
@ CALONNE
Definition: vanGenuchten.h:52
@ SHIMIZU
Definition: vanGenuchten.h:52
@ KOZENYCARMAN
Definition: vanGenuchten.h:52
virtual ~vanGenuchten()
Definition: vanGenuchten.h:41
friend std::iostream & operator>>(std::iostream &is, vanGenuchten &data)
Definition: vanGenuchten.cc:87
double field_capacity
Definition: vanGenuchten.h:77
vanGenuchten & operator=(const vanGenuchten &)
Assignement operator.
Definition: vanGenuchten.cc:56
double fromHtoTHETAforICE(const double h, const double theta_i)
Calculating volumetric water content from pressure head when ice is present The following function c...
Definition: vanGenuchten.cc:355
double alpha
Definition: vanGenuchten.h:71
friend std::iostream & operator<<(std::iostream &os, const vanGenuchten &data)
Definition: vanGenuchten.cc:72
void SetVGParamsSnow(VanGenuchten_ModelTypesSnow VGModelTypeSnow, K_Parameterizations K_PARAM, const bool &matrix, const bool &seaice)
Initialize van Genuchten model for snow layers .
Definition: vanGenuchten.cc:386
double fromTHETAtoHforICE(const double theta, const double h_d, const double theta_i)
Calculating pressure head from water content when ice is present The following function calculates t...
Definition: vanGenuchten.cc:322
double n
Definition: vanGenuchten.h:72
SoilTypes
Definition: vanGenuchten.h:48
@ LOAMYSAND
Definition: vanGenuchten.h:48
@ SILTYCLAYLOAM
Definition: vanGenuchten.h:48
@ SANDYCLAYLOAM
Definition: vanGenuchten.h:48
@ SILT
Definition: vanGenuchten.h:48
@ SANDYCLAY
Definition: vanGenuchten.h:48
@ SANDYLOAM
Definition: vanGenuchten.h:48
@ SILTLOAM
Definition: vanGenuchten.h:48
@ CLAYLOAM
Definition: vanGenuchten.h:48
@ CLAY
Definition: vanGenuchten.h:48
@ LOAM
Definition: vanGenuchten.h:48
@ WFJGRAVELSAND
Definition: vanGenuchten.h:48
@ ORGANIC
Definition: vanGenuchten.h:48
@ SAND
Definition: vanGenuchten.h:48
@ SILTYCLAY
Definition: vanGenuchten.h:48
double theta_r
Definition: vanGenuchten.h:69
double ksat
Definition: vanGenuchten.h:76
ElementData * EMS
Definition: vanGenuchten.h:45
double fromTHETAtoH(const double theta, const double h_d)
Calculating pressure head from water content The following function calculates the pressure head bel...
Definition: vanGenuchten.cc:297
double fromHtoTHETA(const double h)
Calculating volumetric water content from pressure head The following function calculates the volume...
Definition: vanGenuchten.cc:335