https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ComputeMeanThermalExpansionEigenstrainBase.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#include "Function.h"
12
13template <bool is_ad>
16{
18 params.addClassDescription("Base class for models that compute eigenstrain due to mean"
19 "thermal expansion as a function of temperature");
20 params.addParam<Real>("thermal_expansion_scale_factor",
21 1.0,
22 "Scaling factor on the thermal expansion strain. This input parameter can "
23 "be used to perform sensitivity analysis on thermal expansion.");
24 params.addParamNamesToGroup("thermal_expansion_scale_factor", "Advanced");
25
26 return params;
27}
28
29template <bool is_ad>
33 _thermal_expansion_scale_factor(this->template getParam<Real>("thermal_expansion_scale_factor"))
34{
35}
36
37template <bool is_ad>
40{
41 const auto reference_temperature = referenceTemperature();
42
43 const auto current_alphabar = meanThermalExpansionCoefficient(this->_temperature[_qp]);
44 const auto thexp_T = current_alphabar * (this->_temperature[_qp] - reference_temperature);
45
46 // Mean linear thermal expansion coefficient relative to the reference temperature
47 // evaluated at stress_free_temperature. This is
48 // \f$\bar{\alpha} = (\delta L(T_{sf}) / L) / (T_{sf} - T_{ref})\f$
49 // where \f$T_sf\f$ is the stress-free temperature and \f$T_{ref}\f$ is the reference temperature.
50 const auto alphabar_stress_free_temperature =
51 meanThermalExpansionCoefficient(this->_stress_free_temperature[_qp]);
52
53 // Thermal expansion relative to the reference temperature evaluated at stress_free_temperature
54 // \f$(\delta L(T_sf) / L)\f$, where \f$T_sf\f$ is the stress-free temperature.
55 const auto thexp_stress_free_temperature =
56 alphabar_stress_free_temperature *
57 (this->_stress_free_temperature[_qp] - referenceTemperature());
58
59 // Per M. Niffenegger and K. Reichlin (2012), thermal_strain should be divided
60 // by (1.0 + thexp_stress_free_temperature) to account for the ratio of
61 // the length at the stress-free temperature to the length at the reference
62 // temperature. It can be neglected because it is very close to 1,
63 // but we include it for completeness here.
64
65 auto thermal_strain =
66 (thexp_T - thexp_stress_free_temperature) / (1.0 + thexp_stress_free_temperature);
67
68 return _thermal_expansion_scale_factor * thermal_strain;
69}
70
typename std::conditional< is_ad, ADReal, ChainedReal >::type ValueAndDerivative
Return type with a single derivative.
ComputeMeanThermalExpansionEigenstrainBase is a base class for computing the thermal expansion eigens...
virtual ValueAndDerivative< is_ad > computeThermalStrain() override
Compute the total thermal strain relative to the stress-free temperature at the current temperature a...
ComputeThermalExpansionEigenstrainBase is a base class for all models that compute eigenstrains due t...
void addParamNamesToGroup(const std::string &space_delim_names, const std::string group_name)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)