www.mooseframework.org
ComputeCosseratIncrementalSmallStrain.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 /****************************************************************/
7 
9 
10 // MOOSE includes
11 #include "PermutationTensor.h"
12 
13 #include "libmesh/quadrature.h"
14 
15 template <>
16 InputParameters
18 {
19  InputParameters params = validParams<ComputeIncrementalStrainBase>();
20  params.addClassDescription("Compute incremental small Cosserat strains");
21  params.addRequiredCoupledVar("Cosserat_rotations", "The 3 Cosserat rotation variables");
22  return params;
23 }
24 
26  const InputParameters & parameters)
27  : ComputeIncrementalStrainBase(parameters),
28  _curvature(declareProperty<RankTwoTensor>("curvature")),
29  _nrots(coupledComponents("Cosserat_rotations")),
30  _wc(_nrots),
31  _wc_old(_nrots),
32  _grad_wc(_nrots),
33  _grad_wc_old(_nrots),
34  _curvature_old(getMaterialPropertyOld<RankTwoTensor>("curvature")),
35  _curvature_increment(declareProperty<RankTwoTensor>("curvature_increment"))
36 {
37  if (_nrots != 3)
38  mooseError("ComputeCosseratSmallStrain: This Material is only defined for 3-dimensional "
39  "simulations so 3 Cosserat rotation variables are needed");
40  for (unsigned i = 0; i < _nrots; ++i)
41  {
42  _wc[i] = &coupledValue("Cosserat_rotations", i);
43  _wc_old[i] = &coupledValueOld("Cosserat_rotations", i);
44  _grad_wc[i] = &coupledGradient("Cosserat_rotations", i);
45  _grad_wc_old[i] = &coupledGradientOld("Cosserat_rotations", i);
46  }
47 }
48 
49 void
51 {
53 
54  _curvature[_qp].zero();
55 }
56 
57 void
59 {
60  RankTwoTensor strain((*_grad_disp[0])[_qp], (*_grad_disp[1])[_qp], (*_grad_disp[2])[_qp]);
61  RankTwoTensor strain_old(
62  (*_grad_disp_old[0])[_qp], (*_grad_disp_old[1])[_qp], (*_grad_disp_old[2])[_qp]);
63  RealVectorValue wc_vector((*_wc[0])[_qp], (*_wc[1])[_qp], (*_wc[2])[_qp]);
64  RealVectorValue wc_vector_old((*_wc_old[0])[_qp], (*_wc_old[1])[_qp], (*_wc_old[2])[_qp]);
65 
66  for (unsigned i = 0; i < LIBMESH_DIM; ++i)
67  for (unsigned j = 0; j < LIBMESH_DIM; ++j)
68  for (unsigned k = 0; k < LIBMESH_DIM; ++k)
69  {
70  strain(i, j) += PermutationTensor::eps(i, j, k) * wc_vector(k);
71  strain_old(i, j) += PermutationTensor::eps(i, j, k) * wc_vector_old(k);
72  }
73 
74  _deformation_gradient[_qp] = strain;
75  _deformation_gradient[_qp].addIa(1.0); // Gauss point deformation gradient
76 
77  const RankTwoTensor total_strain_increment = strain - strain_old;
78 
79  _strain_increment[_qp] = total_strain_increment;
80 
81  // Remove the eigenstrain increment
83 
84  _strain_rate[_qp] = _strain_increment[_qp] / _dt;
85 
86  _total_strain[_qp] = _total_strain_old[_qp] + total_strain_increment;
88 
89  RankTwoTensor curv((*_grad_wc[0])[_qp], (*_grad_wc[1])[_qp], (*_grad_wc[2])[_qp]);
90  RankTwoTensor curv_old((*_grad_wc_old[0])[_qp], (*_grad_wc_old[1])[_qp], (*_grad_wc_old[2])[_qp]);
91  _curvature_increment[_qp] = curv - curv_old;
93 }
const MaterialProperty< RankTwoTensor > & _total_strain_old
MaterialProperty< RankTwoTensor > & _deformation_gradient
ComputeCosseratIncrementalSmallStrain(const InputParameters &parameters)
MaterialProperty< RankTwoTensor > & _curvature_increment
_curvature_increment = (curvature - _curvature_old)
MaterialProperty< RankTwoTensor > & _curvature
the Cosserat curvature strain: curvature_ij = nabla_j CosseratRotation_i
MaterialProperty< RankTwoTensor > & _strain_increment
std::vector< const VariableValue * > _wc_old
The Cosserat rotations.
std::vector< const VariableGradient * > _grad_wc
Grad(Cosserat rotation)
virtual void initQpStatefulProperties() override
MaterialProperty< RankTwoTensor > & _mechanical_strain
MaterialProperty< RankTwoTensor > & _strain_rate
InputParameters validParams< ComputeCosseratIncrementalSmallStrain >()
const unsigned int _nrots
the number of Cosserat rotation variables supplied by the user (must be 3 in current implementation) ...
void subtractEigenstrainIncrementFromStrain(RankTwoTensor &strain)
const MaterialProperty< RankTwoTensor > & _mechanical_strain_old
std::vector< const VariableValue * > _wc
The Cosserat rotations.
std::vector< const VariableGradient * > _grad_disp_old
const MaterialProperty< RankTwoTensor > & _curvature_old
the Cosserat curvature strain: curvature_ij = nabla_j CosseratRotation_i
ComputeIncrementalStrainBase is the base class for strain tensors using incremental formulations...
InputParameters validParams< ComputeIncrementalStrainBase >()
MaterialProperty< RankTwoTensor > & _total_strain
std::vector< const VariableGradient * > _grad_wc_old
Grad(Cosserat rotation)
std::vector< const VariableGradient * > _grad_disp