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

ComputePlaneIncrementalStrain defines strain increment for small strains in a 2D planar simulation. More...

#include <ComputePlaneIncrementalStrain.h>

Inheritance diagram for ComputePlaneIncrementalStrain:
[legend]

Public Member Functions

 ComputePlaneIncrementalStrain (const InputParameters &parameters)
 

Protected Member Functions

virtual Real computeOutOfPlaneGradDisp () override
 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 () override
 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...
 
unsigned int getCurrentSubblockIndex () const
 gets its subblock index for current element More...
 
void initialSetup () override
 
virtual void displacementIntegrityCheck () override
 
virtual void computeTotalStrainIncrement (RankTwoTensor &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 void computeProperties () override
 
virtual void initQpStatefulProperties () override
 
void subtractEigenstrainIncrementFromStrain (RankTwoTensor &strain)
 

Protected Attributes

const SubblockIndexProvider_subblock_id_provider
 
const bool _scalar_out_of_plane_strain_coupled
 
unsigned int _nscalar_strains
 
std::vector< const VariableValue * > _scalar_out_of_plane_strain
 
std::vector< const VariableValue * > _scalar_out_of_plane_strain_old
 
const bool _out_of_plane_strain_coupled
 
const VariableValue & _out_of_plane_strain
 
const VariableValue & _out_of_plane_strain_old
 
const unsigned int _out_of_plane_direction
 
std::vector< const VariableGradient * > _grad_disp_old
 
MaterialProperty< RankTwoTensor > & _strain_rate
 
MaterialProperty< RankTwoTensor > & _strain_increment
 
MaterialProperty< RankTwoTensor > & _rotation_increment
 
MaterialProperty< RankTwoTensor > & _deformation_gradient
 
const MaterialProperty< RankTwoTensor > & _mechanical_strain_old
 
const MaterialProperty< RankTwoTensor > & _total_strain_old
 
std::vector< const MaterialProperty< RankTwoTensor > * > _eigenstrains_old
 
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

ComputePlaneIncrementalStrain defines strain increment for small strains in a 2D planar simulation.

Definition at line 25 of file ComputePlaneIncrementalStrain.h.

Constructor & Destructor Documentation

◆ ComputePlaneIncrementalStrain()

ComputePlaneIncrementalStrain::ComputePlaneIncrementalStrain ( const InputParameters &  parameters)

Definition at line 30 of file ComputePlaneIncrementalStrain.C.

31  : Compute2DIncrementalStrain(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  _nscalar_strains(coupledScalarComponents("scalar_out_of_plane_strain")),
37  _out_of_plane_strain_coupled(isCoupled("out_of_plane_strain")),
38  _out_of_plane_strain(_out_of_plane_strain_coupled ? coupledValue("out_of_plane_strain")
39  : _zero),
40  _out_of_plane_strain_old(_out_of_plane_strain_coupled ? coupledValueOld("out_of_plane_strain")
41  : _zero)
42 {
44  mooseError("Must define only one of out_of_plane_strain or scalar_out_of_plane_strain");
45 
47  {
50  for (unsigned int i = 0; i < _nscalar_strains; ++i)
51  {
52  _scalar_out_of_plane_strain[i] = &coupledScalarValue("scalar_out_of_plane_strain", i);
53  _scalar_out_of_plane_strain_old[i] = &coupledScalarValueOld("scalar_out_of_plane_strain", i);
54  }
55  }
56 }
Compute2DIncrementalStrain(const InputParameters &parameters)
std::vector< const VariableValue * > _scalar_out_of_plane_strain
std::vector< const VariableValue * > _scalar_out_of_plane_strain_old
const SubblockIndexProvider * _subblock_id_provider

Member Function Documentation

◆ computeOutOfPlaneGradDisp()

Real ComputePlaneIncrementalStrain::computeOutOfPlaneGradDisp ( )
overrideprotectedvirtual

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.

Implements Compute2DIncrementalStrain.

Definition at line 59 of file ComputePlaneIncrementalStrain.C.

60 {
63  else
64  return _out_of_plane_strain[_qp];
65 }
std::vector< const VariableValue * > _scalar_out_of_plane_strain
unsigned int getCurrentSubblockIndex() const
gets its subblock index for current element

◆ computeOutOfPlaneGradDispOld()

Real ComputePlaneIncrementalStrain::computeOutOfPlaneGradDispOld ( )
overrideprotectedvirtual

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.

Implements Compute2DIncrementalStrain.

Definition at line 68 of file ComputePlaneIncrementalStrain.C.

69 {
72  else
73  return _out_of_plane_strain_old[_qp];
74 }
unsigned int getCurrentSubblockIndex() const
gets its subblock index for current element
std::vector< const VariableValue * > _scalar_out_of_plane_strain_old

◆ computeProperties()

void ComputeIncrementalSmallStrain::computeProperties ( )
overrideprotectedvirtualinherited

Definition at line 32 of file ComputeIncrementalSmallStrain.C.

33 {
34  Real volumetric_strain = 0.0;
35  for (_qp = 0; _qp < _qrule->n_points(); ++_qp)
36  {
37  RankTwoTensor total_strain_increment;
38  computeTotalStrainIncrement(total_strain_increment);
39 
40  _strain_increment[_qp] = total_strain_increment;
41 
43  volumetric_strain += total_strain_increment.trace() * _JxW[_qp] * _coord[_qp];
44  }
46  volumetric_strain /= _current_elem_volume;
47 
48  for (_qp = 0; _qp < _qrule->n_points(); ++_qp)
49  {
50  Real trace = _strain_increment[_qp].trace();
52  {
53  _strain_increment[_qp](0, 0) += (volumetric_strain - trace) / 3.0;
54  _strain_increment[_qp](1, 1) += (volumetric_strain - trace) / 3.0;
55  _strain_increment[_qp](2, 2) += (volumetric_strain - trace) / 3.0;
56  }
57 
59 
60  // Remove the Eigen strain increment
62 
63  // strain rate
64  if (_dt > 0)
65  _strain_rate[_qp] = _strain_increment[_qp] / _dt;
66  else
67  _strain_rate[_qp].zero();
68 
69  // Update strain in intermediate configuration: rotations are not needed
71  }
72 }
const Real & _current_elem_volume
const MaterialProperty< RankTwoTensor > & _total_strain_old
MaterialProperty< RankTwoTensor > & _strain_increment
MaterialProperty< RankTwoTensor > & _mechanical_strain
virtual void computeTotalStrainIncrement(RankTwoTensor &total_strain_increment)
Computes the current and old deformation gradients and passes back the total strain increment tensor...
MaterialProperty< RankTwoTensor > & _strain_rate
void subtractEigenstrainIncrementFromStrain(RankTwoTensor &strain)
const MaterialProperty< RankTwoTensor > & _mechanical_strain_old
MaterialProperty< RankTwoTensor > & _total_strain

◆ computeTotalStrainIncrement()

void Compute2DIncrementalStrain::computeTotalStrainIncrement ( RankTwoTensor &  total_strain_increment)
overrideprotectedvirtualinherited

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 ComputeIncrementalSmallStrain.

Definition at line 57 of file Compute2DIncrementalStrain.C.

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

◆ displacementIntegrityCheck()

void Compute2DIncrementalStrain::displacementIntegrityCheck ( )
overrideprotectedvirtualinherited

Reimplemented from ComputeStrainBase.

Definition at line 80 of file Compute2DIncrementalStrain.C.

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

◆ getCurrentSubblockIndex()

unsigned int ComputePlaneIncrementalStrain::getCurrentSubblockIndex ( ) const
inlineprotected

gets its subblock index for current element

Definition at line 35 of file ComputePlaneIncrementalStrain.h.

Referenced by computeOutOfPlaneGradDisp(), and computeOutOfPlaneGradDispOld().

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

◆ initialSetup()

void Compute2DIncrementalStrain::initialSetup ( )
overrideprotectedinherited

Definition at line 34 of file Compute2DIncrementalStrain.C.

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

◆ initQpStatefulProperties()

void ComputeIncrementalStrainBase::initQpStatefulProperties ( )
overrideprotectedvirtualinherited

Reimplemented from ComputeStrainBase.

Reimplemented in ComputeCosseratIncrementalSmallStrain.

Definition at line 50 of file ComputeIncrementalStrainBase.C.

Referenced by ComputeCosseratIncrementalSmallStrain::initQpStatefulProperties().

51 {
52  _mechanical_strain[_qp].zero();
53  _total_strain[_qp].zero();
54  _deformation_gradient[_qp].zero();
55  _deformation_gradient[_qp].addIa(1.0);
56 
57  // Note that for some models (small strain), the rotation increment is
58  // never updated. Because we always have stateful properties, this method
59  // always gets called, so we can rely on this getting set here without
60  // setting it again when properties get computed.
61  _rotation_increment[_qp].zero();
62  _rotation_increment[_qp].addIa(1.0);
63 }
MaterialProperty< RankTwoTensor > & _deformation_gradient
MaterialProperty< RankTwoTensor > & _mechanical_strain
MaterialProperty< RankTwoTensor > & _rotation_increment
MaterialProperty< RankTwoTensor > & _total_strain

◆ subtractEigenstrainIncrementFromStrain()

void ComputeIncrementalStrainBase::subtractEigenstrainIncrementFromStrain ( RankTwoTensor &  strain)
protectedinherited

Definition at line 66 of file ComputeIncrementalStrainBase.C.

Referenced by ComputeIncrementalSmallStrain::computeProperties(), ComputeCosseratIncrementalSmallStrain::computeQpProperties(), and ComputeFiniteStrain::computeQpStrain().

67 {
68  for (unsigned int i = 0; i < _eigenstrains.size(); ++i)
69  {
70  strain -= (*_eigenstrains[i])[_qp];
71  strain += (*_eigenstrains_old[i])[_qp];
72  }
73 }
std::vector< const MaterialProperty< RankTwoTensor > * > _eigenstrains_old
std::vector< const MaterialProperty< RankTwoTensor > * > _eigenstrains

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

◆ _deformation_gradient

MaterialProperty<RankTwoTensor>& ComputeIncrementalStrainBase::_deformation_gradient
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

◆ _eigenstrains_old

std::vector<const MaterialProperty<RankTwoTensor> *> ComputeIncrementalStrainBase::_eigenstrains_old
protectedinherited

◆ _global_strain

const MaterialProperty<RankTwoTensor>* ComputeStrainBase::_global_strain
protectedinherited

◆ _grad_disp

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

◆ _grad_disp_old

std::vector<const VariableGradient *> ComputeIncrementalStrainBase::_grad_disp_old
protectedinherited

◆ _mechanical_strain

MaterialProperty<RankTwoTensor>& ComputeStrainBase::_mechanical_strain
protectedinherited

◆ _mechanical_strain_old

const MaterialProperty<RankTwoTensor>& ComputeIncrementalStrainBase::_mechanical_strain_old
protectedinherited

◆ _ndisp

unsigned int ComputeStrainBase::_ndisp
protectedinherited

◆ _nscalar_strains

unsigned int ComputePlaneIncrementalStrain::_nscalar_strains
protected

Definition at line 43 of file ComputePlaneIncrementalStrain.h.

Referenced by ComputePlaneIncrementalStrain().

◆ _out_of_plane_direction

const unsigned int Compute2DIncrementalStrain::_out_of_plane_direction
protectedinherited

◆ _out_of_plane_strain

const VariableValue& ComputePlaneIncrementalStrain::_out_of_plane_strain
protected

Definition at line 48 of file ComputePlaneIncrementalStrain.h.

Referenced by computeOutOfPlaneGradDisp().

◆ _out_of_plane_strain_coupled

const bool ComputePlaneIncrementalStrain::_out_of_plane_strain_coupled
protected

Definition at line 47 of file ComputePlaneIncrementalStrain.h.

Referenced by ComputePlaneIncrementalStrain().

◆ _out_of_plane_strain_old

const VariableValue& ComputePlaneIncrementalStrain::_out_of_plane_strain_old
protected

Definition at line 49 of file ComputePlaneIncrementalStrain.h.

Referenced by computeOutOfPlaneGradDispOld().

◆ _rotation_increment

MaterialProperty<RankTwoTensor>& ComputeIncrementalStrainBase::_rotation_increment
protectedinherited

◆ _scalar_out_of_plane_strain

std::vector<const VariableValue *> ComputePlaneIncrementalStrain::_scalar_out_of_plane_strain
protected

◆ _scalar_out_of_plane_strain_coupled

const bool ComputePlaneIncrementalStrain::_scalar_out_of_plane_strain_coupled
protected

◆ _scalar_out_of_plane_strain_old

std::vector<const VariableValue *> ComputePlaneIncrementalStrain::_scalar_out_of_plane_strain_old
protected

◆ _strain_increment

MaterialProperty<RankTwoTensor>& ComputeIncrementalStrainBase::_strain_increment
protectedinherited

◆ _strain_rate

MaterialProperty<RankTwoTensor>& ComputeIncrementalStrainBase::_strain_rate
protectedinherited

◆ _subblock_id_provider

const SubblockIndexProvider* ComputePlaneIncrementalStrain::_subblock_id_provider
protected

Definition at line 38 of file ComputePlaneIncrementalStrain.h.

Referenced by getCurrentSubblockIndex().

◆ _total_strain

MaterialProperty<RankTwoTensor>& ComputeStrainBase::_total_strain
protectedinherited

◆ _total_strain_old

const MaterialProperty<RankTwoTensor>& ComputeIncrementalStrainBase::_total_strain_old
protectedinherited

◆ _volumetric_locking_correction

bool ComputeStrainBase::_volumetric_locking_correction
protectedinherited

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