www.mooseframework.org
PorousFlowHeatConduction.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 // MOOSE includes
11 #include "MooseVariable.h"
12 
13 template <>
14 InputParameters
16 {
17  InputParameters params = validParams<Kernel>();
18  params.addRequiredParam<UserObjectName>(
19  "PorousFlowDictator", "The UserObject that holds the list of PorousFlow variable names");
20  params.addClassDescription("Heat conduction in the Porous Flow module");
21  return params;
22 }
23 
24 PorousFlowHeatConduction::PorousFlowHeatConduction(const InputParameters & parameters)
25  : Kernel(parameters),
26  _dictator(getUserObject<PorousFlowDictator>("PorousFlowDictator")),
27  _la(getMaterialProperty<RealTensorValue>("PorousFlow_thermal_conductivity_qp")),
28  _dla_dvar(getMaterialProperty<std::vector<RealTensorValue>>(
29  "dPorousFlow_thermal_conductivity_qp_dvar")),
30  _grad_t(getMaterialProperty<RealGradient>("PorousFlow_grad_temperature_qp")),
31  _dgrad_t_dvar(
32  getMaterialProperty<std::vector<RealGradient>>("dPorousFlow_grad_temperature_qp_dvar")),
33  _dgrad_t_dgradvar(
34  getMaterialProperty<std::vector<Real>>("dPorousFlow_grad_temperature_qp_dgradvar"))
35 {
36 }
37 
38 Real
40 {
41  return _grad_test[_i][_qp] * (_la[_qp] * _grad_t[_qp]);
42 }
43 
44 Real
46 {
47  return computeQpOffDiagJacobian(_var.number());
48 }
49 
50 Real
52 {
54  return 0.0;
55 
57  const unsigned int pvar = _dictator.porousFlowVariableNum(jvar);
58 
59  return _grad_test[_i][_qp] *
60  ((_dla_dvar[_qp][pvar] * _grad_t[_qp] + _la[_qp] * _dgrad_t_dvar[_qp][pvar]) *
61  _phi[_j][_qp] +
62  _la[_qp] * _dgrad_t_dgradvar[_qp][pvar] * _grad_phi[_j][_qp]);
63 }
PorousFlowHeatConduction(const InputParameters &parameters)
const MaterialProperty< std::vector< Real > > & _dgrad_t_dgradvar
d(gradT)/d(grad PorousFlow variable)
const MaterialProperty< RealGradient > & _grad_t
grad(temperature)
const MaterialProperty< RealTensorValue > & _la
thermal conductivity at the quadpoints
const MaterialProperty< std::vector< RealGradient > > & _dgrad_t_dvar
d(gradT)/d(PorousFlow variable)
const MaterialProperty< std::vector< RealTensorValue > > & _dla_dvar
d(thermal conductivity at the quadpoints)/d(PorousFlow variable)
virtual Real computeQpOffDiagJacobian(unsigned int jvar) override
InputParameters validParams< PorousFlowHeatConduction >()
This holds maps between the nonlinear variables used in a PorousFlow simulation and the variable numb...
const PorousFlowDictator & _dictator
holds info on the PorousFlow variables
virtual Real computeQpResidual() override
bool notPorousFlowVariable(unsigned int moose_var_num) const
returns true if moose_var_num is not a porous flow variabe
unsigned int porousFlowVariableNum(unsigned int moose_var_num) const
the PorousFlow variable number
virtual Real computeQpJacobian() override