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

ComputePlaneSmallStrain defines small strains under generalized plane strain and plane stress assumptions, where the out of plane strain can be uniformly or non-uniformly zero or nonzero. More...

#include <ComputePlaneSmallStrain.h>

Inheritance diagram for ComputePlaneSmallStrain:
[legend]

Public Member Functions

 ComputePlaneSmallStrain (const InputParameters &parameters)
 

Protected Member Functions

virtual Real computeOutOfPlaneStrain ()
 
unsigned int getCurrentSubblockIndex () const
 gets its subblock index for current element More...
 
void initialSetup () override
 
virtual void computeProperties () override
 
virtual void displacementIntegrityCheck () override
 
virtual void initQpStatefulProperties () override
 

Protected Attributes

const SubblockIndexProvider_subblock_id_provider
 
const unsigned int _out_of_plane_direction
 
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
 

Private Attributes

const bool _scalar_out_of_plane_strain_coupled
 
const bool _out_of_plane_strain_coupled
 
const VariableValue & _out_of_plane_strain
 
unsigned int _nscalar_strains
 
std::vector< const VariableValue * > _scalar_out_of_plane_strain
 

Detailed Description

ComputePlaneSmallStrain defines small strains under generalized plane strain and plane stress assumptions, where the out of plane strain can be uniformly or non-uniformly zero or nonzero.

Definition at line 26 of file ComputePlaneSmallStrain.h.

Constructor & Destructor Documentation

◆ ComputePlaneSmallStrain()

ComputePlaneSmallStrain::ComputePlaneSmallStrain ( const InputParameters &  parameters)

Definition at line 30 of file ComputePlaneSmallStrain.C.

31  : Compute2DSmallStrain(parameters),
32  _subblock_id_provider(isParamValid("subblock_index_provider")
33  ? &getUserObject<SubblockIndexProvider>("subblock_index_provider")
34  : nullptr),
35  _scalar_out_of_plane_strain_coupled(isParamValid("scalar_out_of_plane_strain")),
36  _out_of_plane_strain_coupled(isCoupled("out_of_plane_strain")),
37  _out_of_plane_strain(_out_of_plane_strain_coupled ? coupledValue("out_of_plane_strain")
38  : _zero),
39  _nscalar_strains(coupledScalarComponents("scalar_out_of_plane_strain"))
40 {
42  mooseError("Must define only one of out_of_plane_strain or scalar_out_of_plane_strain");
43 
45  {
47  for (unsigned int i = 0; i < _nscalar_strains; ++i)
48  _scalar_out_of_plane_strain[i] = &coupledScalarValue("scalar_out_of_plane_strain", i);
49  }
50 }
const SubblockIndexProvider * _subblock_id_provider
const VariableValue & _out_of_plane_strain
std::vector< const VariableValue * > _scalar_out_of_plane_strain
Compute2DSmallStrain(const InputParameters &parameters)

Member Function Documentation

◆ computeOutOfPlaneStrain()

Real ComputePlaneSmallStrain::computeOutOfPlaneStrain ( )
protectedvirtual

Implements Compute2DSmallStrain.

Definition at line 53 of file ComputePlaneSmallStrain.C.

54 {
57  else
58  return _out_of_plane_strain[_qp];
59 }
unsigned int getCurrentSubblockIndex() const
gets its subblock index for current element
const VariableValue & _out_of_plane_strain
std::vector< const VariableValue * > _scalar_out_of_plane_strain

◆ computeProperties()

void Compute2DSmallStrain::computeProperties ( )
overrideprotectedvirtualinherited

Reimplemented from ComputeSmallStrain.

Definition at line 53 of file Compute2DSmallStrain.C.

54 {
55  Real volumetric_strain = 0.0;
56  for (_qp = 0; _qp < _qrule->n_points(); ++_qp)
57  {
59  {
60  case 0: // x
61  {
63  _total_strain[_qp](1, 1) = (*_grad_disp[1])[_qp](1);
64  _total_strain[_qp](1, 2) = ((*_grad_disp[1])[_qp](2) + (*_grad_disp[2])[_qp](1)) / 2.0;
65  _total_strain[_qp](2, 1) = _total_strain[_qp](1, 2); // force the symmetrical strain tensor
66  _total_strain[_qp](2, 2) = (*_grad_disp[2])[_qp](2);
67  break;
68  }
69  case 1: // y
70  {
71  _total_strain[_qp](0, 0) = (*_grad_disp[0])[_qp](0);
72  _total_strain[_qp](0, 2) = ((*_grad_disp[0])[_qp](2) + (*_grad_disp[2])[_qp](0)) / 2.0;
74  _total_strain[_qp](2, 0) = _total_strain[_qp](0, 2); // force the symmetrical strain tensor
75  _total_strain[_qp](2, 2) = (*_grad_disp[2])[_qp](2);
76  break;
77  }
78  default: // z
79  {
80  _total_strain[_qp](0, 0) = (*_grad_disp[0])[_qp](0);
81  _total_strain[_qp](1, 1) = (*_grad_disp[1])[_qp](1);
82  _total_strain[_qp](0, 1) = ((*_grad_disp[0])[_qp](1) + (*_grad_disp[1])[_qp](0)) / 2.0;
83  _total_strain[_qp](1, 0) = _total_strain[_qp](0, 1); // force the symmetrical strain tensor
85  break;
86  }
87  }
88 
90  volumetric_strain += _total_strain[_qp].trace() * _JxW[_qp] * _coord[_qp];
91  }
92 
94  volumetric_strain /= _current_elem_volume;
95 
96  for (_qp = 0; _qp < _qrule->n_points(); ++_qp)
97  {
99  {
100  Real trace = _total_strain[_qp].trace();
101  _total_strain[_qp](0, 0) += (volumetric_strain - trace) / 3.0;
102  _total_strain[_qp](1, 1) += (volumetric_strain - trace) / 3.0;
103  _total_strain[_qp](2, 2) += (volumetric_strain - trace) / 3.0;
104  }
105 
106  _mechanical_strain[_qp] = _total_strain[_qp];
107 
108  // Remove the eigenstrains
109  for (auto es : _eigenstrains)
110  _mechanical_strain[_qp] -= (*es)[_qp];
111  }
112 }
const Real & _current_elem_volume
const unsigned int _out_of_plane_direction
virtual Real computeOutOfPlaneStrain()=0
MaterialProperty< RankTwoTensor > & _mechanical_strain
MaterialProperty< RankTwoTensor > & _total_strain
std::vector< const MaterialProperty< RankTwoTensor > * > _eigenstrains
std::vector< const VariableGradient * > _grad_disp

