Richards fast slow  0.001
physics.hpp
1 #ifndef PHYSICS_HPP
2 #define PHYSICS_HPP
3 
4 class Model{
5 public:
6 
7  virtual double s(double)=0;
8  virtual double ds(double)=0;
9  virtual double kr(double)=0;
10  virtual double dkr(double)=0;
11 };
12 
13 
14 class ModelBC{
15 public:
16  double s(double);
17  double ds(double);
18  double kr(double);
19  double dkr(double);
20 };
21 
22 
24 class Physics{
25 public:
26 
28  double g;
30  double rho;
31 
33  double phi;
35  double k0;
36 
38  double nivrivsat;
39 
40 
42  double (*s)(double);
44  double (*ds)(double);
46  void (*s_ds)(double,double&,double&);
47 
49  double (*kr)(double);
51  double (*dkr)(double);
53  void (*kr_dkr)(double,double&,double&);
54 
55 
56  //---------------------
57  // Models descriptions
58  //---------------------
59 
61  double model_datas[6];
62 
63  //------------------------
64  // Brooks and Corey model
65  //------------------------
66 
68  double s_BC(double P);
70  double ds_BC(double P);
72  void (s_ds_BC)(double P,double& v,double& dv);
73 
75  double kr_BC(double P);
77  double dkr_BC(double P);
79  void (kr_dkr_BC)(double P,double& v,double& dv);
80 
81 };
82 #endif
Physics::s
double(* s)(double)
Return the saturation in function of the pressure.
Definition: physics.hpp:42
Physics
The Physics class contains all physical parameters characterising the soil.
Definition: physics.hpp:24
Physics::s_ds_BC
void() s_ds_BC(double P, double &v, double &dv)
Brooks and Corey saturation and its derivative setter.
Physics::s_ds
void(* s_ds)(double, double &, double &)
Set the saturation and its derivative in function of the pressure.
Definition: physics.hpp:46
Physics::k0
double k0
Conductivity of the saturated soil.
Definition: physics.hpp:35
Physics::phi
double phi
Porosity of the soil.
Definition: physics.hpp:33
Physics::ds_BC
double ds_BC(double P)
Brooks and Corey derivative of the saturation map.
Physics::ds
double(* ds)(double)
Return the derivtive of the saturation in function of the pressure.
Definition: physics.hpp:44
Physics::kr
double(* kr)(double)
Return the relative conductivity in function of the pressure.
Definition: physics.hpp:49
Physics::kr_dkr_BC
void() kr_dkr_BC(double P, double &v, double &dv)
Brooks and Corey relative conductivity and its derivative setter.
Physics::dkr_BC
double dkr_BC(double P)
Brooks and Corey derivative of the relative conductivity map.
Physics::rho
double rho
Fluid density.
Definition: physics.hpp:30
Model
Definition: physics.hpp:4
Physics::kr_BC
double kr_BC(double P)
Brooks and Corey relative conductivity map.
Physics::model_datas
double model_datas[6]
Datas used to define the model.
Definition: physics.hpp:61
Physics::g
double g
Gravity acceleration.
Definition: physics.hpp:28
Physics::nivrivsat
double nivrivsat
Characterise the water pressure at the bottom of the overland water.
Definition: physics.hpp:38
Physics::s_BC
double s_BC(double P)
Brooks and Corey saturation map.
Physics::dkr
double(* dkr)(double)
Return the derivtive of the relative conductivity in function of the pressure.
Definition: physics.hpp:51
Physics::kr_dkr
void(* kr_dkr)(double, double &, double &)
Set the relative conductivity and its derivative in function of the pressure.
Definition: physics.hpp:53
ModelBC
Definition: physics.hpp:14