www.mooseframework.org
PorousFlowPermeabilityConstFromVar.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<PorousFlowPermeabilityBase>();
15  params.addRequiredCoupledVar("perm_xx", "The xx component of the permeability tensor");
16  params.addRequiredCoupledVar("perm_yy", "The yy component of the permeability tensor");
17  params.addRequiredCoupledVar("perm_zz", "The zz component of the permeability tensor");
18  params.addCoupledVar("perm_xy", 0.0, "The xy component of the permeability tensor");
19  params.addCoupledVar("perm_xz", 0.0, "The xz component of the permeability tensor");
20  params.addCoupledVar("perm_yx", 0.0, "The yx component of the permeability tensor");
21  params.addCoupledVar("perm_yz", 0.0, "The yz component of the permeability tensor");
22  params.addCoupledVar("perm_zx", 0.0, "The zx component of the permeability tensor");
23  params.addCoupledVar("perm_zy", 0.0, "The zy component of the permeability tensor");
24  params.addClassDescription(
25  "This Material calculates the permeability tensor given by the input variables");
26  return params;
27 }
28 
30  const InputParameters & parameters)
31  : PorousFlowPermeabilityBase(parameters),
32  _perm_xx(coupledValue("perm_xx")),
33  _perm_xy(coupledValue("perm_xy")),
34  _perm_xz(coupledValue("perm_xz")),
35  _perm_yx(coupledValue("perm_yx")),
36  _perm_yy(coupledValue("perm_yy")),
37  _perm_yz(coupledValue("perm_yz")),
38  _perm_zx(coupledValue("perm_zx")),
39  _perm_zy(coupledValue("perm_zy")),
40  _perm_zz(coupledValue("perm_zz"))
41 {
42 }
43 
44 void
46 {
47  RealTensorValue permeability(_perm_xx[_qp],
48  _perm_xy[_qp],
49  _perm_xz[_qp],
50  _perm_yx[_qp],
51  _perm_yy[_qp],
52  _perm_yz[_qp],
53  _perm_zx[_qp],
54  _perm_zy[_qp],
55  _perm_zz[_qp]);
56 
57  _permeability_qp[_qp] = permeability;
58  _dpermeability_qp_dvar[_qp].resize(_num_var, RealTensorValue());
59  _dpermeability_qp_dgradvar[_qp].resize(LIBMESH_DIM);
60 
61  for (unsigned int i = 0; i < LIBMESH_DIM; ++i)
62  _dpermeability_qp_dgradvar[_qp][i].resize(_num_var, RealTensorValue());
63 }
PorousFlowPermeabilityConstFromVar(const InputParameters &parameters)
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.
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 >()