◆ displacementIntegrityCheck()

void Compute2DSmallStrain::displacementIntegrityCheck ( )
overrideprotectedvirtualinherited

Reimplemented from ComputeStrainBase.

Definition at line 115 of file Compute2DSmallStrain.C.

Referenced by Compute2DSmallStrain::initialSetup().

116 {
117  if (_out_of_plane_direction != 2 && _ndisp != 3)
118  mooseError("For 2D simulations where the out-of-plane direction is x or y the number of "
119  "supplied displacements must be three.");
120  else if (_out_of_plane_direction == 2 && _ndisp != 2)
121  mooseError("For 2D simulations where the out-of-plane direction is z the number of supplied "
122  "displacements must be two.");
123 }
const unsigned int _out_of_plane_direction
unsigned int _ndisp
Coupled displacement variables.

◆ getCurrentSubblockIndex()

unsigned int ComputePlaneSmallStrain::getCurrentSubblockIndex ( ) const
inlineprotected

gets its subblock index for current element

Definition at line 35 of file ComputePlaneSmallStrain.h.

Referenced by computeOutOfPlaneStrain().

36  {
37  return _subblock_id_provider ? _subblock_id_provider->getSubblockIndex(*_current_elem) : 0;
38  };
const SubblockIndexProvider * _subblock_id_provider
virtual unsigned int getSubblockIndex(const Elem &) const =0
The index of subblock this element is on.

◆ initialSetup()

void Compute2DSmallStrain::initialSetup ( )
overrideprotectedinherited

Definition at line 34 of file Compute2DSmallStrain.C.

Referenced by ComputeAxisymmetricRZSmallStrain::initialSetup().

35 {
37  for (unsigned int i = 0; i < 3; ++i)
38  {
39  if (_out_of_plane_direction == i)
40  {
41  _disp[i] = &_zero;
42  _grad_disp[i] = &_grad_zero;
43  }
44  else
45  {
46  _disp[i] = &coupledValue("displacements", i);
47  _grad_disp[i] = &coupledGradient("displacements", i);
48  }
49  }
50 }
const unsigned int _out_of_plane_direction
std::vector< const VariableValue * > _disp
virtual void displacementIntegrityCheck() override
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

◆ _grad_disp

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

◆ _mechanical_strain

MaterialProperty<RankTwoTensor>& ComputeStrainBase::_mechanical_strain
protectedinherited

◆ _ndisp

unsigned int ComputeStrainBase::_ndisp
protectedinherited

◆ _nscalar_strains

unsigned int ComputePlaneSmallStrain::_nscalar_strains
private

Definition at line 47 of file ComputePlaneSmallStrain.h.

Referenced by ComputePlaneSmallStrain().

◆ _out_of_plane_direction

const unsigned int Compute2DSmallStrain::_out_of_plane_direction
protectedinherited

◆ _out_of_plane_strain

const VariableValue& ComputePlaneSmallStrain::_out_of_plane_strain
private

Definition at line 46 of file ComputePlaneSmallStrain.h.

Referenced by computeOutOfPlaneStrain().

◆ _out_of_plane_strain_coupled

const bool ComputePlaneSmallStrain::_out_of_plane_strain_coupled
private

Definition at line 45 of file ComputePlaneSmallStrain.h.

Referenced by ComputePlaneSmallStrain().

◆ _scalar_out_of_plane_strain

std::vector<const VariableValue *> ComputePlaneSmallStrain::_scalar_out_of_plane_strain
private

Definition at line 48 of file ComputePlaneSmallStrain.h.

Referenced by computeOutOfPlaneStrain(), and ComputePlaneSmallStrain().

◆ _scalar_out_of_plane_strain_coupled

const bool ComputePlaneSmallStrain::_scalar_out_of_plane_strain_coupled
private

Definition at line 43 of file ComputePlaneSmallStrain.h.

Referenced by computeOutOfPlaneStrain(), and ComputePlaneSmallStrain().

◆ _subblock_id_provider

const SubblockIndexProvider* ComputePlaneSmallStrain::_subblock_id_provider
protected

Definition at line 38 of file ComputePlaneSmallStrain.h.

Referenced by getCurrentSubblockIndex().

◆ _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: