123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- #ifndef PHYSICS_HPP
- #define PHYSICS_HPP
- #include <cmath>
- #include <cassert>
- enum PhysicModel{BrooksCorey};
- //! The Physics class contains all physical parameters characterising the soil.
- class Physics{
- public:
- //! Physics constructor
- Physics(PhysicModel model);
-
- //! Gravity acceleration (m.s^-2)
- double g;
- //! Fluid density (g.l^(-1))
- double rho;
-
- //! Porosity of the soil
- double phi;
- //! Conductivity of the saturated soil
- double k0;
- //! Characterise the water pressure at the bottom of the overland water
- double nivrivsat;
-
- //! Return the saturation in function of the pressure
- double (*s)(double);
- //! Return the derivtive of the saturation in function of the pressure
- double (*ds)(double);
- //! Set the saturation and its derivative in function of the pressure
- void (*s_ds)(double,double&,double&);
-
- //! Return the relative conductivity in function of the pressure
- double (*kr)(double);
- //! Return the derivtive of the relative conductivity in function of the pressure
- double (*dkr)(double);
- //! Set the relative conductivity and its derivative in function of the pressure
- void (*kr_dkr)(double,double&,double&);
-
- //---------------------
- // Models descriptions
- //---------------------
- //! Datas used to define the model
- static double model_datas[6];
- //------------------------
- // Brooks and Corey model
- //------------------------
-
- //model_datas[0] -> psat : minimal pressure such that s(psat)=1
- //model_datas[1] -> sres : residual pressure
- //model_datas[2] -> lambda
- //model_datas[3] -> alpha
-
- //! Brooks and Corey saturation map
- static double s_BC(double P);
- //! Brooks and Corey derivative of the saturation map
- static double ds_BC(double P);
- //! Brooks and Corey saturation and its derivative setter
- static void (s_ds_BC)(double P,double& v,double& dv);
- //! Brooks and Corey relative conductivity map
- static double kr_BC(double P);
- //! Brooks and Corey derivative of the relative conductivity map
- static double dkr_BC(double P);
- //! Brooks and Corey relative conductivity and its derivative setter
- static void (kr_dkr_BC)(double P,double& v,double& dv);
- };
- #endif
|