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

ADComputeInstantaneousThermalExpansionFunctionEigenstrain computes an eigenstrain for thermal expansion according to an instantaneous thermal expansion function. More...

#include <ADComputeInstantaneousThermalExpansionFunctionEigenstrain.h>

Inheritance diagram for ADComputeInstantaneousThermalExpansionFunctionEigenstrain< compute_stage >:
[legend]

Public Member Functions

 ADComputeInstantaneousThermalExpansionFunctionEigenstrain (const InputParameters &parameters)
 

Static Public Member Functions

static InputParameters validParams ()
 

Protected Member Functions

virtual void initQpStatefulProperties () override
 
virtual void computeThermalStrain (ADReal &thermal_strain) override
 
 ADMaterialProperty (Real) &_thermal_strain
 Stores the thermal strain as a scalar for use in computing an incremental update to this. More...
 
virtual void computeQpEigenstrain () override
 Compute the eigenstrain and store in _eigenstrain. More...
 
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 VariableValue & _temperature_old
 
const Function & _thermal_expansion_function
 
const MaterialProperty< Real > & _thermal_strain_old
 
bool & _step_one
 Indicates whether we are on the first step, avoiding false positives when restarting. More...
 
 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 ADComputeInstantaneousThermalExpansionFunctionEigenstrain< compute_stage >

ADComputeInstantaneousThermalExpansionFunctionEigenstrain computes an eigenstrain for thermal expansion according to an instantaneous thermal expansion function.

Definition at line 16 of file ADComputeInstantaneousThermalExpansionFunctionEigenstrain.h.

Constructor & Destructor Documentation

◆ ADComputeInstantaneousThermalExpansionFunctionEigenstrain()

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

Definition at line 36 of file ADComputeInstantaneousThermalExpansionFunctionEigenstrain.C.

38  _temperature_old(coupledValueOld("temperature")),
39  _thermal_expansion_function(getFunction("thermal_expansion_function")),
40  _thermal_strain(
41  declareADProperty<Real>("InstantaneousThermalExpansionFunction_thermal_strain")),
43  getMaterialPropertyOld<Real>("InstantaneousThermalExpansionFunction_thermal_strain")),
44  _step_one(declareRestartableData<bool>("step_one", true))
45 {
46 }

Member Function Documentation

◆ ADMaterialProperty() [1/2]

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

Stores the current total eigenstrain.

◆ ADMaterialProperty() [2/2]

template<ComputeStage compute_stage>
ADComputeInstantaneousThermalExpansionFunctionEigenstrain< compute_stage >::ADMaterialProperty ( Real  ) &
protected

Stores the thermal strain as a scalar for use in computing an incremental update to this.

◆ 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 ADComputeInstantaneousThermalExpansionFunctionEigenstrain< compute_stage >::computeThermalStrain ( ADReal &  thermal_strain)
overrideprotectedvirtual

Implements ADComputeThermalExpansionEigenstrainBase< compute_stage >.

Definition at line 57 of file ADComputeInstantaneousThermalExpansionFunctionEigenstrain.C.

59 {
60  if (_t_step > 1)
61  _step_one = false;
62 
63  const Real & current_temp = MetaPhysicL::raw_value(_temperature[_qp]);
64 
65  const Real & old_thermal_strain = _thermal_strain_old[_qp];
66 
67  const Real & old_temp =
68  (_step_one ? MetaPhysicL::raw_value(_stress_free_temperature[_qp]) : _temperature_old[_qp]);
69  const Real delta_T = current_temp - old_temp;
70 
71  const Point p;
72  const Real alpha_current_temp = _thermal_expansion_function.value(current_temp, p);
73  const Real alpha_old_temp = _thermal_expansion_function.value(old_temp, p);
74 
75  thermal_strain = old_thermal_strain + delta_T * 0.5 * (alpha_current_temp + alpha_old_temp);
76  _thermal_strain[_qp] = thermal_strain;
77 }

◆ 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 ADComputeInstantaneousThermalExpansionFunctionEigenstrain< compute_stage >::initQpStatefulProperties ( )
overrideprotectedvirtual

Reimplemented from ADComputeEigenstrainBase< compute_stage >.

