www.mooseframework.org
ComputeThermalExpansionEigenstrain.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 
14 
15 template <bool is_ad>
18 {
20  params.addClassDescription("Computes eigenstrain due to thermal expansion "
21  "with a constant coefficient");
22  params.addRequiredParam<Real>("thermal_expansion_coeff", "Thermal expansion coefficient");
23  params.declareControllable("thermal_expansion_coeff");
24 
25  return params;
26 }
27 
28 template <bool is_ad>
30  const InputParameters & parameters)
32  _thermal_expansion_coeff(this->template getParam<Real>("thermal_expansion_coeff"))
33 {
34 }
35 
36 template <bool is_ad>
39 {
40  return _thermal_expansion_coeff * (_temperature[_qp] - _stress_free_temperature[_qp]);
41 }
42 
virtual ValueAndDerivative< is_ad > computeThermalStrain() override
computeThermalStrain must be overridden in derived classes.
void addRequiredParam(const std::string &name, const std::string &doc_string)
typename std::conditional< is_ad, ADReal, ChainedReal >::type ValueAndDerivative
Return type with a single derivative.
registerMooseObject("SolidMechanicsApp", ComputeThermalExpansionEigenstrain)
ComputeThermalExpansionEigenstrain computes an eigenstrain for thermal expansion with a constant expa...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
ComputeThermalExpansionEigenstrainBase is a base class for all models that compute eigenstrains due t...
ComputeThermalExpansionEigenstrainTempl(const InputParameters &parameters)
void addClassDescription(const std::string &doc_string)
void declareControllable(const std::string &name, std::set< ExecFlagType > execute_flags={})