www.mooseframework.org
ComputeIncrementalSmallStrain.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
8 #include "Assembly.h"
9 #include "libmesh/quadrature.h"
10 
11 template <>
12 InputParameters
14 {
15  InputParameters params = validParams<ComputeIncrementalStrainBase>();
16  params.addClassDescription(
17  "Compute a strain increment and rotation increment for small strains.");
18  return params;
19 }
20 
22  : ComputeIncrementalStrainBase(parameters)
23 {
24 }
25 
26 void
28 {
29  Real volumetric_strain = 0.0;
30  for (_qp = 0; _qp < _qrule->n_points(); ++_qp)
31  {
32  RankTwoTensor total_strain_increment;
33  computeTotalStrainIncrement(total_strain_increment);
34 
35  _strain_increment[_qp] = total_strain_increment;
36 
38  volumetric_strain += total_strain_increment.trace() * _JxW[_qp] * _coord[_qp];
39  }
41  volumetric_strain /= _current_elem_volume;
42 
43  for (_qp = 0; _qp < _qrule->n_points(); ++_qp)
44  {
45  Real trace = _strain_increment[_qp].trace();
47  {
48  _strain_increment[_qp](0, 0) += (volumetric_strain - trace) / 3.0;
49  _strain_increment[_qp](1, 1) += (volumetric_strain - trace) / 3.0;
50  _strain_increment[_qp](2, 2) += (volumetric_strain - trace) / 3.0;
51  }
52 
54 
55  // Remove the Eigen strain increment
56  subtractEigenstrainIncrementFromStrain(_strain_increment[_qp]);
57 
58  // strain rate
59  if (_dt > 0)
60  _strain_rate[_qp] = _strain_increment[_qp] / _dt;
61  else
62  _strain_rate[_qp].zero();
63 
64  // Update strain in intermediate configuration: rotations are not needed
65  _mechanical_strain[_qp] = _mechanical_strain_old[_qp] + _strain_increment[_qp];
66  }
67 }
68 
69 void
70 ComputeIncrementalSmallStrain::computeTotalStrainIncrement(RankTwoTensor & total_strain_increment)
71 {
72  // Deformation gradient
73  RankTwoTensor A(
74  (*_grad_disp[0])[_qp], (*_grad_disp[1])[_qp], (*_grad_disp[2])[_qp]); // Deformation gradient
75  RankTwoTensor Fbar((*_grad_disp_old[0])[_qp],
76  (*_grad_disp_old[1])[_qp],
77  (*_grad_disp_old[2])[_qp]); // Old Deformation gradient
78 
79  _deformation_gradient[_qp] = A;
80  _deformation_gradient[_qp].addIa(1.0);
81 
82  A -= Fbar; // A = grad_disp - grad_disp_old
83 
84  total_strain_increment = 0.5 * (A + A.transpose());
85 }
const Real & _current_elem_volume
const MaterialProperty< RankTwoTensor > & _total_strain_old
MaterialProperty< RankTwoTensor > & _deformation_gradient
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
std::vector< const VariableGradient * > _grad_disp_old
ComputeIncrementalStrainBase is the base class for strain tensors using incremental formulations...
ComputeIncrementalSmallStrain(const InputParameters &parameters)
InputParameters validParams< ComputeIncrementalStrainBase >()
MaterialProperty< RankTwoTensor > & _total_strain
InputParameters validParams< ComputeIncrementalSmallStrain >()
std::vector< const VariableGradient * > _grad_disp