www.mooseframework.org
RichardsSeff1RSC.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 // Rogers-Stallybrass-Clements version of effective saturation of water phase as a function of
11 // pressure, and derivatives wrt that pressure.
12 // This is mostly useful for 2phase, not single phase, models.
13 // valid for residual saturations = 0, and viscosityOil = 2*viscosityWater. (the "2" is important
14 // here!).
15 // C Rogers, MP Stallybrass and DL Clements "On two phase filtration under gravity and with boundary
16 // infiltration: application of a Backlund transformation" Nonlinear Analysis Theory Methods and
17 // Applications 7 (1983) 785--799.
18 //
19 #include "RichardsSeff1RSC.h"
20 
22 
23 template <>
24 InputParameters
26 {
27  InputParameters params = validParams<RichardsSeff>();
28  params.addParam<Real>("oil_viscosity",
29  "Viscosity of oil (gas) phase. It is assumed this is "
30  "double the water-phase viscosity. (Note that this "
31  "effective saturation is mostly useful for 2-phase, not "
32  "single-phase.)");
33  params.addParam<Real>("scale_ratio",
34  "This is porosity/permeability/beta^2, where beta may be "
35  "chosen by the user. It has dimensions [time]");
36  params.addParam<Real>("shift", "effective saturation is a function of (Pc - shift)");
37  params.addClassDescription(
38  "Rogers-Stallybrass-Clements version of effective saturation for the water phase, valid for "
39  "residual saturations = 0, and viscosityOil = 2*viscosityWater. seff_water = 1/Sqrt(1 + "
40  "Exp((Pc - shift)/scale)), where scale = 0.25*scale_ratio*oil_viscosity. Note that this "
41  "effective saturation is mostly useful for 2-phase, not single-phase.");
42  return params;
43 }
44 
45 RichardsSeff1RSC::RichardsSeff1RSC(const InputParameters & parameters)
46  : RichardsSeff(parameters),
47  _oil_viscosity(getParam<Real>("oil_viscosity")),
48  _scale_ratio(getParam<Real>("scale_ratio")),
49  _shift(getParam<Real>("shift")),
50  _scale(0.25 * _scale_ratio * _oil_viscosity)
51 {
52 }
53 
54 Real
55 RichardsSeff1RSC::seff(std::vector<const VariableValue *> p, unsigned int qp) const
56 {
57  Real pc = -(*p[0])[qp];
58  return RichardsSeffRSC::seff(pc, _shift, _scale);
59 }
60 
61 void
62 RichardsSeff1RSC::dseff(std::vector<const VariableValue *> p,
63  unsigned int qp,
64  std::vector<Real> & result) const
65 {
66  Real pc = -(*p[0])[qp];
67  result[0] = -RichardsSeffRSC::dseff(pc, _shift, _scale);
68 }
69 
70 void
71 RichardsSeff1RSC::d2seff(std::vector<const VariableValue *> p,
72  unsigned int qp,
73  std::vector<std::vector<Real>> & result) const
74 {
75  Real pc = -(*p[0])[qp];
76  result[0][0] = RichardsSeffRSC::d2seff(pc, _shift, _scale);
77 }
registerMooseObject("RichardsApp", RichardsSeff1RSC)
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:23
Rogers-Stallybrass-Clements version of effective saturation for single-phase simulations as a functio...
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)
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:16
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.
Real seff(std::vector< const VariableValue *> p, unsigned int qp) const
water effective saturation
InputParameters validParams< RichardsSeff1RSC >()