47 _dim(_subproblem.
mesh().dimension()),
48 _ref_temp(getParam<Real>(
"reference_temperature")),
50 _has_temp(isCoupled(
"temperature")),
51 _T(coupledGenericValue<is_ad>(
"temperature")),
52 _T_var(coupled(
"temperature")),
53 _T_name(coupledName(
"temperature", 0)),
54 _base_name(isParamValid(
"base_name") ? getParam<
std::string>(
"base_name") +
"_" :
""),
56 _user_provided_thermal_conductivity(getParam<
std::vector<Real>>(
"thermal_conductivity")),
57 _thermal_conductivity(
58 declareGenericProperty<
RankTwoTensor, is_ad>(_base_name +
"thermal_conductivity")),
59 _dthermal_conductivity_dT(
60 declarePropertyDerivative<
RankTwoTensor>(_base_name +
"thermal_conductivity", _T_name)),
61 _thermal_conductivity_temperature_coefficient_function(
62 getParam<FunctionName>(
"thermal_conductivity_temperature_coefficient_function") !=
""
63 ? &getFunction(
"thermal_conductivity_temperature_coefficient_function")
66 _specific_heat(declareGenericProperty<Real, is_ad>(_base_name +
"specific_heat")),
67 _dspecific_heat_dT(declarePropertyDerivative<Real>(_base_name +
"specific_heat", _T_name)),
68 _specific_heat_function(&getFunction(
"specific_heat")),
69 _ad_q_point(is_ad ? &_assembly.adQPoints() : nullptr)
99 const auto & temp_qp = _T[_qp];
100 const auto &
p = genericQPoints();
102 if (_thermal_conductivity_temperature_coefficient_function)
105 _thermal_conductivity[_qp] =
106 _user_provided_thermal_conductivity *
107 (1.0 + _thermal_conductivity_temperature_coefficient_function->value(temp_qp,
p) *
108 (temp_qp - _ref_temp));
109 _dthermal_conductivity_dT[_qp] =
110 _user_provided_thermal_conductivity *
111 _thermal_conductivity_temperature_coefficient_function->timeDerivative(
116 _thermal_conductivity[_qp] = _user_provided_thermal_conductivity;
118 _specific_heat[_qp] = _specific_heat_function->value(temp_qp,
p);
119 _dspecific_heat_dT[_qp] =