www.mooseframework.org
porous_flow
src
materials
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
10
#include "
PorousFlowPermeabilityTensorFromVar.h
"
11
12
registerMooseObject
(
"PorousFlowApp"
,
PorousFlowPermeabilityTensorFromVar
);
13
14
template
<>
15
InputParameters
16
validParams<PorousFlowPermeabilityTensorFromVar>
()
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
31
PorousFlowPermeabilityTensorFromVar::PorousFlowPermeabilityTensorFromVar
(
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
42
PorousFlowPermeabilityTensorFromVar::computeQpProperties
()
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
}
PorousFlowPermeabilityBase
Base class Material designed to provide the permeability tensor.
Definition:
PorousFlowPermeabilityBase.h:22
PorousFlowPermeabilityBase::_dpermeability_qp_dvar
MaterialProperty< std::vector< RealTensorValue > > & _dpermeability_qp_dvar
d(quadpoint permeability)/d(PorousFlow variable)
Definition:
PorousFlowPermeabilityBase.h:32
PorousFlowPermeabilityTensorFromVar::PorousFlowPermeabilityTensorFromVar
PorousFlowPermeabilityTensorFromVar(const InputParameters ¶meters)
Definition:
PorousFlowPermeabilityTensorFromVar.C:31
PorousFlowPermeabilityTensorFromVar::computeQpProperties
void computeQpProperties() override
Definition:
PorousFlowPermeabilityTensorFromVar.C:42
PorousFlowPermeabilityTensorFromVar::_k_anisotropy
const RealTensorValue _k_anisotropy
Tensor multiplier k_ijk.
Definition:
PorousFlowPermeabilityTensorFromVar.h:38
PorousFlowPermeabilityBase::_permeability_qp
MaterialProperty< RealTensorValue > & _permeability_qp
Quadpoint permeability.
Definition:
PorousFlowPermeabilityBase.h:29
validParams< PorousFlowPermeabilityBase >
InputParameters validParams< PorousFlowPermeabilityBase >()
Definition:
PorousFlowPermeabilityBase.C:14
PorousFlowPermeabilityTensorFromVar
Material designed to provide the permeability tensor which is calculated from a tensor multiplied by ...
Definition:
PorousFlowPermeabilityTensorFromVar.h:26
PorousFlowPermeabilityTensorFromVar::_perm
const VariableValue & _perm
Permeability components.
Definition:
PorousFlowPermeabilityTensorFromVar.h:35
PorousFlowMaterialVectorBase::_num_var
const unsigned int _num_var
Number of PorousFlow variables.
Definition:
PorousFlowMaterialVectorBase.h:36
PorousFlowPermeabilityBase::_dpermeability_qp_dgradvar
MaterialProperty< std::vector< std::vector< RealTensorValue > > > & _dpermeability_qp_dgradvar
d(quadpoint permeability)/d(grad(PorousFlow variable))
Definition:
PorousFlowPermeabilityBase.h:35
registerMooseObject
registerMooseObject("PorousFlowApp", PorousFlowPermeabilityTensorFromVar)
PorousFlowPermeabilityTensorFromVar.h
validParams< PorousFlowPermeabilityTensorFromVar >
InputParameters validParams< PorousFlowPermeabilityTensorFromVar >()
Definition:
PorousFlowPermeabilityTensorFromVar.C:16
Generated on Sat Jan 25 2020 12:04:42 for www.mooseframework.org by
1.8.16