https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ComputeDilatationThermalExpansionEigenstrainBase.C
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
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
12template <bool is_ad>
18
19template <bool is_ad>
25
26template <bool is_ad>
29{
30 const auto stress_free = computeDilatation(this->_stress_free_temperature[_qp]);
31 const auto current = computeDilatation(this->_temperature[_qp]);
32
33 // in non-AD mode the T derivative of the stress_free term needs get dropped.
34 // We assume _stress_free_temperature does not depend on T. In AD mode this is automatic.
35 return current - (is_ad ? stress_free : stress_free.value());
36}
37
typename std::conditional< is_ad, ADReal, ChainedReal >::type ValueAndDerivative
Return type with a single derivative.
ComputeDilatationThermalExpansionEigenstrainBase computes an eigenstrain for thermal expansion from a...
virtual ValueAndDerivative< is_ad > computeThermalStrain() override
computeThermalStrain must be overridden in derived classes.
ComputeThermalExpansionEigenstrainBase is a base class for all models that compute eigenstrains due t...