www.mooseframework.org
PorousFlowPermeabilityConstFromVar.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<PorousFlowPermeabilityBase>();
19  params.addRequiredCoupledVar("perm_xx", "The xx component of the permeability tensor");
20  params.addRequiredCoupledVar("perm_yy", "The yy component of the permeability tensor");
21  params.addRequiredCoupledVar("perm_zz", "The zz component of the permeability tensor");
22  params.addCoupledVar("perm_xy", 0.0, "The xy component of the permeability tensor");
23  params.addCoupledVar("perm_xz", 0.0, "The xz component of the permeability tensor");
24  params.addCoupledVar("perm_yx", 0.0, "The yx component of the permeability tensor");
25  params.addCoupledVar("perm_yz", 0.0, "The yz component of the permeability tensor");
26  params.addCoupledVar("perm_zx", 0.0, "The zx component of the permeability tensor");
27  params.addCoupledVar("perm_zy", 0.0, "The zy component of the permeability tensor");
28  params.addClassDescription(
29  "This Material calculates the permeability tensor given by the input variables");
30  return params;
31 }
32 
34  const InputParameters & parameters)
35  : PorousFlowPermeabilityBase(parameters),
36  _perm_xx(coupledValue("perm_xx")),
37  _perm_xy(coupledValue("perm_xy")),
38  _perm_xz(coupledValue("perm_xz")),
39  _perm_yx(coupledValue("perm_yx")),
40  _perm_yy(coupledValue("perm_yy")),
41  _perm_yz(coupledValue("perm_yz")),
42  _perm_zx(coupledValue("perm_zx")),
43  _perm_zy(coupledValue("perm_zy")),
44  _perm_zz(coupledValue("perm_zz"))
45 {
46 }
47 
48 void
50 {
51  RealTensorValue permeability(_perm_xx[_qp],
52  _perm_xy[_qp],
53  _perm_xz[_qp],
54  _perm_yx[_qp],
55  _perm_yy[_qp],
56  _perm_yz[_qp],
57  _perm_zx[_qp],
58  _perm_zy[_qp],
59  _perm_zz[_qp]);
60 
61  _permeability_qp[_qp] = permeability;
62  _dpermeability_qp_dvar[_qp].resize(_num_var, RealTensorValue());
63  _dpermeability_qp_dgradvar[_qp].resize(LIBMESH_DIM);
64 
65  for (unsigned int i = 0; i < LIBMESH_DIM; ++i)
66  _dpermeability_qp_dgradvar[_qp][i].resize(_num_var, RealTensorValue());
67 }
PorousFlowPermeabilityConstFromVar(const InputParameters &parameters)
registerMooseObject("PorousFlowApp", PorousFlowPermeabilityConstFromVar)
MaterialProperty< std::vector< std::vector< RealTensorValue > > > & _dpermeability_qp_dgradvar
d(quadpoint permeability)/d(grad(PorousFlow variable))
Base class Material designed to provide the permeability tensor.
Material to provide permeability taken from a variable.
const unsigned int _num_var
Number of PorousFlow variables.
MaterialProperty< std::vector< RealTensorValue > > & _dpermeability_qp_dvar
d(quadpoint permeability)/d(PorousFlow variable)
MaterialProperty< RealTensorValue > & _permeability_qp
Quadpoint permeability.
const VariableValue & _perm_xx
Permeability components.
InputParameters validParams< PorousFlowPermeabilityConstFromVar >()
InputParameters validParams< PorousFlowPermeabilityBase >()