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