www.mooseframework.org
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ComputeEigenstrainBase Class Referenceabstract

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

#include <ComputeEigenstrainBase.h>

Inheritance diagram for ComputeEigenstrainBase:
[legend]

Public Member Functions

 ComputeEigenstrainBase (const InputParameters &parameters)
 

Static Public Member Functions

static InputParameters validParams ()
 

Protected Member Functions

virtual void initQpStatefulProperties ()
 
virtual void computeQpProperties ()
 
virtual void computeQpEigenstrain ()=0
 Compute the eigenstrain and store in _eigenstrain. More...
 
Real computeVolumetricStrainComponent (const Real 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...
 
MaterialProperty< RankTwoTensor > & _eigenstrain
 Stores the current total eigenstrain. More...
 
bool & _step_zero
 Restartable data to check for the zeroth and first time steps for thermal calculations. More...
 

Detailed Description

ComputeEigenstrainBase is the base class for eigenstrain tensors.

Definition at line 26 of file ComputeEigenstrainBase.h.

Constructor & Destructor Documentation

◆ ComputeEigenstrainBase()

ComputeEigenstrainBase::ComputeEigenstrainBase ( const InputParameters &  parameters)

Definition at line 31 of file ComputeEigenstrainBase.C.

32  : Material(parameters),
33  _base_name(isParamValid("base_name") ? getParam<std::string>("base_name") + "_" : ""),
34  _eigenstrain_name(_base_name + getParam<std::string>("eigenstrain_name")),
35  _eigenstrain(declareProperty<RankTwoTensor>(_eigenstrain_name)),
36  _step_zero(declareRestartableData<bool>("step_zero", true))
37 {
38 }

Member Function Documentation

◆ computeQpEigenstrain()

virtual void ComputeEigenstrainBase::computeQpEigenstrain ( )
protectedpure virtual

Compute the eigenstrain and store in _eigenstrain.

Implemented in ComputeEigenstrainFromInitialStress, ComputeReducedOrderEigenstrain, ComputeVariableBaseEigenStrain, and ComputeEigenstrain.

Referenced by computeQpProperties().

◆ computeQpProperties()

void ComputeEigenstrainBase::computeQpProperties ( )
protectedvirtual

Definition at line 49 of file ComputeEigenstrainBase.C.

50 {
51  if (_t_step >= 1)
52  _step_zero = false;
53 
54  // Skip the eigenstrain calculation in step zero because no solution is computed during
55  // the zeroth step, hence computing the eigenstrain in the zeroth step would result in
56  // an incorrect calculation of mechanical_strain, which is stateful.
57  if (!_step_zero)
59 }

◆ computeVolumetricStrainComponent()

Real ComputeEigenstrainBase::computeVolumetricStrainComponent ( const Real  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 62 of file ComputeEigenstrainBase.C.

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

◆ initQpStatefulProperties()

void ComputeEigenstrainBase::initQpStatefulProperties ( )
protectedvirtual

Reimplemented in ComputeReducedOrderEigenstrain.

Definition at line 41 of file ComputeEigenstrainBase.C.

42 {
43  // This property can be promoted to be stateful by other models that use it,
44  // so it needs to be initalized.
45  _eigenstrain[_qp].zero();
46 }

◆ validParams()

InputParameters ComputeEigenstrainBase::validParams ( )
static

Definition at line 17 of file ComputeEigenstrainBase.C.

18 {
19  InputParameters params = Material::validParams();
20  params.addParam<std::string>("base_name",
21  "Optional parameter that allows the user to define "
22  "multiple mechanics material systems on the same "
23  "block, i.e. for multiple phases");
24  params.addRequiredParam<std::string>("eigenstrain_name",
25  "Material property name for the eigenstrain tensor computed "
26  "by this model. IMPORTANT: The name of this property must "
27  "also be provided to the strain calculator.");
28  return params;
29 }

Referenced by ComputeEigenstrain::validParams(), ComputeEigenstrainFromInitialStress::validParams(), ComputeVolumetricEigenstrain::validParams(), ComputeVariableBaseEigenStrain::validParams(), ComputeReducedOrderEigenstrain::validParams(), and ComputeThermalExpansionEigenstrainBase::validParams().

Member Data Documentation

◆ _base_name

const std::string ComputeEigenstrainBase::_base_name
protected

Base name prepended to material property name.

Definition at line 41 of file ComputeEigenstrainBase.h.

Referenced by ComputeReducedOrderEigenstrain::ComputeReducedOrderEigenstrain().

◆ _eigenstrain

MaterialProperty<RankTwoTensor>& ComputeEigenstrainBase::_eigenstrain
protected

◆ _eigenstrain_name

std::string ComputeEigenstrainBase::_eigenstrain_name
protected

Material property name for the eigenstrain tensor.

Definition at line 44 of file ComputeEigenstrainBase.h.

◆ _step_zero

bool& ComputeEigenstrainBase::_step_zero
protected

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

Definition at line 60 of file ComputeEigenstrainBase.h.

Referenced by computeQpProperties().


The documentation for this class was generated from the following files:
ComputeEigenstrainBase::_base_name
const std::string _base_name
Base name prepended to material property name.
Definition: ComputeEigenstrainBase.h:41
ComputeEigenstrainBase::_step_zero
bool & _step_zero
Restartable data to check for the zeroth and first time steps for thermal calculations.
Definition: ComputeEigenstrainBase.h:60
ComputeEigenstrainBase::computeQpEigenstrain
virtual void computeQpEigenstrain()=0
Compute the eigenstrain and store in _eigenstrain.
validParams
InputParameters validParams()
ComputeEigenstrainBase::_eigenstrain_name
std::string _eigenstrain_name
Material property name for the eigenstrain tensor.
Definition: ComputeEigenstrainBase.h:44
ComputeEigenstrainBase::_eigenstrain
MaterialProperty< RankTwoTensor > & _eigenstrain
Stores the current total eigenstrain.
Definition: ComputeEigenstrainBase.h:47