www.mooseframework.org
PorousFlowRelativePermeabilityCorey.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 
11 
14 
15 template <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 
26 template <bool is_ad>
28  const InputParameters & parameters)
29  : PorousFlowRelativePermeabilityBaseTempl<is_ad>(parameters),
30  _n(this->template getParam<Real>("n"))
31 {
32 }
33 
34 template <bool is_ad>
37 {
38  return std::pow(seff, _n);
39 }
40 
41 template <bool is_ad>
42 Real
44 {
45  return _n * std::pow(seff, _n - 1.0);
46 }
47 
Material to calculate Corey-type relative permeability of an arbitrary phase given the effective satu...
void addRequiredParam(const std::string &name, const std::string &doc_string)
virtual Real dRelativePermeability(Real seff) const override
Derivative of relative permeability with respect to effective saturation.
Base class for PorousFlow relative permeability materials.
virtual GenericReal< is_ad > relativePermeability(GenericReal< is_ad > seff) const override
Relative permeability equation (must be overriden in derived class)
PorousFlowRelativePermeabilityCoreyTempl(const InputParameters &parameters)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addClassDescription(const std::string &doc_string)
typename Moose::GenericType< Real, is_ad > GenericReal
MooseUnits pow(const MooseUnits &, int)
registerMooseObject("PorousFlowApp", PorousFlowRelativePermeabilityCorey)