Definition at line 50 of file ADComputeInstantaneousThermalExpansionFunctionEigenstrain.C.

51 {
52  _thermal_strain[_qp] = 0;
53 }

◆ validParams()

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

Definition at line 22 of file ADComputeInstantaneousThermalExpansionFunctionEigenstrain.C.

23 {
25  params.addClassDescription("Computes eigenstrain due to thermal expansion using a function that "
26  "describes the instantaneous thermal expansion as a function of "
27  "temperature");
28  params.addRequiredParam<FunctionName>("thermal_expansion_function",
29  "Function describing the instantaneous thermal expansion "
30  "coefficient as a function of temperature");
31  return params;
32 }

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_one

template<ComputeStage compute_stage>
bool& ADComputeInstantaneousThermalExpansionFunctionEigenstrain< compute_stage >::_step_one
protected

Indicates whether we are on the first step, avoiding false positives when restarting.

Definition at line 47 of file ADComputeInstantaneousThermalExpansionFunctionEigenstrain.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.

◆ _temperature_old

template<ComputeStage compute_stage>
const VariableValue& ADComputeInstantaneousThermalExpansionFunctionEigenstrain< compute_stage >::_temperature_old
protected

◆ _thermal_expansion_function

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

◆ _thermal_strain_old

template<ComputeStage compute_stage>
const MaterialProperty<Real>& ADComputeInstantaneousThermalExpansionFunctionEigenstrain< compute_stage >::_thermal_strain_old
protected

◆ usingComputeEigenstrainBaseMembers

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

Definition at line 57 of file ADComputeThermalExpansionEigenstrainBase.h.

◆ usingComputeThermalExpansionEigenstrainBaseMembers

template<ComputeStage compute_stage>
ADComputeInstantaneousThermalExpansionFunctionEigenstrain< compute_stage >::usingComputeThermalExpansionEigenstrainBaseMembers
protected

◆ 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:
ADComputeThermalExpansionEigenstrainBase::_stress_free_temperature
const ADVariableValue & _stress_free_temperature
Definition: ADComputeThermalExpansionEigenstrainBase.h:55
ADComputeEigenstrainBase::_step_zero
bool & _step_zero
Restartable data to check for the zeroth and first time steps for thermal calculations.
Definition: ADComputeEigenstrainBase.h:69
ADComputeInstantaneousThermalExpansionFunctionEigenstrain::_thermal_strain_old
const MaterialProperty< Real > & _thermal_strain_old
Definition: ADComputeInstantaneousThermalExpansionFunctionEigenstrain.h:43
ADComputeThermalExpansionEigenstrainBase::computeThermalStrain
virtual void computeThermalStrain(ADReal &thermal_strain)=0
ADComputeThermalExpansionEigenstrainBase::validParams
static InputParameters validParams()
Definition: ADComputeThermalExpansionEigenstrainBase.C:17
ADComputeThermalExpansionEigenstrainBase::_temperature
const ADVariableValue & _temperature
Definition: ADComputeThermalExpansionEigenstrainBase.h:54
ADComputeEigenstrainBase::computeQpEigenstrain
virtual void computeQpEigenstrain()=0
Compute the eigenstrain and store in _eigenstrain.
ADComputeInstantaneousThermalExpansionFunctionEigenstrain::_temperature_old
const VariableValue & _temperature_old
Definition: ADComputeInstantaneousThermalExpansionFunctionEigenstrain.h:37
ADComputeInstantaneousThermalExpansionFunctionEigenstrain::_step_one
bool & _step_one
Indicates whether we are on the first step, avoiding false positives when restarting.
Definition: ADComputeInstantaneousThermalExpansionFunctionEigenstrain.h:47
ADComputeThermalExpansionEigenstrainBase
ADComputeThermalExpansionEigenstrainBase is a base class for all models that compute eigenstrains due...
Definition: ADComputeThermalExpansionEigenstrainBase.h:22
ADComputeInstantaneousThermalExpansionFunctionEigenstrain::_thermal_expansion_function
const Function & _thermal_expansion_function
Definition: ADComputeInstantaneousThermalExpansionFunctionEigenstrain.h:38