www.mooseframework.org
PorousFlowRelativePermeabilityConst.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.addParam<Real>("kr", 1.0, "Relative permeability");
21  params.addClassDescription(
22  "This class sets the relative permeability to a constant value (default = 1)");
23  return params;
24 }
25 
26 template <bool is_ad>
28  const InputParameters & parameters)
29  : PorousFlowRelativePermeabilityBaseTempl<is_ad>(parameters),
30  _relperm(this->template getParam<Real>("kr"))
31 {
32 }
33 
34 template <bool is_ad>
36  GenericReal<is_ad> /*seff*/) const
37 {
38  return _relperm;
39 }
40 
41 template <bool is_ad>
43 {
44  return 0.0;
45 }
46 
virtual Real dRelativePermeability(Real seff) const override
Derivative of relative permeability with respect to effective saturation.
PorousFlowRelativePermeabilityConstTempl(const InputParameters &parameters)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
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.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
This class sets a constant relative permeability.
void addClassDescription(const std::string &doc_string)
typename Moose::GenericType< Real, is_ad > GenericReal
registerMooseObject("PorousFlowApp", PorousFlowRelativePermeabilityConst)