www.mooseframework.org
PorousFlow2PhasePS_VG.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 
10 
11 #include <limits>
12 
13 template <>
14 InputParameters
16 {
17  InputParameters params = validParams<PorousFlow2PhasePS>();
18  params.addRequiredRangeCheckedParam<Real>("m", "m >= 0 & m <= 1", "van Genuchten exponent m");
19  params.addRangeCheckedParam<Real>("pc_max",
20  -std::numeric_limits<Real>::max(),
21  "pc_max <= 0",
22  "Maximum capillary pressure (Pa). Must be <= 0. Default is "
23  "-std::numeric_limits<Real>::max()");
24  params.addRequiredRangeCheckedParam<Real>(
25  "p0", "p0 > 0", "Capillary pressure coefficient P0. Must be > 0");
26  params.addClassDescription("This Material calculates the 2 porepressures and the 2 saturations "
27  "in a 2-phase isothermal situation using a van Genucten capillary "
28  "pressure, and derivatives of these with respect to the "
29  "PorousFlowVariables");
30  return params;
31 }
32 
33 PorousFlow2PhasePS_VG::PorousFlow2PhasePS_VG(const InputParameters & parameters)
34  : PorousFlow2PhasePS(parameters),
35 
36  _m(getParam<Real>("m")),
37  _pc_max(getParam<Real>("pc_max")),
38  _p0(getParam<Real>("p0")),
39  _alpha(1.0 / _p0)
40 {
41  mooseDeprecated("PorousFlow2PhasePS_VG is deprecated. Please use PorousFlow2PhasePS and a "
42  "PorousFlowCapillaryPressureVG UserObject instead");
43 
44  if (_dictator.numPhases() != 2)
45  mooseError("The Dictator proclaims that the number of phases is ",
46  _dictator.numPhases(),
47  " whereas PorousFlow2PhasePS_VG can only be used for 2-phase simulation. Be aware "
48  "that the Dictator has noted your mistake.");
49 }
50 
51 Real
53 {
54  Real seff = effectiveSaturation(saturation);
56 }
57 
58 Real
60 {
61  Real seff = effectiveSaturation(saturation);
63 }
64 
65 Real
67 {
68  Real seff = effectiveSaturation(saturation);
70  _dseff_ds;
71 }
Material designed to calculate fluid-phase porepressures and saturations at nodes and qps using a spe...
const Real _m
van Genuchten exponent m
const Real _pc_max
Maximum capillary pressure (Pa). Note: must be <= 0.
virtual Real effectiveSaturation(Real saturation) const
Effective saturation of liquid phase.
virtual Real capillaryPressure(Real seff) const override
Capillary pressure as a function of saturation.
virtual Real d2CapillaryPressure_dS2(Real seff) const override
Second derivative of capillary pressure wrt to saturation.
Real d2CapillaryPressure(Real seff, Real alpha, Real m, Real pc_max)
Second derivative of capillary pressure wrt effective saturation.
const Real _alpha
van Genuchten alpha = 1/p0
PorousFlow2PhasePS_VG(const InputParameters &parameters)
InputParameters validParams< PorousFlow2PhasePS_VG >()
Real dCapillaryPressure(Real seff, Real alpha, Real m, Real pc_max)
Derivative of capillary pressure wrt effective saturation.
void FORTRAN_CALL() saturation(double &P, double &T, int &N, int &nerr)
const Real _dseff_ds
Derivative of effective saturation with respect to saturation.
virtual Real dCapillaryPressure_dS(Real seff) const override
Derivative of capillary pressure wrt to saturation.
Real capillaryPressure(Real seff, Real alpha, Real m, Real pc_max)
Capillary pressure as a function of effective saturation.
InputParameters validParams< PorousFlow2PhasePS >()