16 #include "libmesh/quadrature.h" 27 params.
addCoupledVar(
"temperature",
"Coupled variable for temperature.");
29 "reference_temperature", 293.0,
"Reference temperature for thermal conductivity in Kelvin.");
30 params.
addParam<std::string>(
"base_name",
"Material property base name.");
32 "The thermal conductivity tensor values");
34 "thermal_conductivity_temperature_coefficient_function",
36 "Temperature coefficient for thermal conductivity as a function of temperature.");
38 "Specific heat as a function of temperature.");
39 params.
addClassDescription(
"General-purpose material model for anisotropic heat conduction");
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)
77 _thermal_conductivity[_qp] = _user_provided_thermal_conductivity;
78 DerivativeMaterialInterface::initQpStatefulProperties();
85 return (*_ad_q_point)[_qp];
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] =
registerMooseObject("HeatTransferApp", AnisoHeatConductionMaterial)
static InputParameters validParams()
static InputParameters validParams()
virtual void computeQpProperties() override
Calculates thermal conductivity and specific heat of the material.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual void initQpStatefulProperties() override
AnisoHeatConductionMaterialTempl(const InputParameters ¶meters)