https://mooseframework.inl.gov
Loading...
Searching...
No Matches
PorousFlowRelativePermeabilityCorey.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{
20 params.addRequiredParam<Real>("n", "The Corey exponent of the phase.");
21 params.addClassDescription("This Material calculates relative permeability of the fluid phase, "
22 "using the simple Corey model ((S-S_res)/(1-sum(S_res)))^n");
23 return params;
24}
25
26template <bool is_ad>
28 const InputParameters & parameters)
29 : PorousFlowRelativePermeabilityBaseTempl<is_ad>(parameters),
30 _n(this->template getParam<Real>("n"))
31{
32}
33
34template <bool is_ad>
37{
38 using std::pow;
39 return pow(seff, _n);
40}
41
42template <bool is_ad>
43Real
45{
46 return _n * std::pow(seff, _n - 1.0);
47}
48
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
Moose::GenericType< Real, is_ad > GenericReal
registerMooseObject("PorousFlowApp", PorousFlowRelativePermeabilityCorey)
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
Base class for PorousFlow relative permeability materials.
Material to calculate Corey-type relative permeability of an arbitrary phase given the effective satu...
virtual Real dRelativePermeability(Real seff) const override
Derivative of relative permeability with respect to effective saturation.
virtual GenericReal< is_ad > relativePermeability(GenericReal< is_ad > seff) const override
Relative permeability equation (must be overriden in derived class)
PorousFlowRelativePermeabilityCoreyTempl(const InputParameters &parameters)