www.mooseframework.org
ADComputeMeanThermalExpansionEigenstrainBase.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
11 
13 
14 template <ComputeStage compute_stage>
15 InputParameters
17 {
19  params.addClassDescription("Base class for models that compute eigenstrain due to mean"
20  "thermal expansion as a function of temperature using AD");
21  return params;
22 }
23 
24 template <ComputeStage compute_stage>
26  compute_stage>::ADComputeMeanThermalExpansionEigenstrainBase(const InputParameters & parameters)
27  : ADComputeThermalExpansionEigenstrainBase<compute_stage>(parameters)
28 {
29 }
30 
31 template <ComputeStage compute_stage>
32 void
34  ADReal & thermal_strain)
35 {
36  const Real reference_temperature = referenceTemperature();
37  const ADReal & current_temp = _temperature[_qp];
38  const ADReal current_alphabar = meanThermalExpansionCoefficient(current_temp);
39  const ADReal thexp_current_temp = current_alphabar * (current_temp - reference_temperature);
40 
41  // Mean linear thermal expansion coefficient relative to the reference temperature
42  // evaluated at stress_free_temperature. This is
43  // \f$\bar{\alpha} = (\delta L(T_{sf}) / L) / (T_{sf} - T_{ref})\f$
44  // where \f$T_sf\f$ is the stress-free temperature and \f$T_{ref}\f$ is the reference temperature.
45  const ADReal alphabar_stress_free_temperature =
46  meanThermalExpansionCoefficient(_stress_free_temperature[_qp]);
47  // Thermal expansion relative to the reference temperature evaluated at stress_free_temperature
48  // \f$(\delta L(T_sf) / L)\f$, where \f$T_sf\f$ is the stress-free temperature.
49  const ADReal thexp_stress_free_temperature =
50  alphabar_stress_free_temperature * (_stress_free_temperature[_qp] - referenceTemperature());
51 
52  // Per M. Niffenegger and K. Reichlin (2012), thermal_strain should be divided
53  // by (1.0 + thexp_stress_free_temperature) to account for the ratio of
54  // the length at the stress-free temperature to the length at the reference
55  // temperature. It can be neglected because it is very close to 1,
56  // but we include it for completeness here.
57 
58  thermal_strain =
59  (thexp_current_temp - thexp_stress_free_temperature) / (1.0 + thexp_stress_free_temperature);
60 }
61 
ADComputeMeanThermalExpansionEigenstrainBase.h
defineADLegacyParams
defineADLegacyParams(ADComputeMeanThermalExpansionEigenstrainBase)
ADComputeThermalExpansionEigenstrainBase::validParams
static InputParameters validParams()
Definition: ADComputeThermalExpansionEigenstrainBase.C:17
ADComputeMeanThermalExpansionEigenstrainBase
ADComputeMeanThermalExpansionEigenstrainBase is a base class for computing the thermal expansion eige...
Definition: ADComputeMeanThermalExpansionEigenstrainBase.h:20
ADComputeMeanThermalExpansionEigenstrainBase::computeThermalStrain
virtual void computeThermalStrain(ADReal &thermal_strain) override
Definition: ADComputeMeanThermalExpansionEigenstrainBase.C:33
adBaseClass
adBaseClass(ADComputeMeanThermalExpansionEigenstrainBase)
ADComputeThermalExpansionEigenstrainBase
ADComputeThermalExpansionEigenstrainBase is a base class for all models that compute eigenstrains due...
Definition: ADComputeThermalExpansionEigenstrainBase.h:22
ADComputeMeanThermalExpansionEigenstrainBase::validParams
static InputParameters validParams()
Definition: ADComputeMeanThermalExpansionEigenstrainBase.C:16