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

Compute2DSmallStrain defines a strain tensor, assuming small strains, in 2D geometries / simulations. More...

#include <Compute2DSmallStrain.h>

Inheritance diagram for Compute2DSmallStrain:
[legend]

Public Member Functions

 Compute2DSmallStrain (const InputParameters &parameters)
 

Protected Member Functions

void initialSetup () override
 
virtual void computeProperties () override
 
virtual void displacementIntegrityCheck () override
 
virtual Real computeOutOfPlaneStrain ()=0
 
virtual void initQpStatefulProperties () override
 

Protected Attributes

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
 

Detailed Description

Compute2DSmallStrain defines a strain tensor, assuming small strains, in 2D geometries / simulations.

ComputePlaneSmallStrain acts as a base class for ComputePlaneSmallStrain and ComputeAxisymmetricRZSmallStrain through the computeOutOfPlaneStrain method.

Definition at line 26 of file Compute2DSmallStrain.h.

Constructor & Destructor Documentation

◆ Compute2DSmallStrain()

Compute2DSmallStrain::Compute2DSmallStrain ( const InputParameters &  parameters)

Definition at line 27 of file Compute2DSmallStrain.C.

28  : ComputeSmallStrain(parameters),
29  _out_of_plane_direction(getParam<MooseEnum>("out_of_plane_direction"))
30 {
31 }
const unsigned int _out_of_plane_direction
ComputeSmallStrain(const InputParameters &parameters)

Member Function Documentation

◆ computeOutOfPlaneStrain()

virtual Real Compute2DSmallStrain::computeOutOfPlaneStrain ( )
protectedpure virtual

◆ computeProperties()

void Compute2DSmallStrain::computeProperties ( )
overrideprotectedvirtual

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

Reimplemented from ComputeStrainBase.

Definition at line 115 of file Compute2DSmallStrain.C.

Referenced by 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.

◆ initialSetup()

void Compute2DSmallStrain::initialSetup ( )
overrideprotected

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

◆ _out_of_plane_direction

const unsigned int Compute2DSmallStrain::_out_of_plane_direction
protected

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