www.mooseframework.org
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ComputeSmallStrain Class Reference

ComputeSmallStrain defines a strain tensor, assuming small strains. More...

#include <ComputeSmallStrain.h>

Inheritance diagram for ComputeSmallStrain:
[legend]

Public Member Functions

 ComputeSmallStrain (const InputParameters &parameters)
 

Protected Member Functions

virtual void computeProperties () override
 
void initialSetup () override
 
virtual void initQpStatefulProperties () override
 
virtual void displacementIntegrityCheck ()
 

Protected Attributes

unsigned int _ndisp
 Coupled displacement variables. More...
 
std::vector< const VariableValue * > _disp
 
std::vector< const VariableGradient * > _grad_disp
 
std::string _base_name
 
MaterialProperty< RankTwoTensor > & _mechanical_strain
 
MaterialProperty< RankTwoTensor > & _total_strain
 
std::vector< MaterialPropertyName > _eigenstrain_names
 
std::vector< const MaterialProperty< RankTwoTensor > * > _eigenstrains
 
const MaterialProperty< RankTwoTensor > * _global_strain
 
bool _volumetric_locking_correction
 
const Real & _current_elem_volume
 

Detailed Description

ComputeSmallStrain defines a strain tensor, assuming small strains.

Definition at line 23 of file ComputeSmallStrain.h.

Constructor & Destructor Documentation

◆ ComputeSmallStrain()

ComputeSmallStrain::ComputeSmallStrain ( const InputParameters &  parameters)

Definition at line 25 of file ComputeSmallStrain.C.

26  : ComputeStrainBase(parameters)
27 {
28 }
ComputeStrainBase(const InputParameters &parameters)

Member Function Documentation

◆ computeProperties()

void ComputeSmallStrain::computeProperties ( )
overrideprotectedvirtual

Reimplemented in Compute2DSmallStrain, Compute1DSmallStrain, and ComputeRSphericalSmallStrain.

Definition at line 31 of file ComputeSmallStrain.C.

32 {
33  Real volumetric_strain = 0.0;
34  for (_qp = 0; _qp < _qrule->n_points(); ++_qp)
35  {
36  // strain = (grad_disp + grad_disp^T)/2
37  RankTwoTensor grad_tensor((*_grad_disp[0])[_qp], (*_grad_disp[1])[_qp], (*_grad_disp[2])[_qp]);
38 
39  _total_strain[_qp] = (grad_tensor + grad_tensor.transpose()) / 2.0;
40 
42  volumetric_strain += _total_strain[_qp].trace() * _JxW[_qp] * _coord[_qp];
43  }
44 
46  volumetric_strain /= _current_elem_volume;
47 
48  for (_qp = 0; _qp < _qrule->n_points(); ++_qp)
49  {
51  {
52  Real trace = _total_strain[_qp].trace();
53  _total_strain[_qp](0, 0) += (volumetric_strain - trace) / 3.0;
54  _total_strain[_qp](1, 1) += (volumetric_strain - trace) / 3.0;
55  _total_strain[_qp](2, 2) += (volumetric_strain - trace) / 3.0;
56  }
57 
58  if (_global_strain)
59  _total_strain[_qp] += (*_global_strain)[_qp];
60 
62 
63  // Remove the Eigen strain
64  for (auto es : _eigenstrains)
65  _mechanical_strain[_qp] -= (*es)[_qp];
66  }
67 }
const Real & _current_elem_volume
MaterialProperty< RankTwoTensor > & _mechanical_strain
const MaterialProperty< RankTwoTensor > * _global_strain
MaterialProperty< RankTwoTensor > & _total_strain
std::vector< const MaterialProperty< RankTwoTensor > * > _eigenstrains
std::vector< const VariableGradient * > _grad_disp

◆ displacementIntegrityCheck()

void ComputeStrainBase::displacementIntegrityCheck ( )
protectedvirtualinherited

Reimplemented in Compute2DFiniteStrain, Compute2DIncrementalStrain, and Compute2DSmallStrain.

Definition at line 86 of file ComputeStrainBase.C.

Referenced by ComputeStrainBase::initialSetup().

87 {
88  // Checking for consistency between mesh size and length of the provided displacements vector
89  if (_ndisp != _mesh.dimension())
90  paramError(
91  "displacements",
92  "The number of variables supplied in 'displacements' must match the mesh dimension.");
93 }
unsigned int _ndisp
Coupled displacement variables.

◆ initialSetup()

void ComputeStrainBase::initialSetup ( )
overrideprotectedinherited

Definition at line 67 of file ComputeStrainBase.C.

Referenced by ComputeIncrementalStrainBase::initialSetup(), and ComputeAxisymmetric1DSmallStrain::initialSetup().

68 {
70  // fetch coupled variables and gradients (as stateful properties if necessary)
71  for (unsigned int i = 0; i < _ndisp; ++i)
72  {
73  _disp[i] = &coupledValue("displacements", i);
74  _grad_disp[i] = &coupledGradient("displacements", i);
75  }
76 
77  // set unused dimensions to zero
78  for (unsigned i = _ndisp; i < 3; ++i)
79  {
80  _disp[i] = &_zero;
81  _grad_disp[i] = &_grad_zero;
82  }
83 }
virtual void displacementIntegrityCheck()
std::vector< const VariableValue * > _disp
unsigned int _ndisp
Coupled displacement variables.
std::vector< const VariableGradient * > _grad_disp

◆ initQpStatefulProperties()

void ComputeStrainBase::initQpStatefulProperties ( )
overrideprotectedvirtualinherited

Reimplemented in ComputeCosseratIncrementalSmallStrain, and ComputeIncrementalStrainBase.

Definition at line 96 of file ComputeStrainBase.C.

97 {
98  _mechanical_strain[_qp].zero();
99  _total_strain[_qp].zero();
100 }
MaterialProperty< RankTwoTensor > & _mechanical_strain
MaterialProperty< RankTwoTensor > & _total_strain

Member Data Documentation

◆ _base_name

std::string ComputeStrainBase::_base_name
protectedinherited

Definition at line 43 of file ComputeStrainBase.h.

Referenced by ComputeStrainBase::ComputeStrainBase().

◆ _current_elem_volume

const Real& ComputeStrainBase::_current_elem_volume
protectedinherited

◆ _disp

std::vector<const VariableValue *> ComputeStrainBase::_disp
protectedinherited

◆ _eigenstrain_names

std::vector<MaterialPropertyName> ComputeStrainBase::_eigenstrain_names
protectedinherited

◆ _eigenstrains

std::vector<const MaterialProperty<RankTwoTensor> *> ComputeStrainBase::_eigenstrains
protectedinherited

◆ _global_strain

const MaterialProperty<RankTwoTensor>* ComputeStrainBase::_global_strain
protectedinherited

Definition at line 52 of file ComputeStrainBase.h.

Referenced by computeProperties(), and ComputeFiniteStrain::computeQpStrain().

◆ _grad_disp

std::vector<const VariableGradient *> ComputeStrainBase::_grad_disp
protectedinherited

◆ _mechanical_strain

MaterialProperty<RankTwoTensor>& ComputeStrainBase::_mechanical_strain
protectedinherited

◆ _ndisp

unsigned int ComputeStrainBase::_ndisp
protectedinherited

◆ _total_strain

MaterialProperty<RankTwoTensor>& ComputeStrainBase::_total_strain
protectedinherited

◆ _volumetric_locking_correction

bool ComputeStrainBase::_volumetric_locking_correction
protectedinherited

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