11 #include "libmesh/quadrature.h"
21 params.addRequiredCoupledVar(
"temp",
"Variable for temperature in Kelvin.");
22 params.addParam<std::string>(
"base_name",
"Material property base name");
23 params.addRequiredParam<Real>(
"sh_coeff_A",
"Steinhart_Hart coefficient A of the material");
24 params.addRequiredRangeCheckedParam<Real>(
25 "sh_coeff_B",
"sh_coeff_B != 0",
"Steinhart_Hart coefficient B of the material.");
27 params.addClassDescription(
28 "Calculates electrical conductivity of a semiconductor from temperature");
34 : DerivativeMaterialInterface<Material>(parameters),
35 _sh_coeff_A(getParam<Real>(
"sh_coeff_A")),
36 _sh_coeff_B(getParam<Real>(
"sh_coeff_B")),
37 _T(coupledValue(
"temp")),
38 _base_name(isParamValid(
"base_name") ? getParam<std::string>(
"base_name") +
"_" :
""),
39 _electric_conductivity(declareProperty<Real>(_base_name +
"electrical_conductivity")),
40 _delectric_conductivity_dT(declarePropertyDerivative<Real>(
41 _base_name +
"electrical_conductivity", getVar(
"temp", 0)->
name()))
48 mooseAssert(MooseUtils::absoluteFuzzyGreaterThan(
_T[_qp], 0.0),
49 "Encountered zero or negative temperature in SemiconductorLinearConductivity");
51 mooseAssert(
_sh_coeff_B != 0,
"Divided by zero as _sh_coeff_B = 0");