www.mooseframework.org
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ADComputeMeanThermalExpansionFunctionEigenstrain< compute_stage > Class Template Reference

ADComputeMeanThermalExpansionFunctionEigenstrain computes an eigenstrain for thermal expansion according to a mean thermal expansion function. More...

#include <ADComputeMeanThermalExpansionFunctionEigenstrain.h>

Inheritance diagram for ADComputeMeanThermalExpansionFunctionEigenstrain< compute_stage >:
[legend]

Public Member Functions

 ADComputeMeanThermalExpansionFunctionEigenstrain (const InputParameters &parameters)
 

Static Public Member Functions

static InputParameters validParams ()
 

Protected Member Functions

virtual Real referenceTemperature () override
 
virtual ADReal meanThermalExpansionCoefficient (const ADReal &temperature) override
 
virtual void computeThermalStrain (ADReal &thermal_strain) override
 
virtual void computeQpEigenstrain () override
 Compute the eigenstrain and store in _eigenstrain. More...
 
virtual void initQpStatefulProperties () override
 
virtual void computeQpProperties () override
 
 ADMaterialProperty (RankTwoTensor) &_eigenstrain
 Stores the current total eigenstrain. More...
 
ADReal computeVolumetricStrainComponent (const ADReal volumetric_strain) const
 Helper function for models that compute the eigenstrain based on a volumetric strain. More...
 

Protected Attributes

const Function & _thermal_expansion_function
 
const Real & _thexp_func_ref_temp
 
 usingComputeMeanThermalExpansionEigenstrainBaseMembers
 
 usingComputeThermalExpansionEigenstrainBaseMembers
 
const ADVariableValue & _temperature
 
const ADVariableValue & _stress_free_temperature
 
 usingComputeEigenstrainBaseMembers
 
const std::string _base_name
 Base name prepended to material property name. More...
 
std::string _eigenstrain_name
 Material property name for the eigenstrain tensor. More...
 
bool & _step_zero
 Restartable data to check for the zeroth and first time steps for thermal calculations. More...
 
 usingMaterialMembers
 

Detailed Description

template<ComputeStage compute_stage>
class ADComputeMeanThermalExpansionFunctionEigenstrain< compute_stage >

ADComputeMeanThermalExpansionFunctionEigenstrain computes an eigenstrain for thermal expansion according to a mean thermal expansion function.

Definition at line 15 of file ADComputeMeanThermalExpansionFunctionEigenstrain.h.

Constructor & Destructor Documentation

◆ ADComputeMeanThermalExpansionFunctionEigenstrain()

template<ComputeStage compute_stage>
ADComputeMeanThermalExpansionFunctionEigenstrain< compute_stage >::ADComputeMeanThermalExpansionFunctionEigenstrain ( const InputParameters &  parameters)

Definition at line 38 of file ADComputeMeanThermalExpansionFunctionEigenstrain.C.

40  _thermal_expansion_function(getFunction("thermal_expansion_function")),
41  _thexp_func_ref_temp(getParam<Real>("thermal_expansion_function_reference_temperature"))
42 {
43 }

Member Function Documentation

◆ ADMaterialProperty()

template<ComputeStage compute_stage>
ADComputeEigenstrainBase< compute_stage >::ADMaterialProperty ( RankTwoTensor  ) &
protectedinherited

Stores the current total eigenstrain.

◆ computeQpEigenstrain()

template<ComputeStage compute_stage>
void ADComputeThermalExpansionEigenstrainBase< compute_stage >::computeQpEigenstrain ( )
overrideprotectedvirtualinherited

Compute the eigenstrain and store in _eigenstrain.

Implements ADComputeEigenstrainBase< compute_stage >.

Definition at line 39 of file ADComputeThermalExpansionEigenstrainBase.C.

40 {
41  ADReal thermal_strain = 0.0;
42 
43  computeThermalStrain(thermal_strain);
44 
45  _eigenstrain[_qp].zero();
46  _eigenstrain[_qp].addIa(thermal_strain);
47 }

◆ computeQpProperties()

template<ComputeStage compute_stage>
void ADComputeEigenstrainBase< compute_stage >::computeQpProperties ( )
overrideprotectedvirtualinherited

Definition at line 59 of file ADComputeEigenstrainBase.C.

60 {
61  if (_t_step >= 1)
62  _step_zero = false;
63 
64  // Skip the eigenstrain calculation in step zero because no solution is computed during
65  // the zeroth step, hence computing the eigenstrain in the zeroth step would result in
66  // an incorrect calculation of mechanical_strain, which is stateful.
67  if (!_step_zero)
69 }

◆ computeThermalStrain()

template<ComputeStage compute_stage>
void ADComputeMeanThermalExpansionEigenstrainBase< compute_stage >::computeThermalStrain ( ADReal &  thermal_strain)
overrideprotectedvirtualinherited

