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

ADCompute2DIncrementalStrain defines a strain increment only for incremental strains in 2D geometries, handling the out of plane strains. More...

#include <ADCompute2DIncrementalStrain.h>

Inheritance diagram for ADCompute2DIncrementalStrain< compute_stage >:
[legend]

Public Member Functions

 ADCompute2DIncrementalStrain (const InputParameters &parameters)
 
void initialSetup () override
 
virtual void computeProperties () override
 

Protected Member Functions

virtual void displacementIntegrityCheck () override
 
virtual void computeTotalStrainIncrement (ADRankTwoTensor &total_strain_increment) override
 Computes the current and old deformation gradients with the assumptions for 2D geometries, including plane strain, generalized plane strain, and axisymmetric, and returns the total strain increment tensor. More...
 
virtual ADReal computeOutOfPlaneGradDisp ()=0
 Computes the current out-of-plane component of the displacement gradient; as a virtual function, this function is overwritten for the specific geometries defined by inheriting classes. More...
 
virtual Real computeOutOfPlaneGradDispOld ()=0
 Computes the old out-of-plane component of the displacement gradient; as a virtual function, this function is overwritten for the specific geometries defined by inheriting classes. More...
 
virtual void initQpStatefulProperties () override
 
void subtractEigenstrainIncrementFromStrain (ADRankTwoTensor &strain)
 
 ADMaterialProperty (RankTwoTensor) &_strain_rate
 
 ADMaterialProperty (RankTwoTensor) &_strain_increment
 
 ADMaterialProperty (RankTwoTensor) &_rotation_increment
 
const ADMaterialProperty (RankTwoTensor) *_global_strain
 

Protected Attributes

const unsigned int _out_of_plane_direction
 
 usingComputeIncrementalSmallStrainMembers
 
 usingComputeIncrementalStrainBaseMembers
 
std::vector< const VariableGradient * > _grad_disp_old
 
const MaterialProperty< RankTwoTensor > & _mechanical_strain_old
 
const MaterialProperty< RankTwoTensor > & _total_strain_old
 
std::vector< const MaterialProperty< RankTwoTensor > * > _eigenstrains_old
 
 usingComputeStrainBaseMembers
 
const unsigned int _ndisp
 Coupled displacement variables. More...
 
std::vector< const ADVariableValue * > _disp
 
std::vector< const ADVariableGradient * > _grad_disp
 
std::string _base_name
 
std::vector< MaterialPropertyName > _eigenstrain_names
 
std::vector< const ADMaterialProperty(RankTwoTensor) * > _eigenstrains
 
const bool _volumetric_locking_correction
 
const Real & _current_elem_volume
 
 usingMaterialMembers
 

Detailed Description

template<ComputeStage compute_stage>
class ADCompute2DIncrementalStrain< compute_stage >

ADCompute2DIncrementalStrain defines a strain increment only for incremental strains in 2D geometries, handling the out of plane strains.

ADCompute2DIncrementalStrain contains a virtual method to define the out-of-plane strain as a general nonzero value in the inherited classes ComputePlaneIncrementalStrain and ComputeAxisymmetricRZIncrementalStrain.

Definition at line 21 of file ADCompute2DIncrementalStrain.h.

Constructor & Destructor Documentation

◆ ADCompute2DIncrementalStrain()

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

Definition at line 26 of file ADCompute2DIncrementalStrain.C.

29  _out_of_plane_direction(adGetParam<MooseEnum>("out_of_plane_direction"))
30 {
31 }
ADComputeIncrementalSmallStrain defines a strain increment and rotation increment (=1)...

Member Function Documentation

◆ ADMaterialProperty() [1/4]

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

◆ ADMaterialProperty() [2/4]

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

◆ ADMaterialProperty() [3/4]

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

◆ ADMaterialProperty() [4/4]

template<ComputeStage compute_stage>
const ADComputeStrainBase< compute_stage >::ADMaterialProperty ( RankTwoTensor  )
protectedinherited

◆ computeOutOfPlaneGradDisp()

