www.mooseframework.org
Public Member Functions | Static 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)
 

Static Public Member Functions

static InputParameters validParams ()
 

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

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

ADComputeEigenstrainBase is the base class for eigenstrain tensors.

Definition at line 21 of file ADComputeEigenstrainBase.h.

Constructor & Destructor Documentation

◆ ADComputeEigenstrainBase()

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

Definition at line 38 of file ADComputeEigenstrainBase.C.

40  : ADMaterial<compute_stage>(parameters),
41  _base_name(isParamValid("base_name") ? getParam<std::string>("base_name") + "_" : ""),
42  _eigenstrain_name(_base_name + getParam<std::string>("eigenstrain_name")),
43  _eigenstrain(declareADProperty<RankTwoTensor>(_eigenstrain_name)),
44  _step_zero(declareRestartableData<bool>("step_zero", true))
45 {
46 }

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 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 }

◆ 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 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 ( )
overrideprotectedvirtual

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 }

◆ validParams()

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

Definition at line 18 of file ADComputeEigenstrainBase.C.

19 {
20  InputParameters params = ADMaterial<compute_stage>::validParams();
21  params.addParam<std::string>("base_name",
22  "Optional parameter that allows the user to define "
23  "multiple mechanics material systems on the same "
24  "block, i.e. for multiple phases");
25  params.addRequiredParam<std::string>("eigenstrain_name",
26  "Material property name for the eigenstrain tensor computed "
27  "by this model. IMPORTANT: The name of this property must "
28  "also be provided to the strain calculator.");
29  params.addDeprecatedParam<bool>(
30  "incremental_form",
31  false,
32  "Should the eigenstrain be in incremental form (for incremental models)?",
33  "This parameter no longer has any effect. Simply remove it.");
34  return params;
35 }

Referenced by ADComputeEigenstrain< compute_stage >::validParams(), and ADComputeThermalExpansionEigenstrainBase< compute_stage >::validParams().

Member Data Documentation

◆ _base_name

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

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
protected

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
protected

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

Definition at line 69 of file ADComputeEigenstrainBase.h.

◆ usingMaterialMembers

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

Definition at line 71 of file ADComputeEigenstrainBase.h.


The documentation for this class was generated from the following files:
ADComputeEigenstrainBase::_step_zero
bool & _step_zero
Restartable data to check for the zeroth and first time steps for thermal calculations.
Definition: ADComputeEigenstrainBase.h:69
ADComputeEigenstrainBase::_eigenstrain_name
std::string _eigenstrain_name
Material property name for the eigenstrain tensor.
Definition: ADComputeEigenstrainBase.h:53
ADComputeEigenstrainBase::computeQpEigenstrain
virtual void computeQpEigenstrain()=0
Compute the eigenstrain and store in _eigenstrain.
validParams
InputParameters validParams()
ADComputeEigenstrainBase::_base_name
const std::string _base_name
Base name prepended to material property name.
Definition: ADComputeEigenstrainBase.h:50