OGS 6.2.0-97-g4a610c866
BrooksCoreyCapillaryPressureSaturation.h
Go to the documentation of this file.
1 
13 #pragma once
14 
15 #include <limits> // std::numeric_limits
16 
18 
19 #include "BaseLib/Error.h"
20 
21 namespace MaterialLib
22 {
23 namespace PorousMedium
24 {
44 {
45 public:
54  BrooksCoreyCapillaryPressureSaturation(const double pb, const double Sr,
55  const double Sg_r, const double Smax,
56  const double m, const double Pc_max)
57  : CapillaryPressureSaturation(Sr, Sg_r, Smax, Pc_max), _pb(pb), _m(m)
58  {
59  }
60 
62  std::string getName() const override
63  {
64  return "Brooks-Corey capillary pressure saturation model.";
65  }
66 
68  double getCapillaryPressure(const double saturation) const override;
69 
71  double getSaturation(const double capillary_pressure) const override;
72 
74  double getdPcdS(const double saturation) const override;
75 
78  double getd2PcdS2(const double /*saturation*/) const override
79  {
80  OGS_FATAL(
81  "Second derivative of BrooksCorey d^2p_cap / dS^2 is not "
82  "implemented.");
83  }
84 
85 private:
86  const double _pb;
87  const double _m;
88 };
89 
90 } // namespace PorousMedium
91 } // namespace MaterialLib
double getSaturation(const double capillary_pressure) const override
Get saturation.
double getdPcdS(const double saturation) const override
Get the derivative of the capillary pressure with respect to saturation.
BrooksCoreyCapillaryPressureSaturation(const double pb, const double Sr, const double Sg_r, const double Smax, const double m, const double Pc_max)
double getCapillaryPressure(const double saturation) const override
Get capillary pressure.
#define OGS_FATAL(fmt,...)
Definition: Error.h:63