Implements ADComputeThermalExpansionEigenstrainBase< compute_stage >.

Definition at line 33 of file ADComputeMeanThermalExpansionEigenstrainBase.C.

35 {
36  const Real reference_temperature = referenceTemperature();
37  const ADReal & current_temp = _temperature[_qp];
38  const ADReal current_alphabar = meanThermalExpansionCoefficient(current_temp);
39  const ADReal thexp_current_temp = current_alphabar * (current_temp - reference_temperature);
40 
41  // Mean linear thermal expansion coefficient relative to the reference temperature
42  // evaluated at stress_free_temperature. This is
43  // \f$\bar{\alpha} = (\delta L(T_{sf}) / L) / (T_{sf} - T_{ref})\f$
44  // where \f$T_sf\f$ is the stress-free temperature and \f$T_{ref}\f$ is the reference temperature.
45  const ADReal alphabar_stress_free_temperature =
47  // Thermal expansion relative to the reference temperature evaluated at stress_free_temperature
48  // \f$(\delta L(T_sf) / L)\f$, where \f$T_sf\f$ is the stress-free temperature.
49  const ADReal thexp_stress_free_temperature =
50  alphabar_stress_free_temperature * (_stress_free_temperature[_qp] - referenceTemperature());
51 
52  // Per M. Niffenegger and K. Reichlin (2012), thermal_strain should be divided
53  // by (1.0 + thexp_stress_free_temperature) to account for the ratio of
54  // the length at the stress-free temperature to the length at the reference
55  // temperature. It can be neglected because it is very close to 1,
56  // but we include it for completeness here.
57 
58  thermal_strain =
59  (thexp_current_temp - thexp_stress_free_temperature) / (1.0 + thexp_stress_free_temperature);
60 }

◆ computeVolumetricStrainComponent()

template<ComputeStage compute_stage>
ADReal ADComputeEigenstrainBase< compute_stage >::computeVolumetricStrainComponent ( const ADReal  volumetric_strain) const
protectedinherited

Helper function for models that compute the eigenstrain based on a volumetric strain.

This function computes the diagonal components of the eigenstrain tensor as logarithmic strains.

Parameters
volumetric_strainThe current volumetric strain to be applied
Returns
Current strain in one direction due to volumetric strain, expressed as a logarithmic strain

Definition at line 73 of file ADComputeEigenstrainBase.C.

75 {
76  // The engineering strain in a given direction is:
77  // epsilon_eng = cbrt(volumetric_strain + 1.0) - 1.0
78  //
79  // We need to provide this as a logarithmic strain to be consistent with the strain measure
80  // used for finite strain:
81  // epsilon_log = log(1.0 + epsilon_eng)
82  //
83  // This can be simplified down to a more direct form:
84  // epsilon_log = log(cbrt(volumetric_strain + 1.0))
85  // or:
86  // epsilon_log = (1/3) log(volumetric_strain + 1.0)
87 
88  return std::log(volumetric_strain + 1.0) / 3.0;
89 }

◆ initQpStatefulProperties()

template<ComputeStage compute_stage>
void ADComputeEigenstrainBase< compute_stage >::initQpStatefulProperties ( )
overrideprotectedvirtualinherited

Reimplemented in ADComputeInstantaneousThermalExpansionFunctionEigenstrain< compute_stage >.

Definition at line 50 of file ADComputeEigenstrainBase.C.

51 {
52  // This property can be promoted to be stateful by other models that use it,
53  // so it needs to be initalized.
54  _eigenstrain[_qp].zero();
55 }

◆ meanThermalExpansionCoefficient()

template<ComputeStage compute_stage>
ADReal ADComputeMeanThermalExpansionFunctionEigenstrain< compute_stage >::meanThermalExpansionCoefficient ( const ADReal &  temperature)
overrideprotectedvirtual

Implements ADComputeMeanThermalExpansionEigenstrainBase< compute_stage >.

Definition at line 54 of file ADComputeMeanThermalExpansionFunctionEigenstrain.C.

56 {
57  return _thermal_expansion_function.value(MetaPhysicL::raw_value(temperature), Point());
58 }

◆ referenceTemperature()

template<ComputeStage compute_stage>
Real ADComputeMeanThermalExpansionFunctionEigenstrain< compute_stage >::referenceTemperature ( )
overrideprotectedvirtual

◆ validParams()

template<ComputeStage compute_stage>
InputParameters ADComputeMeanThermalExpansionFunctionEigenstrain< compute_stage >::validParams ( )
static

Definition at line 20 of file ADComputeMeanThermalExpansionFunctionEigenstrain.C.

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 }

Member Data Documentation

◆ _base_name

template<ComputeStage compute_stage>
const std::string ADComputeEigenstrainBase< compute_stage >::_base_name
protectedinherited

Base name prepended to material property name.