template<ComputeStage compute_stage>
virtual ADReal ADCompute2DIncrementalStrain< compute_stage >::computeOutOfPlaneGradDisp ( )
protectedpure virtual

Computes the current out-of-plane component of the displacement gradient; as a virtual function, this function is overwritten for the specific geometries defined by inheriting classes.

Implemented in ADComputeAxisymmetricRZIncrementalStrain< compute_stage >.

◆ computeOutOfPlaneGradDispOld()

template<ComputeStage compute_stage>
virtual Real ADCompute2DIncrementalStrain< compute_stage >::computeOutOfPlaneGradDispOld ( )
protectedpure virtual

Computes the old out-of-plane component of the displacement gradient; as a virtual function, this function is overwritten for the specific geometries defined by inheriting classes.

Implemented in ADComputeAxisymmetricRZIncrementalStrain< compute_stage >.

◆ computeProperties()

template<ComputeStage compute_stage>
void ADComputeIncrementalSmallStrain< compute_stage >::computeProperties ( )
overridevirtualinherited

Definition at line 29 of file ADComputeIncrementalSmallStrain.C.

30 {
31  ADReal volumetric_strain = 0.0;
32  for (_qp = 0; _qp < _qrule->n_points(); ++_qp)
33  {
34  ADRankTwoTensor total_strain_increment;
35  computeTotalStrainIncrement(total_strain_increment);
36 
37  _strain_increment[_qp] = total_strain_increment;
38 
40  volumetric_strain += total_strain_increment.trace() * _JxW[_qp] * _coord[_qp];
41  }
42 
44  volumetric_strain /= _current_elem_volume;
45 
46  for (_qp = 0; _qp < _qrule->n_points(); ++_qp)
47  {
49  {
50  const auto correction = (volumetric_strain - _strain_increment[_qp].trace()) / 3.0;
51  _strain_increment[_qp](0, 0) += correction;
52  _strain_increment[_qp](1, 1) += correction;
53  _strain_increment[_qp](2, 2) += correction;
54  }
55 
56  _total_strain[_qp] = _strain_increment[_qp] + _total_strain_old[_qp];
57 
58  // Remove the Eigen strain increment
59  subtractEigenstrainIncrementFromStrain(_strain_increment[_qp]);
60 
61  // strain rate
62  if (_dt > 0)
63  _strain_rate[_qp] = _strain_increment[_qp] / _dt;
64  else
65  _strain_rate[_qp].zero();
66 
67  // Update strain in intermediate configuration: rotations are not needed
68  _mechanical_strain[_qp] = _strain_increment[_qp] + _mechanical_strain_old[_qp];
69 
70  // incremental small strain does not include rotation
71  _rotation_increment[_qp].setToIdentity();
72  }
73 
74  copyDualNumbersToValues();
75 }
const bool _volumetric_locking_correction
virtual void computeTotalStrainIncrement(ADRankTwoTensor &total_strain_increment)
Computes the current and old deformation gradients and passes back the total strain increment tensor...
void subtractEigenstrainIncrementFromStrain(ADRankTwoTensor &strain)
const Real & _current_elem_volume
const MaterialProperty< RankTwoTensor > & _mechanical_strain_old
const MaterialProperty< RankTwoTensor > & _total_strain_old

◆ computeTotalStrainIncrement()

template<ComputeStage compute_stage>
void ADCompute2DIncrementalStrain< compute_stage >::computeTotalStrainIncrement ( ADRankTwoTensor &  total_strain_increment)
overrideprotectedvirtual

Computes the current and old deformation gradients with the assumptions for 2D geometries, including plane strain, generalized plane strain, and axisymmetric, and returns the total strain increment tensor.

Reimplemented from ADComputeIncrementalSmallStrain< compute_stage >.

Definition at line 59 of file ADCompute2DIncrementalStrain.C.

