www.mooseframework.org
PorousFlowCapillaryPressureBW.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.addRequiredRangeCheckedParam<Real>(
21  "Sn",
22  "Sn >= 0",
23  "Low saturation. This must be < Ss, and non-negative. This is BW's "
24  "initial effective saturation, below which effective saturation never goes "
25  "in their simulations/models. If Kn=0 then Sn is the immobile saturation. "
26  "This form of effective saturation is only correct for Kn small.");
27  params.addRangeCheckedParam<Real>(
28  "Ss",
29  1.0,
30  "Ss <= 1",
31  "High saturation. This must be > Sn and <= 1. Effective saturation "
32  "where porepressure = 0. Effective saturation never exceeds this "
33  "value in BW's simulations/models.");
34  params.addRequiredRangeCheckedParam<Real>(
35  "C", "C > 1", "BW's C parameter. Must be > 1. Typical value would be 1.05.");
36  params.addRequiredRangeCheckedParam<Real>(
37  "las",
38  "las > 0",
39  "BW's lambda_s parameter multiplied by (fluid_density * gravity). Must be "
40  "> 0. Typical value would be 1E5");
41  params.addClassDescription("Broadbridge and White capillary pressure for negligable Kn");
42  return params;
43 }
44 
46  : PorousFlowCapillaryPressure(parameters),
47  _sn(getParam<Real>("Sn")),
48  _ss(getParam<Real>("Ss")),
49  _c(getParam<Real>("C")),
50  _las(getParam<Real>("las"))
51 {
52  if (_ss <= _sn)
53  mooseError("In BW effective saturation Sn set to ",
54  _sn,
55  " and Ss set to ",
56  _ss,
57  " but these must obey Ss > Sn");
58 
59  // Set _log_ext to false as no capillary pressure curves are implmented in this class
60  _log_ext = false;
61 }
62 
63 Real
64 PorousFlowCapillaryPressureBW::capillaryPressureCurve(Real /*saturation*/, unsigned /*qp*/) const
65 {
66  mooseError("PorousFlowCapillaryPressureBW::capillaryPressure not implemented");
67  return 0.0;
68 }
69 
70 Real
71 PorousFlowCapillaryPressureBW::dCapillaryPressureCurve(Real /*saturation*/, unsigned /*qp*/) const
72 {
73  mooseError("PorousFlowCapillaryPressureBW::dCapillaryPressure not implemented");
74  return 0.0;
75 }
76 
77 Real
78 PorousFlowCapillaryPressureBW::d2CapillaryPressureCurve(Real /*saturation*/, unsigned /*qp*/) const
79 {
80  mooseError("PorousFlowCapillaryPressureBW::d2CapillaryPressure not implemented");
81  return 0.0;
82 }
83 
84 Real
86 {
88 }
89 
90 Real
92 {
94 }
95 
96 Real
98 {
100 }
PorousFlowBroadbridgeWhite.h
validParams< PorousFlowCapillaryPressureBW >
InputParameters validParams< PorousFlowCapillaryPressureBW >()
Definition: PorousFlowCapillaryPressureBW.C:17
PorousFlowCapillaryPressure
Base class for capillary pressure for multiphase flow in porous media.
Definition: PorousFlowCapillaryPressure.h:39
PorousFlowCapillaryPressureBW::_ss
const Real _ss
BW's Ss parameter.
Definition: PorousFlowCapillaryPressureBW.h:39
PorousFlowCapillaryPressureBW::capillaryPressureCurve
virtual Real capillaryPressureCurve(Real saturation, unsigned qp=0) const override
Raw capillary pressure curve (does not include logarithmic extension)
Definition: PorousFlowCapillaryPressureBW.C:64
PorousFlowCapillaryPressureBW.h
PorousFlowCapillaryPressureBW::dEffectiveSaturation
virtual Real dEffectiveSaturation(Real pc, unsigned qp=0) const override
Derivative of effective saturation wrt capillary pressure.
Definition: PorousFlowCapillaryPressureBW.C:91
PorousFlowCapillaryPressureBW::_sn
const Real _sn
BW's Sn parameter (initial saturation)
Definition: PorousFlowCapillaryPressureBW.h:37
registerMooseObject
registerMooseObject("PorousFlowApp", PorousFlowCapillaryPressureBW)
PorousFlowCapillaryPressureBW::PorousFlowCapillaryPressureBW
PorousFlowCapillaryPressureBW(const InputParameters &parameters)
Definition: PorousFlowCapillaryPressureBW.C:45
PorousFlowCapillaryPressureBW::_c
const Real _c
BW's C parameter (>1)
Definition: PorousFlowCapillaryPressureBW.h:41
PorousFlowCapillaryPressureBW::_las
const Real _las
BWs lambda_s parameter multiplied by fluid density * gravity (>0)
Definition: PorousFlowCapillaryPressureBW.h:43
PorousFlowCapillaryPressureBW::dCapillaryPressureCurve
virtual Real dCapillaryPressureCurve(Real saturation, unsigned qp=0) const override
Derivative of raw capillary pressure wrt true saturation.
Definition: PorousFlowCapillaryPressureBW.C:71
PorousFlowBroadbridgeWhite::d2EffectiveSaturation
Real d2EffectiveSaturation(Real pc, Real c, Real sn, Real ss, Real las)
Second derivative of effective saturation wrt capillary pressure.
Definition: PorousFlowBroadbridgeWhite.C:114
PorousFlowCapillaryPressureBW::d2CapillaryPressureCurve
virtual Real d2CapillaryPressureCurve(Real saturation, unsigned qp=0) const override
Second derivative of raw capillary pressure wrt true saturation.
Definition: PorousFlowCapillaryPressureBW.C:78
PorousFlowBroadbridgeWhite::dEffectiveSaturation
Real dEffectiveSaturation(Real pc, Real c, Real sn, Real ss, Real las)
Derivative of effective saturation wrt capillary pressure.
Definition: PorousFlowBroadbridgeWhite.C:104
validParams< PorousFlowCapillaryPressure >
InputParameters validParams< PorousFlowCapillaryPressure >()
Definition: PorousFlowCapillaryPressure.C:14
PorousFlowCapillaryPressureBW::d2EffectiveSaturation
virtual Real d2EffectiveSaturation(Real pc, unsigned qp=0) const override
Second derivative of effective saturation wrt capillary pressure.
Definition: PorousFlowCapillaryPressureBW.C:97
PorousFlowCapillaryPressureBW
Capillary pressure of Broadbridge and White.
Definition: PorousFlowCapillaryPressureBW.h:22
PorousFlowCapillaryPressureBW::effectiveSaturation
virtual Real effectiveSaturation(Real pc, unsigned qp=0) const override
Effective saturation as a function of capillary pressure.
Definition: PorousFlowCapillaryPressureBW.C:85
PorousFlowCapillaryPressure::_log_ext
bool _log_ext
Flag to use a logarithmic extension for low saturation.
Definition: PorousFlowCapillaryPressure.h:229
PorousFlowBroadbridgeWhite::effectiveSaturation
Real effectiveSaturation(Real pc, Real c, Real sn, Real ss, Real las)
Effective saturation as a function of capillary pressure If pc>=0 this will yield 1,...
Definition: PorousFlowBroadbridgeWhite.C:94