https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ComputeThermalExpansionEigenstrain.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
14
15template <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
28template <bool is_ad>
30 const InputParameters & parameters)
32 _thermal_expansion_coeff(this->template getParam<Real>("thermal_expansion_coeff"))
33{
34}
35
36template <bool is_ad>
39{
40 return _thermal_expansion_coeff * (_temperature[_qp] - _stress_free_temperature[_qp]);
41}
42
typename std::conditional< is_ad, ADReal, ChainedReal >::type ValueAndDerivative
Return type with a single derivative.
registerMooseObject("SolidMechanicsApp", ComputeThermalExpansionEigenstrain)
ComputeThermalExpansionEigenstrainBase is a base class for all models that compute eigenstrains due t...
ComputeThermalExpansionEigenstrain computes an eigenstrain for thermal expansion with a constant expa...
virtual ValueAndDerivative< is_ad > computeThermalStrain() override
computeThermalStrain must be overridden in derived classes.
ComputeThermalExpansionEigenstrainTempl(const InputParameters &parameters)
void declareControllable(const std::string &name, std::set< ExecFlagType > execute_flags={})
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)