11 #include "MooseMesh.h"
21 params.set<
bool>(
"use_displaced_mesh") =
true;
26 : Kernel(parameters), _dim(_subproblem.mesh().dimension())
31 if (hasMaterialProperty<Real>(
"thermal_conductivity_x"))
32 _k_i[0] = &getMaterialProperty<Real>(
"thermal_conductivity_x");
34 if (hasMaterialProperty<Real>(
"thermal_conductivity_x_dT"))
35 _k_i_dT[0] = &getMaterialProperty<Real>(
"thermal_conductivity_x_dT");
37 if (hasMaterialProperty<Real>(
"thermal_conductivity_y"))
38 _k_i[1] = &getMaterialProperty<Real>(
"thermal_conductivity_y");
40 if (hasMaterialProperty<Real>(
"thermal_conductivity_y_dT"))
41 _k_i_dT[1] = &getMaterialProperty<Real>(
"thermal_conductivity_y_dT");
43 if (hasMaterialProperty<Real>(
"thermal_conductivity_z"))
44 _k_i[2] = &getMaterialProperty<Real>(
"thermal_conductivity_z");
46 if (hasMaterialProperty<Real>(
"thermal_conductivity_z_dT"))
47 _k_i_dT[2] = &getMaterialProperty<Real>(
"thermal_conductivity_z_dT");
50 mooseError(
"No thermal conductivity was defined");
53 mooseError(
"Cannot define y conductivity but not x");
56 mooseError(
"Cannot define z conductivty but not x and y");
59 mooseError(
"Must define x and y thermal conductivities for 2D");
62 mooseError(
"Must define x, y, and z thermal conductivities for 3D");
65 mooseError(
"Must define k_x_dT and k_y_dT for 2D");
68 mooseError(
"Must define k_x_dT, k_y_dT, and k_z_dT for 3D");
91 for (
unsigned i(0); i <
_dim; ++i)
93 r += _grad_test[_i][_qp](i) * (*
_k_i[i])[_qp] * _grad_u[_qp](i);
102 for (
unsigned i(0); i <
_dim; ++i)
104 jac += _grad_test[_i][_qp](i) * (*
_k_i[i])[_qp] * _grad_phi[_j][_qp](i);
107 jac += (*
_k_i_dT[i])[_qp] * _phi[_j][_qp] *
108 (_grad_test[_i][_qp](i) * (*
_k_i[i])[_qp] * _grad_u[_qp](i));