61 {
62  // Deformation gradient calculation for 2D problems
63  ADRankTwoTensor A(
64  (*_grad_disp[0])[_qp], (*_grad_disp[1])[_qp], (*_grad_disp[2])[_qp]); // Deformation gradient
65  RankTwoTensor Fbar((*_grad_disp_old[0])[_qp],
66  (*_grad_disp_old[1])[_qp],
67  (*_grad_disp_old[2])[_qp]); // Old Deformation gradient
68 
69  // Compute the displacement gradient of the out of plane direction for plane strain,
70  // generalized plane strain, or axisymmetric problems
73 
74  A -= Fbar; // very nearly A = gradU - gradUold
75 
76  total_strain_increment = 0.5 * (A + A.transpose());
77 }
virtual Real computeOutOfPlaneGradDispOld()=0
Computes the old out-of-plane component of the displacement gradient; as a virtual function...
std::vector< const ADVariableGradient * > _grad_disp
virtual ADReal computeOutOfPlaneGradDisp()=0
Computes the current out-of-plane component of the displacement gradient; as a virtual function...
std::vector< const VariableGradient * > _grad_disp_old

◆ displacementIntegrityCheck()

template<ComputeStage compute_stage>
void ADCompute2DIncrementalStrain< compute_stage >::displacementIntegrityCheck ( )
overrideprotectedvirtual

Reimplemented from ADComputeStrainBase< compute_stage >.

Definition at line 81 of file ADCompute2DIncrementalStrain.C.

82 {
83  if (_out_of_plane_direction != 2 && _ndisp != 3)
84  mooseError("For 2D simulations where the out-of-plane direction is x or y the number of "
85  "supplied displacements must be three.");
86  else if (_out_of_plane_direction == 2 && _ndisp != 2)
87  mooseError("For 2D simulations where the out-of-plane direction is z the number of supplied "
88  "displacements must be two.");
89 }
const unsigned int _ndisp
Coupled displacement variables.

◆ initialSetup()

template<ComputeStage compute_stage>
void ADCompute2DIncrementalStrain< compute_stage >::initialSetup ( )
override

Definition at line 35 of file ADCompute2DIncrementalStrain.C.

36 {
37  for (unsigned int i = 0; i < 3; ++i)
38  {
39  if (_out_of_plane_direction == i)
40  {
41  _disp[i] = &adZeroValue();
42  _grad_disp[i] = &adZeroGradient();
43  }
44  else
45  {
46  _disp[i] = &adCoupledValue("displacements", i);
47  _grad_disp[i] = &adCoupledGradient("displacements", i);
48  }
49 
50  if (_fe_problem.isTransient() && i != _out_of_plane_direction)
51  _grad_disp_old[i] = &coupledGradientOld("displacements", i);
52  else
53  _grad_disp_old[i] = &_grad_zero;
54  }
55 }
std::vector< const ADVariableValue * > _disp
std::vector< const ADVariableGradient * > _grad_disp
std::vector< const VariableGradient * > _grad_disp_old

◆ initQpStatefulProperties()

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

Reimplemented from ADComputeStrainBase< compute_stage >.

Definition at line 48 of file ADComputeIncrementalStrainBase.C.

49 {
50  _mechanical_strain[_qp].zero();
51  _total_strain[_qp].zero();
52 }

◆ subtractEigenstrainIncrementFromStrain()

template<ComputeStage compute_stage>
void ADComputeIncrementalStrainBase< compute_stage >::subtractEigenstrainIncrementFromStrain ( ADRankTwoTensor &  strain)
protectedinherited

Definition at line 56 of file ADComputeIncrementalStrainBase.C.

58 {
59  for (unsigned int i = 0; i < _eigenstrains.size(); ++i)
60  {
61  strain -= (*_eigenstrains[i])[_qp];
62  strain += (*_eigenstrains_old[i])[_qp];
63  }
64 }
std::vector< const ADMaterialProperty(RankTwoTensor) * > _eigenstrains
std::vector< const MaterialProperty< RankTwoTensor > * > _eigenstrains_old

Member Data Documentation

◆ _base_name

