20 "Reference temperature at which there is no " 21 "thermal expansion for thermal eigenstrain " 23 params.
addParam<
bool>(
"use_old_temperature",
25 "Flag to optionally use the temperature value from the previous timestep.");
26 params.
addParam<MaterialPropertyName>(
"mean_thermal_expansion_coefficient_name",
27 "Name of the mean coefficient of thermal expansion.");
35 _temperature(_temperature_buffer),
36 _use_old_temperature(this->template getParam<bool>(
"use_old_temperature")),
37 _temperature_old(this->_fe_problem.isTransient() ? this->coupledValueOld(
"temperature")
39 _deigenstrain_dT((is_ad || this->isCoupledConstant(
"temperature"))
42 _eigenstrain_name, this->coupledName(
"temperature"))),
43 _stress_free_temperature(this->coupledValue(
"stress_free_temperature")),
44 _temperature_prop(this->template coupledGenericValue<is_ad>(
"temperature")),
45 _mean_thermal_expansion_coefficient(
46 this->isParamValid(
"mean_thermal_expansion_coefficient_name")
47 ? &this->template declareProperty<
Real>(this->template getParam<MaterialPropertyName>(
48 "mean_thermal_expansion_coefficient_name"))
53 "use_old_temperature",
54 "The old state of the temperature variable is only available in a transient simulation.");
65 const auto nqp = this->_fe_problem.getMaxQps();
66 _temperature_buffer.resize(nqp);
74 for (_qp = 0; _qp < this->_qrule->n_points(); ++_qp)
76 _temperature_buffer[_qp] =
77 _use_old_temperature ? _temperature_old[_qp] : _temperature_prop[_qp];
80 if (_use_old_temperature)
81 _temperature_buffer[_qp] = {_temperature_old[_qp], 0};
83 _temperature_buffer[_qp] = {_temperature_prop[_qp], 1};
93 _eigenstrain[_qp].zero();
94 const auto thermal_strain = computeThermalStrain();
98 _eigenstrain[_qp].addIa(thermal_strain);
99 if (_mean_thermal_expansion_coefficient)
101 if (_temperature[_qp] == _stress_free_temperature[_qp])
102 (*_mean_thermal_expansion_coefficient)[_qp] = 0.0;
105 thermal_strain / (_temperature[_qp] - _stress_free_temperature[_qp]));
110 _eigenstrain[_qp].addIa(thermal_strain.value());
111 if (_mean_thermal_expansion_coefficient)
113 if (_temperature[_qp].
value() == _stress_free_temperature[_qp])
114 (*_mean_thermal_expansion_coefficient)[_qp] = 0.0;
116 (*_mean_thermal_expansion_coefficient)[_qp] =
117 thermal_strain.value() / (_temperature[_qp].value() - _stress_free_temperature[_qp]);
119 if (_deigenstrain_dT)
121 (*_deigenstrain_dT)[_qp].zero();
122 if (!_use_old_temperature)
123 (*_deigenstrain_dT)[_qp].addIa(thermal_strain.derivatives());
virtual void computeProperties() final
update _temperature_buffer
const bool _use_old_temperature
lag temperature variable
virtual void computeProperties() override
virtual void computeQpEigenstrain() override
virtual void subdomainSetup() override
static InputParameters validParams()
ComputeThermalExpansionEigenstrainBaseTempl(const InputParameters ¶meters)
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
static InputParameters validParams()
ComputeEigenstrainBase is the base class for eigenstrain tensors.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
ComputeThermalExpansionEigenstrainBase is a base class for all models that compute eigenstrains due t...
virtual void subdomainSetup() final
resize _temperature_buffer