www.mooseframework.org
PorousFlowDiffusivityConst.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
7 
9 
10 template <>
11 InputParameters
13 {
14  InputParameters params = validParams<PorousFlowDiffusivityBase>();
15  params.addRequiredParam<std::vector<Real>>(
16  "tortuosity", "List of tortuosities. Order is i) phase 0; ii) phase 1; etc");
17  params.addClassDescription(
18  "This Material provides constant tortuosity and diffusion coefficients");
19  return params;
20 }
21 
22 PorousFlowDiffusivityConst::PorousFlowDiffusivityConst(const InputParameters & parameters)
23  : PorousFlowDiffusivityBase(parameters),
24  _input_tortuosity(getParam<std::vector<Real>>("tortuosity"))
25 {
26  // Check that the number of tortuosities entered is equal to the number of phases
27  if (_input_tortuosity.size() != _num_phases)
28  mooseError("The number of tortuosity values entered is not equal to the number of phases "
29  "specified in the Dictator");
30 
31  // Check that all tortuosities are (0, 1]
32  for (unsigned int i = 0; i < _num_phases; ++i)
33  if (_input_tortuosity[i] <= 0.0 || _input_tortuosity[i] > 1)
34  mooseError("All tortuosities must be greater than zero and less than (or equal to) one in ",
35  _name,
36  ".\nNote: the definition of tortuosity used is l/le, where l is the straight line "
37  "length and le is the effective flow length");
38 }
39 
40 void
42 {
44 
46 }
const unsigned int _num_phases
Number of phases.
virtual void computeQpProperties() override
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 >()