www.mooseframework.org
PorousFlowDiffusivityConst.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 
13 
14 template <>
15 InputParameters
17 {
18  InputParameters params = validParams<PorousFlowDiffusivityBase>();
19  params.addRequiredParam<std::vector<Real>>(
20  "tortuosity", "List of tortuosities. Order is i) phase 0; ii) phase 1; etc");
21  params.addClassDescription(
22  "This Material provides constant tortuosity and diffusion coefficients");
23  return params;
24 }
25 
26 PorousFlowDiffusivityConst::PorousFlowDiffusivityConst(const InputParameters & parameters)
27  : PorousFlowDiffusivityBase(parameters),
28  _input_tortuosity(getParam<std::vector<Real>>("tortuosity"))
29 {
30  // Check that the number of tortuosities entered is equal to the number of phases
31  if (_input_tortuosity.size() != _num_phases)
32  paramError("tortuosity",
33  "The number of tortuosity values entered is not equal to the number of phases "
34  "specified in the Dictator");
35 
36  // Check that all tortuosities are (0, 1]
37  for (unsigned int i = 0; i < _num_phases; ++i)
38  if (_input_tortuosity[i] <= 0.0 || _input_tortuosity[i] > 1)
39  paramError("tortuosity",
40  "All tortuosities must be greater than zero and less than (or equal to) one"
41  ".\nNote: the definition of tortuosity used is l/le, where l is the straight line "
42  "length and le is the effective flow length");
43 }
44 
45 void
47 {
49 
51 }
registerMooseObject("PorousFlowApp", PorousFlowDiffusivityConst)
const unsigned int _num_phases
Number of phases.
virtual void computeQpProperties() override
Material designed to provide constant tortuosity and diffusion coefficents.
PorousFlowDiffusivityConst(const InputParameters &parameters)
virtual void computeQpProperties() override
Base class Material designed to provide the tortuosity and diffusion coefficents. ...
const std::vector< Real > _input_tortuosity
Input tortuosity.
InputParameters validParams< PorousFlowDiffusivityBase >()
MaterialProperty< std::vector< Real > > & _tortuosity
Tortuosity tau_0 * tau_{alpha} for fluid phase alpha.
InputParameters validParams< PorousFlowDiffusivityConst >()