Definition at line 50 of file ADComputeEigenstrainBase.h.

◆ _eigenstrain_name

template<ComputeStage compute_stage>
std::string ADComputeEigenstrainBase< compute_stage >::_eigenstrain_name
protectedinherited

Material property name for the eigenstrain tensor.

Definition at line 53 of file ADComputeEigenstrainBase.h.

◆ _step_zero

template<ComputeStage compute_stage>
bool& ADComputeEigenstrainBase< compute_stage >::_step_zero
protectedinherited

Restartable data to check for the zeroth and first time steps for thermal calculations.

Definition at line 69 of file ADComputeEigenstrainBase.h.

◆ _stress_free_temperature

template<ComputeStage compute_stage>
const ADVariableValue& ADComputeThermalExpansionEigenstrainBase< compute_stage >::_stress_free_temperature
protectedinherited

Definition at line 55 of file ADComputeThermalExpansionEigenstrainBase.h.

◆ _temperature

template<ComputeStage compute_stage>
const ADVariableValue& ADComputeThermalExpansionEigenstrainBase< compute_stage >::_temperature
protectedinherited

Definition at line 54 of file ADComputeThermalExpansionEigenstrainBase.h.

◆ _thermal_expansion_function

template<ComputeStage compute_stage>
const Function& ADComputeMeanThermalExpansionFunctionEigenstrain< compute_stage >::_thermal_expansion_function
protected

◆ _thexp_func_ref_temp

template<ComputeStage compute_stage>
const Real& ADComputeMeanThermalExpansionFunctionEigenstrain< compute_stage >::_thexp_func_ref_temp
protected

◆ usingComputeEigenstrainBaseMembers

template<ComputeStage compute_stage>
ADComputeThermalExpansionEigenstrainBase< compute_stage >::usingComputeEigenstrainBaseMembers
protectedinherited

Definition at line 57 of file ADComputeThermalExpansionEigenstrainBase.h.

◆ usingComputeMeanThermalExpansionEigenstrainBaseMembers

template<ComputeStage compute_stage>
ADComputeMeanThermalExpansionFunctionEigenstrain< compute_stage >::usingComputeMeanThermalExpansionEigenstrainBaseMembers
protected

◆ usingComputeThermalExpansionEigenstrainBaseMembers

template<ComputeStage compute_stage>
ADComputeMeanThermalExpansionEigenstrainBase< compute_stage >::usingComputeThermalExpansionEigenstrainBaseMembers
protectedinherited

◆ usingMaterialMembers

template<ComputeStage compute_stage>
ADComputeEigenstrainBase< compute_stage >::usingMaterialMembers
protectedinherited

Definition at line 71 of file ADComputeEigenstrainBase.h.


The documentation for this class was generated from the following files:
ADComputeMeanThermalExpansionEigenstrainBase::referenceTemperature
virtual Real referenceTemperature()=0
ADComputeThermalExpansionEigenstrainBase::_stress_free_temperature
const ADVariableValue & _stress_free_temperature
Definition: ADComputeThermalExpansionEigenstrainBase.h:55
ADComputeMeanThermalExpansionFunctionEigenstrain::_thermal_expansion_function
const Function & _thermal_expansion_function
Definition: ADComputeMeanThermalExpansionFunctionEigenstrain.h:47
ADComputeEigenstrainBase::_step_zero
bool & _step_zero
Restartable data to check for the zeroth and first time steps for thermal calculations.
Definition: ADComputeEigenstrainBase.h:69
ADComputeThermalExpansionEigenstrainBase::computeThermalStrain
virtual void computeThermalStrain(ADReal &thermal_strain)=0
ADComputeMeanThermalExpansionEigenstrainBase
ADComputeMeanThermalExpansionEigenstrainBase is a base class for computing the thermal expansion eige...
Definition: ADComputeMeanThermalExpansionEigenstrainBase.h:20
ADComputeMeanThermalExpansionEigenstrainBase::meanThermalExpansionCoefficient
virtual ADReal meanThermalExpansionCoefficient(const ADReal &temperature)=0
ADComputeThermalExpansionEigenstrainBase::_temperature
const ADVariableValue & _temperature
Definition: ADComputeThermalExpansionEigenstrainBase.h:54
ADComputeEigenstrainBase::computeQpEigenstrain
virtual void computeQpEigenstrain()=0
Compute the eigenstrain and store in _eigenstrain.
ADComputeMeanThermalExpansionFunctionEigenstrain::_thexp_func_ref_temp
const Real & _thexp_func_ref_temp
Definition: ADComputeMeanThermalExpansionFunctionEigenstrain.h:49
NS::temperature
const std::string temperature
Definition: NS.h:26
ADComputeMeanThermalExpansionEigenstrainBase::validParams
static InputParameters validParams()
Definition: ADComputeMeanThermalExpansionEigenstrainBase.C:16