RichardsSeff1RSC.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 of water phase as a function of
9 // pressure, and derivatives wrt that pressure.
10 // This is mostly useful for 2phase, not single phase, models.
11 // valid for residual saturations = 0, and viscosityOil = 2*viscosityWater. (the "2" is important
12 // here!).
13 // C Rogers, MP Stallybrass and DL Clements "On two phase filtration under gravity and with boundary
14 // infiltration: application of a Backlund transformation" Nonlinear Analysis Theory Methods and
15 // Applications 7 (1983) 785--799.
16 //
17 #include "RichardsSeff1RSC.h"
18
19 template <>
20 InputParameters
22 {
23  InputParameters params = validParams<RichardsSeff>();
25  "Viscosity of oil (gas) phase. It is assumed this is "
26  "double the water-phase viscosity. (Note that this "
27  "effective saturation is mostly useful for 2-phase, not "
28  "single-phase.)");
30  "This is porosity/permeability/beta^2, where beta may be "
31  "chosen by the user. It has dimensions [time]");
32  params.addParam<Real>("shift", "effective saturation is a function of (Pc - shift)");
34  "Rogers-Stallybrass-Clements version of effective saturation for the water phase, valid for "
35  "residual saturations = 0, and viscosityOil = 2*viscosityWater. seff_water = 1/Sqrt(1 + "
36  "Exp((Pc - shift)/scale)), where scale = 0.25*scale_ratio*oil_viscosity. Note that this "
37  "effective saturation is mostly useful for 2-phase, not single-phase.");
38  return params;
39 }
40
41 RichardsSeff1RSC::RichardsSeff1RSC(const InputParameters & parameters)
42  : RichardsSeff(parameters),
43  _oil_viscosity(getParam<Real>("oil_viscosity")),
44  _scale_ratio(getParam<Real>("scale_ratio")),
45  _shift(getParam<Real>("shift")),
46  _scale(0.25 * _scale_ratio * _oil_viscosity)
47 {
48 }
49
50 Real
51 RichardsSeff1RSC::seff(std::vector<const VariableValue *> p, unsigned int qp) const
52 {
53  Real pc = -(*p[0])[qp];
54  return RichardsSeffRSC::seff(pc, _shift, _scale);
55 }
56
57 void
58 RichardsSeff1RSC::dseff(std::vector<const VariableValue *> p,
59  unsigned int qp,
60  std::vector<Real> & result) const
61 {
62  Real pc = -(*p[0])[qp];
63  result[0] = -RichardsSeffRSC::dseff(pc, _shift, _scale);
64 }
65
66 void
67 RichardsSeff1RSC::d2seff(std::vector<const VariableValue *> p,
68  unsigned int qp,
69  std::vector<std::vector<Real>> & result) const
70 {
71  Real pc = -(*p[0])[qp];
72  result[0][0] = RichardsSeffRSC::d2seff(pc, _shift, _scale);
73 }
static Real d2seff(Real pc, Real shift, Real scale)
2nd derivative of effective saturation wrt capillary pressure
Base class for effective saturation as a function of porepressure(s) The functions seff...
Definition: RichardsSeff.h:22
void d2seff(std::vector< const VariableValue * > p, unsigned int qp, std::vector< std::vector< Real >> &result) const
second derivative of effective saturation as a function of porepressure
Real _shift
RSC shift.
RichardsSeff1RSC(const InputParameters &parameters)
Real seff(std::vector< const VariableValue * > p, unsigned int qp) const
water effective saturation
void dseff(std::vector< const VariableValue * > p, unsigned int qp, std::vector< Real > &result) const
derivative of effective saturation as a function of porepressure
InputParameters validParams< RichardsSeff >()
Definition: RichardsSeff.C:14
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
Real _scale
RSC scale.
InputParameters validParams< RichardsSeff1RSC >()