www.mooseframework.org
ADComputeMeanThermalExpansionFunctionEigenstrain.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 
12 #include "Function.h"
13 
15 
17 
18 template <ComputeStage compute_stage>
19 InputParameters
21 {
22  InputParameters params =
24  params.addClassDescription("Computes eigenstrain due to thermal expansion using a function that "
25  "describes the mean thermal expansion as a function of temperature");
26  params.addRequiredParam<FunctionName>(
27  "thermal_expansion_function",
28  "Function describing the mean thermal expansion as a function of temperature");
29  params.addRequiredParam<Real>("thermal_expansion_function_reference_temperature",
30  "Reference temperature for thermal_exansion_function (IMPORTANT: "
31  "this is different in general from the stress_free_temperature)");
32 
33  return params;
34 }
35 
36 template <ComputeStage compute_stage>
38  ADComputeMeanThermalExpansionFunctionEigenstrain(const InputParameters & parameters)
39  : ADComputeMeanThermalExpansionEigenstrainBase<compute_stage>(parameters),
40  _thermal_expansion_function(getFunction("thermal_expansion_function")),
41  _thexp_func_ref_temp(getParam<Real>("thermal_expansion_function_reference_temperature"))
42 {
43 }
44 
45 template <ComputeStage compute_stage>
46 Real
48 {
49  return _thexp_func_ref_temp;
50 }
51 
52 template <ComputeStage compute_stage>
53 ADReal
55  const ADReal & temperature)
56 {
57  return _thermal_expansion_function.value(MetaPhysicL::raw_value(temperature), Point());
58 }
ADComputeMeanThermalExpansionFunctionEigenstrain::ADComputeMeanThermalExpansionFunctionEigenstrain
ADComputeMeanThermalExpansionFunctionEigenstrain(const InputParameters &parameters)
Definition: ADComputeMeanThermalExpansionFunctionEigenstrain.C:38
ADComputeMeanThermalExpansionEigenstrainBase
ADComputeMeanThermalExpansionEigenstrainBase is a base class for computing the thermal expansion eige...
Definition: ADComputeMeanThermalExpansionEigenstrainBase.h:20
ADComputeMeanThermalExpansionFunctionEigenstrain::referenceTemperature
virtual Real referenceTemperature() override
Definition: ADComputeMeanThermalExpansionFunctionEigenstrain.C:47
ADComputeMeanThermalExpansionFunctionEigenstrain::validParams
static InputParameters validParams()
Definition: ADComputeMeanThermalExpansionFunctionEigenstrain.C:20
ADComputeMeanThermalExpansionFunctionEigenstrain
ADComputeMeanThermalExpansionFunctionEigenstrain computes an eigenstrain for thermal expansion accord...
Definition: ADComputeMeanThermalExpansionFunctionEigenstrain.h:15
defineADLegacyParams
defineADLegacyParams(ADComputeMeanThermalExpansionFunctionEigenstrain)
ADComputeMeanThermalExpansionFunctionEigenstrain::meanThermalExpansionCoefficient
virtual ADReal meanThermalExpansionCoefficient(const ADReal &temperature) override
Definition: ADComputeMeanThermalExpansionFunctionEigenstrain.C:54
ADComputeMeanThermalExpansionFunctionEigenstrain.h
registerADMooseObject
registerADMooseObject("TensorMechanicsApp", ADComputeMeanThermalExpansionFunctionEigenstrain)
NS::temperature
const std::string temperature
Definition: NS.h:26
ADComputeMeanThermalExpansionEigenstrainBase::validParams
static InputParameters validParams()
Definition: ADComputeMeanThermalExpansionEigenstrainBase.C:16