|
Richards
Solving The Richards equation with temporally periodic surface boundary conditions
|
Go to the documentation of this file.
6 if ( (strcmp(s,
"true") == 0) || (strcmp(s,
"True") == 0) )
return(
true);
10 bool cmp (
const char *s1,
const char *s2) {
11 if ( strcmp(s1, s2) == 0 )
return(
true);
17 return(
long(std::atof(val)) );
23 const char *set, *val;
25 for (
int i=0; i < int(sv.size()); i++) {
28 set = sv[i][0].c_str();
29 val = sv[i][1].c_str();
33 if (
cmp(set,
"depth") ) s.
depth = std::atof(val);
34 else if (
cmp(set,
"delz0") ) s.
delz0 = std::atof(val);
35 else if (
cmp(set,
"delzfrac") ) s.
delzfrac = std::atof(val);
36 else if (
cmp(set,
"delzmax") ) s.
delzmax = std::atof(val);
39 else if (
cmp(set,
"tint") ) s.
tint = std::atof(val);
40 else if (
cmp(set,
"tunit") ) s.
tunit = std::atof(val);
43 else if (
cmp(set,
"dtfac") ) s.
dtfac = std::atof(val);
45 else if (
cmp(set,
"poro") ) s.
poro = std::atof(val);
46 else if (
cmp(set,
"perm") ) s.
perm = std::atof(val);
47 else if (
cmp(set,
"g") ) s.
g = std::atof(val);
48 else if (
cmp(set,
"mu") ) s.
mu = std::atof(val);
49 else if (
cmp(set,
"rho") ) s.
rho = std::atof(val);
50 else if (
cmp(set,
"b") ) s.
b = std::atof(val);
51 else if (
cmp(set,
"wilt") ) s.
wilt = std::atof(val);
53 else if (
cmp(set,
"tauevap") ) s.
tauevap = std::atof(val);
54 else if (
cmp(set,
"Levap") ) s.
Levap = std::atof(val);
55 else if (
cmp(set,
"infper") ) s.
infper = std::atof(val);
56 else if (
cmp(set,
"infdur") ) s.
infdur = std::atof(val);
79 std::cout <<
"FAILURE: unknown setting in settings file: " << set << std::endl;
bool qall
whether to track all fluxes
double perm
permeability (m^2)
bool qbot
whether to track bottom flux
bool K
whether to write hydraulic conductivity when snapping
double b
Brooks-Corey parameter.
bool infil
whether to track infiltration flag
double dtfac
safety factor for stable time step
container struct for all the settings variables needed for a BousThermModel run
double tauevap
evaporation timescale
bool w
whether to water fraction profile when snapping
bool eval_txt_bool(const char *s)
converts a string into a bool if it's supposed to be "true" or "false"
bool tsnap
whether to track snap times
bool t
whether to track step times
double tint
duration of solve
double wilt
wilting saturation as fraction of porosity
double Levap
evaporation depth
double mu
water viscosity (Pa*s)
long nmaxout
maximum length of output vectors (subsampled to accomodate)
double delz0
surface cell width (m)
bool cmp(const char *s1, const char *s2)
abbreviates strcmp
bool poroc
whether to write porosity at cell centers
double infdur
infiltration duration (s)
bool qtop
whether to track top flux
Settings copy_settings(Settings &b)
constructs a copy of another Settings object
bool Ksat
whether to write saturated hydraulic conductivity
bool poroe
whether to write porosity at cell edges
long to_long(const char *val)
converts a character to an integet
bool we
whether to write water fraction at cell edges when snapping
bool psisat
whether to write saturated matric head
double infper
infiltration period (s)
double tunit
time unit to use (number of seconds)
double rho
water density (kg/m^3)
bool dwdz
whether to write moisture fraction derivative when snapping
double delzmax
maximum cell width (m)
Settings parse_settings(std::vector< std::vector< std::string > > sv)
parses a settings file and returns it in a Settings structure
bool dpsidw
whether to write dpsidw when snapping
bool q
whether to write water flux when snapping
bool D
whether to write diffusivity when snapping
bool wall
whether to track all water fractions
double depth
domain depth (m)
bool qmid
whether to track middle flux
long nsnap
number of snaps to take
bool save_grid
whether to write grid files
double delzfrac
fraction increase for deeper neighbor cell