template<ComputeStage compute_stage>
std::string ADComputeStrainBase< compute_stage >::_base_name
protectedinherited

◆ _current_elem_volume

template<ComputeStage compute_stage>
const Real& ADComputeStrainBase< compute_stage >::_current_elem_volume
protectedinherited

Definition at line 69 of file ADComputeStrainBase.h.

◆ _disp

template<ComputeStage compute_stage>
std::vector<const ADVariableValue *> ADComputeStrainBase< compute_stage >::_disp
protectedinherited

Definition at line 55 of file ADComputeStrainBase.h.

◆ _eigenstrain_names

template<ComputeStage compute_stage>
std::vector<MaterialPropertyName> ADComputeStrainBase< compute_stage >::_eigenstrain_names
protectedinherited

◆ _eigenstrains

template<ComputeStage compute_stage>
std::vector<const ADMaterialProperty(RankTwoTensor) *> ADComputeStrainBase< compute_stage >::_eigenstrains
protectedinherited

◆ _eigenstrains_old

template<ComputeStage compute_stage>
std::vector<const MaterialProperty<RankTwoTensor> *> ADComputeIncrementalStrainBase< compute_stage >::_eigenstrains_old
protectedinherited

◆ _grad_disp

template<ComputeStage compute_stage>
std::vector<const ADVariableGradient *> ADComputeStrainBase< compute_stage >::_grad_disp
protectedinherited

Definition at line 56 of file ADComputeStrainBase.h.

◆ _grad_disp_old

template<ComputeStage compute_stage>
std::vector<const VariableGradient *> ADComputeIncrementalStrainBase< compute_stage >::_grad_disp_old
protectedinherited

Definition at line 47 of file ADComputeIncrementalStrainBase.h.

◆ _mechanical_strain_old

template<ComputeStage compute_stage>
const MaterialProperty<RankTwoTensor>& ADComputeIncrementalStrainBase< compute_stage >::_mechanical_strain_old
protectedinherited

Definition at line 53 of file ADComputeIncrementalStrainBase.h.

◆ _ndisp

template<ComputeStage compute_stage>
const unsigned int ADComputeStrainBase< compute_stage >::_ndisp
protectedinherited

Coupled displacement variables.

Definition at line 54 of file ADComputeStrainBase.h.

Referenced by ADComputeStrainBase< compute_stage >::ADComputeStrainBase().

◆ _out_of_plane_direction

template<ComputeStage compute_stage>
const unsigned int ADCompute2DIncrementalStrain< compute_stage >::_out_of_plane_direction
protected

Definition at line 62 of file ADCompute2DIncrementalStrain.h.

◆ _total_strain_old

template<ComputeStage compute_stage>
const MaterialProperty<RankTwoTensor>& ADComputeIncrementalStrainBase< compute_stage >::_total_strain_old
protectedinherited

Definition at line 54 of file ADComputeIncrementalStrainBase.h.

◆ _volumetric_locking_correction

template<ComputeStage compute_stage>
const bool ADComputeStrainBase< compute_stage >::_volumetric_locking_correction
protectedinherited

◆ usingComputeIncrementalSmallStrainMembers

template<ComputeStage compute_stage>
ADCompute2DIncrementalStrain< compute_stage >::usingComputeIncrementalSmallStrainMembers
protected

Definition at line 64 of file ADCompute2DIncrementalStrain.h.

◆ usingComputeIncrementalStrainBaseMembers

template<ComputeStage compute_stage>
ADComputeIncrementalSmallStrain< compute_stage >::usingComputeIncrementalStrainBaseMembers
protectedinherited

Definition at line 42 of file ADComputeIncrementalSmallStrain.h.

◆ usingComputeStrainBaseMembers

template<ComputeStage compute_stage>
ADComputeIncrementalStrainBase< compute_stage >::usingComputeStrainBaseMembers
protectedinherited

Definition at line 58 of file ADComputeIncrementalStrainBase.h.

◆ usingMaterialMembers

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

Definition at line 71 of file ADComputeStrainBase.h.


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