https://mooseframework.inl.gov
Loading...
Searching...
No Matches
PorousFlowRelativePermeabilityBW.C
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
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
11
14
15template <bool is_ad>
18{
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.");
35 "Kn", "Kn >= 0", "Low relative permeability. This must be < Ks, and non-negative.");
37 "Ks", "Ks <= 1", "High relative permeability. This must be > Kn and less than unity");
39 "C", "C > 1", "BW's C parameter. Must be > 1. Typical value would be 1.05.");
40 params.addClassDescription("Broadbridge-White form of relative permeability");
41 return params;
42}
43
44template <bool is_ad>
46 const InputParameters & parameters)
47 : PorousFlowRelativePermeabilityBaseTempl<is_ad>(parameters),
48 _sn(this->template getParam<Real>("Sn")),
49 _ss(this->template getParam<Real>("Ss")),
50 _kn(this->template getParam<Real>("Kn")),
51 _ks(this->template getParam<Real>("Ks")),
52 _c(this->template getParam<Real>("C"))
53{
54 if (_ss <= _sn)
55 mooseError("In BW relative permeability Sn set to ",
56 _sn,
57 " and Ss set to ",
58 _ss,
59 " but these must obey Ss > Sn");
60 if (_ks <= _kn)
61 mooseError("In BW relative permeability Kn set to ",
62 _kn,
63 " and Ks set to ",
64 _ks,
65 " but these must obey Ks > Kn");
66}
67
68template <bool is_ad>
74
75template <bool is_ad>
76Real
81
void mooseError(Args &&... args)
Moose::GenericType< Real, is_ad > GenericReal
registerMooseObject("PorousFlowApp", PorousFlowRelativePermeabilityBW)
void addRequiredRangeCheckedParam(const std::string &name, const std::string &parsed_function, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
void addRangeCheckedParam(const std::string &name, const T &value, const std::string &parsed_function, const std::string &doc_string)
Material that calculates the Broadbridge-White relative permeability P Broadbridge,...
const Real _kn
BW's low relative permeability.
PorousFlowRelativePermeabilityBWTempl(const InputParameters &parameters)
virtual Real dRelativePermeability(Real seff) const override
Derivative of relative permeability with respect to effective saturation.
const Real _ks
BW's high relative permeability.
virtual GenericReal< is_ad > relativePermeability(GenericReal< is_ad > seff) const override
Relative permeability equation (must be overriden in derived class)
Base class for PorousFlow relative permeability materials.
Real dRelativePermeability(Real s, Real c, Real sn, Real ss, Real kn, Real ks)
Derivative of relative permeability with respect to saturation.
T relativePermeability(const T &s, Real c, Real sn, Real ss, Real kn, Real ks)
Relative permeability as a function of saturation.