www.mooseframework.org
PorousFlowPermeabilityTensorFromVar.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", "The scalar permeability");
20  params.addParam<RealTensorValue>("k_anisotropy",
21  "A tensor to multiply the scalar "
22  "permeability, in order to obtain anisotropy if "
23  "required. Defaults to isotropic permeability "
24  "if not specified.");
25  params.addClassDescription(
26  "This Material calculates the permeability tensor from a coupled variable "
27  "multiplied by a tensor");
28  return params;
29 }
30 
32  const InputParameters & parameters)
33  : PorousFlowPermeabilityBase(parameters),
34  _perm(coupledValue("perm")),
35  _k_anisotropy(parameters.isParamValid("k_anisotropy")
36  ? getParam<RealTensorValue>("k_anisotropy")
37  : RealTensorValue(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0))
38 {
39 }
40 
41 void
43 {
44  _permeability_qp[_qp] = _k_anisotropy * _perm[_qp];
45 
46  _dpermeability_qp_dvar[_qp].resize(_num_var, RealTensorValue());
47  _dpermeability_qp_dgradvar[_qp].resize(LIBMESH_DIM);
48 
49  for (unsigned int i = 0; i < LIBMESH_DIM; ++i)
50  _dpermeability_qp_dgradvar[_qp][i].resize(_num_var, RealTensorValue());
51 }
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.
PorousFlowPermeabilityTensorFromVar(const InputParameters &parameters)
InputParameters validParams< PorousFlowPermeabilityTensorFromVar >()
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 RealTensorValue _k_anisotropy
Tensor multiplier k_ijk.
registerMooseObject("PorousFlowApp", PorousFlowPermeabilityTensorFromVar)
const VariableValue & _perm
Permeability components.
InputParameters validParams< PorousFlowPermeabilityBase >()
Material designed to provide the permeability tensor which is calculated from a tensor multiplied by ...