www.mooseframework.org
PorousFlowCapillaryPressureRSC.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 
12 
14 
15 template <>
16 InputParameters
18 {
19  InputParameters params = validParams<PorousFlowCapillaryPressure>();
20  params.addParam<Real>("oil_viscosity",
21  "Viscosity of oil (gas) phase. It is assumed this is "
22  "double the water-phase viscosity. (Note that this "
23  "effective saturation is mostly useful for 2-phase, not "
24  "single-phase.)");
25  params.addParam<Real>("scale_ratio",
26  "This is porosity / permeability / beta^2, where beta may "
27  "be chosen by the user. It has dimensions [time]");
28  params.addParam<Real>("shift", "effective saturation is a function of (Pc - shift)");
29  params.addClassDescription("Rogers-Stallybrass-Clements version of effective saturation for the "
30  "water phase, valid for residual saturations = 0, and viscosityOil = "
31  "2 * viscosityWater. seff_water = 1 / sqrt(1 + exp((Pc - shift) / "
32  "scale)), where scale = 0.25 * scale_ratio * oil_viscosity.");
33  return params;
34 }
35 
37  : PorousFlowCapillaryPressure(parameters),
38  _oil_viscosity(getParam<Real>("oil_viscosity")),
39  _scale_ratio(getParam<Real>("scale_ratio")),
40  _shift(getParam<Real>("shift")),
41  _scale(0.25 * _scale_ratio * _oil_viscosity)
42 {
43  // Set _log_ext to false as no capillary pressure curves are implmented in this class
44  _log_ext = false;
45 }
46 
47 Real
48 PorousFlowCapillaryPressureRSC::capillaryPressureCurve(Real /*saturation*/, unsigned /*qp*/) const
49 {
50  mooseError("PorousFlowCapillaryPressureRSC::capillaryPressure not implemented");
51  return 0.0;
52 }
53 
54 Real
55 PorousFlowCapillaryPressureRSC::dCapillaryPressureCurve(Real /*saturation*/, unsigned /*qp*/) const
56 {
57  mooseError("PorousFlowCapillaryPressureRSC::dCapillaryPressure not implemented");
58  return 0.0;
59 }
60 
61 Real
62 PorousFlowCapillaryPressureRSC::d2CapillaryPressureCurve(Real /*saturation*/, unsigned /*qp*/) const
63 {
64  mooseError("PorousFlowCapillaryPressureRSC::d2CapillaryPressure not implemented");
65  return 0.0;
66 }
67 
68 Real
70 {
72 }
73 
74 Real
76 {
78 }
79 
80 Real
82 {
84 }
validParams< PorousFlowCapillaryPressureRSC >
InputParameters validParams< PorousFlowCapillaryPressureRSC >()
Definition: PorousFlowCapillaryPressureRSC.C:17
PorousFlowCapillaryPressureRSC::effectiveSaturation
virtual Real effectiveSaturation(Real pc, unsigned qp=0) const override
Effective saturation as a function of capillary pressure.
Definition: PorousFlowCapillaryPressureRSC.C:69
PorousFlowRogersStallybrassClements::effectiveSaturation
Real effectiveSaturation(Real pc, Real shift, Real scale)
Effective saturation as a function of capillary pressure.
Definition: PorousFlowRogersStallybrassClements.C:15
registerMooseObject
registerMooseObject("PorousFlowApp", PorousFlowCapillaryPressureRSC)
PorousFlowCapillaryPressure
Base class for capillary pressure for multiphase flow in porous media.
Definition: PorousFlowCapillaryPressure.h:39
PorousFlowCapillaryPressureRSC::dEffectiveSaturation
virtual Real dEffectiveSaturation(Real pc, unsigned qp=0) const override
Derivative of effective saturation wrt capillary pressure.
Definition: PorousFlowCapillaryPressureRSC.C:75
PorousFlowRogersStallybrassClements::d2EffectiveSaturation
Real d2EffectiveSaturation(Real pc, Real shift, Real scale)
Second derivative of effective saturation wrt capillary pressure.
Definition: PorousFlowRogersStallybrassClements.C:31
PorousFlowCapillaryPressureRSC::_scale
const Real _scale
Scale = 0.25 * scale_ratio * oil_viscosity.
Definition: PorousFlowCapillaryPressureRSC.h:43
PorousFlowCapillaryPressureRSC.h
PorousFlowCapillaryPressureRSC::d2CapillaryPressureCurve
virtual Real d2CapillaryPressureCurve(Real saturation, unsigned qp=0) const override
Second derivative of raw capillary pressure wrt true saturation.
Definition: PorousFlowCapillaryPressureRSC.C:62
PorousFlowCapillaryPressureRSC::_shift
const Real _shift
Shift. seff_water = 1/Sqrt(1 + Exp((Pc - shift)/scale)), where scale = 0.25 * scale_ratio * oil_visco...
Definition: PorousFlowCapillaryPressureRSC.h:41
PorousFlowCapillaryPressureRSC::d2EffectiveSaturation
virtual Real d2EffectiveSaturation(Real pc, unsigned qp=0) const override
Second derivative of effective saturation wrt capillary pressure.
Definition: PorousFlowCapillaryPressureRSC.C:81
PorousFlowCapillaryPressureRSC::dCapillaryPressureCurve
virtual Real dCapillaryPressureCurve(Real saturation, unsigned qp=0) const override
Derivative of raw capillary pressure wrt true saturation.
Definition: PorousFlowCapillaryPressureRSC.C:55
PorousFlowCapillaryPressureRSC::capillaryPressureCurve
virtual Real capillaryPressureCurve(Real saturation, unsigned qp=0) const override
Raw capillary pressure curve (does not include logarithmic extension)
Definition: PorousFlowCapillaryPressureRSC.C:48
validParams< PorousFlowCapillaryPressure >
InputParameters validParams< PorousFlowCapillaryPressure >()
Definition: PorousFlowCapillaryPressure.C:14
PorousFlowRogersStallybrassClements.h
PorousFlowCapillaryPressureRSC::PorousFlowCapillaryPressureRSC
PorousFlowCapillaryPressureRSC(const InputParameters &parameters)
Definition: PorousFlowCapillaryPressureRSC.C:36
PorousFlowCapillaryPressureRSC
Rogers-Stallybrass-Clements form of capillary pressure.
Definition: PorousFlowCapillaryPressureRSC.h:22
PorousFlowCapillaryPressure::_log_ext
bool _log_ext
Flag to use a logarithmic extension for low saturation.
Definition: PorousFlowCapillaryPressure.h:229
PorousFlowRogersStallybrassClements::dEffectiveSaturation
Real dEffectiveSaturation(Real pc, Real shift, Real scale)
Derivative of effective saturation wrt capillary pressure.
Definition: PorousFlowRogersStallybrassClements.C:23