www.mooseframework.org
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ADComputeEigenstrainBase< compute_stage > Class Template Referenceabstract

ADComputeEigenstrainBase is the base class for eigenstrain tensors. More...

#include <ADComputeEigenstrainBase.h>

Inheritance diagram for ADComputeEigenstrainBase< compute_stage >:
[legend]

Public Member Functions

 ADComputeEigenstrainBase (const InputParameters &parameters)
 

Protected Member Functions

virtual void initQpStatefulProperties () override
 
virtual void computeQpProperties () override
 
virtual void computeQpEigenstrain ()=0
 Compute the eigenstrain and store in _eigenstrain. More...
 
 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

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 ADComputeEigenstrainBase< compute_stage >

ADComputeEigenstrainBase is the base class for eigenstrain tensors.

Definition at line 22 of file ADComputeEigenstrainBase.h.

Constructor & Destructor Documentation

◆ ADComputeEigenstrainBase()

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

Definition at line 33 of file ADComputeEigenstrainBase.C.

35  : ADMaterial<compute_stage>(parameters),
36  _base_name(isParamValid("base_name") ? adGetParam<std::string>("base_name") + "_" : ""),
37  _eigenstrain_name(_base_name + adGetParam<std::string>("eigenstrain_name")),
38  _eigenstrain(adDeclareADProperty<RankTwoTensor>(_eigenstrain_name)),
39  _step_zero(adDeclareRestartableData<bool>("step_zero", true))
40 {
41 }
std::string _eigenstrain_name
Material property name for the eigenstrain tensor.
std::string _base_name
Base name prepended to material property name.
bool & _step_zero
Restartable data to check for the zeroth and first time steps for thermal calculations.

Member Function Documentation

◆ ADMaterialProperty()

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

Stores the current total eigenstrain.

◆ computeQpEigenstrain()

template<ComputeStage compute_stage>
virtual void ADComputeEigenstrainBase< compute_stage >::computeQpEigenstrain ( )
protectedpure virtual

Compute the eigenstrain and store in _eigenstrain.

Implemented in ADComputeThermalExpansionEigenstrainBase< compute_stage >, and ADComputeEigenstrain< compute_stage >.

◆ computeQpProperties()

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

Definition at line 54 of file ADComputeEigenstrainBase.C.

55 {
56  if (_t_step >= 1)
57  _step_zero = false;
58 
59  // Skip the eigenstrain calculation in step zero because no solution is computed during
60  // the zeroth step, hence computing the eigenstrain in the zeroth step would result in
61  // an incorrect calculation of mechanical_strain, which is stateful.
62  if (!_step_zero)
64 }
virtual void computeQpEigenstrain()=0
Compute the eigenstrain and store in _eigenstrain.
bool & _step_zero
Restartable data to check for the zeroth and first time steps for thermal calculations.

◆ computeVolumetricStrainComponent()

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

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 68 of file ADComputeEigenstrainBase.C.

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

◆ initQpStatefulProperties()

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

Definition at line 45 of file ADComputeEigenstrainBase.C.

46 {
47  // This property can be promoted to be stateful by other models that use it,
48  // so it needs to be initalized.
49  _eigenstrain[_qp].zero();
50 }

Member Data Documentation

◆ _base_name

template<ComputeStage compute_stage>
std::string ADComputeEigenstrainBase< compute_stage >::_base_name
protected

Base name prepended to material property name.

Definition at line 49 of file ADComputeEigenstrainBase.h.

◆ _eigenstrain_name

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

Material property name for the eigenstrain tensor.

Definition at line 52 of file ADComputeEigenstrainBase.h.

◆ _step_zero

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

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

Definition at line 68 of file ADComputeEigenstrainBase.h.

◆ usingMaterialMembers

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

Definition at line 70 of file ADComputeEigenstrainBase.h.


The documentation for this class was generated from the following files: