www.mooseframework.org
RichardsSeffRSC.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
7 
8 // Rogers-Stallybrass-Clements version of effective saturation as a function of CAPILLARY pressure,
9 // and derivs wrt that capillary pressure.
10 // valid for residual saturations = 0, and viscosityOil = 2*viscosityWater. (the "2" is important
11 // here!).
12 // C Rogers, MP Stallybrass and DL Clements "On two phase filtration under gravity and with boundary
13 // infiltration: application of a Backlund transformation" Nonlinear Analysis Theory Methods and
14 // Applications 7 (1983) 785--799.
15 //
16 #include "RichardsSeffRSC.h"
17 
18 Real
19 RichardsSeffRSC::seff(Real pc, Real shift, Real scale)
20 {
21  Real x = (pc - shift) / scale;
22  Real ex = std::exp(x);
23  return std::pow(1 + ex, -0.5);
24 }
25 
26 Real
27 RichardsSeffRSC::dseff(Real pc, Real shift, Real scale)
28 {
29  Real x = (pc - shift) / scale;
30  Real ex = std::exp(x);
31  return -0.5 * ex * std::pow(1 + ex, -1.5) / scale;
32 }
33 
34 Real
35 RichardsSeffRSC::d2seff(Real pc, Real shift, Real scale)
36 {
37  Real x = (pc - shift) / scale;
38  Real ex = std::exp(x);
39  return (0.75 * ex * ex * std::pow(1 + ex, -2.5) - 0.5 * ex * std::pow(1 + ex, -1.5)) / scale /
40  scale;
41 }
static Real d2seff(Real pc, Real shift, Real scale)
2nd derivative of effective saturation wrt capillary pressure
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
static Real seff(Real pc, Real shift, Real scale)
effective saturation as a function of capillary pressure
static Real dseff(Real pc, Real shift, Real scale)
derivative of effective saturation wrt capillary pressure