www.mooseframework.org
ComputeCosseratIncrementalSmallStrain.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
11 
12 // MOOSE includes
13 #include "PermutationTensor.h"
14 
15 #include "libmesh/quadrature.h"
16 
18 
21 {
23  params.addClassDescription("Compute incremental small Cosserat strains");
24  params.addRequiredCoupledVar("Cosserat_rotations", "The 3 Cosserat rotation variables");
25  return params;
26 }
27 
29  const InputParameters & parameters)
30  : ComputeIncrementalStrainBase(parameters),
31  _curvature(declareProperty<RankTwoTensor>("curvature")),
32  _nrots(coupledComponents("Cosserat_rotations")),
33  _wc(coupledValues("Cosserat_rotations")),
34  _wc_old(coupledValuesOld("Cosserat_rotations")),
35  _grad_wc(coupledGradients("Cosserat_rotations")),
36  _grad_wc_old(coupledGradientsOld("Cosserat_rotations")),
37  _curvature_old(getMaterialPropertyOld<RankTwoTensor>("curvature")),
38  _curvature_increment(declareProperty<RankTwoTensor>("curvature_increment"))
39 {
40  if (_nrots != 3)
41  mooseError("ComputeCosseratSmallStrain: This Material is only defined for 3-dimensional "
42  "simulations so 3 Cosserat rotation variables are needed");
43 }
44 
45 void
47 {
49 
50  _curvature[_qp].zero();
51 }
52 
53 void
55 {
57  (*_grad_disp[0])[_qp], (*_grad_disp[1])[_qp], (*_grad_disp[2])[_qp]);
58  auto strain_old = RankTwoTensor::initializeFromRows(
59  (*_grad_disp_old[0])[_qp], (*_grad_disp_old[1])[_qp], (*_grad_disp_old[2])[_qp]);
60  RealVectorValue wc_vector((*_wc[0])[_qp], (*_wc[1])[_qp], (*_wc[2])[_qp]);
61  RealVectorValue wc_vector_old((*_wc_old[0])[_qp], (*_wc_old[1])[_qp], (*_wc_old[2])[_qp]);
62 
63  for (unsigned i = 0; i < LIBMESH_DIM; ++i)
64  for (unsigned j = 0; j < LIBMESH_DIM; ++j)
65  for (unsigned k = 0; k < LIBMESH_DIM; ++k)
66  {
67  strain(i, j) += PermutationTensor::eps(i, j, k) * wc_vector(k);
68  strain_old(i, j) += PermutationTensor::eps(i, j, k) * wc_vector_old(k);
69  }
70 
71  // Gauss point deformation gradient
72  _deformation_gradient[_qp] = strain;
73  _deformation_gradient[_qp].addIa(1.0);
74 
75  const RankTwoTensor total_strain_increment = strain - strain_old;
76 
77  _strain_increment[_qp] = total_strain_increment;
78 
79  // Remove the eigenstrain increment
81 
83 
84  _total_strain[_qp] = _total_strain_old[_qp] + total_strain_increment;
86 
88  (*_grad_wc[0])[_qp], (*_grad_wc[1])[_qp], (*_grad_wc[2])[_qp]);
89  auto curv_old = RankTwoTensor::initializeFromRows(
90  (*_grad_wc_old[0])[_qp], (*_grad_wc_old[1])[_qp], (*_grad_wc_old[2])[_qp]);
91  _curvature_increment[_qp] = curv - curv_old;
93 
94  // incremental small strain does not include rotation
95  _rotation_increment[_qp].setToIdentity();
96 }
int eps(unsigned int i, unsigned int j)
const MaterialProperty< RankTwoTensor > & _total_strain_old
const std::vector< const VariableValue * > _wc
The Cosserat rotations.
MaterialProperty< RankTwoTensor > & _deformation_gradient
ComputeCosseratIncrementalSmallStrain(const InputParameters &parameters)
MaterialProperty< RankTwoTensor > & _curvature_increment
_curvature_increment = (curvature - _curvature_old)
const std::vector< const VariableGradient * > _grad_wc_old
Grad(Cosserat rotation)
MaterialProperty< RankTwoTensor > & _curvature
the Cosserat curvature strain: curvature_ij = nabla_j CosseratRotation_i
MaterialProperty< RankTwoTensor > & _strain_increment
static RankTwoTensorTempl initializeFromRows(const libMesh::TypeVector< Real > &row0, const libMesh::TypeVector< Real > &row1, const libMesh::TypeVector< Real > &row2)
virtual void initQpStatefulProperties() override
MaterialProperty< RankTwoTensor > & _mechanical_strain
ComputeCosseratIncrementalSmallStrain defines various incremental versions of the Cossserat strain te...
MaterialProperty< RankTwoTensor > & _strain_rate
const unsigned int _nrots
the number of Cosserat rotation variables supplied by the user (must be 3 in current implementation) ...
void subtractEigenstrainIncrementFromStrain(RankTwoTensor &strain)
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
registerMooseObject("SolidMechanicsApp", ComputeCosseratIncrementalSmallStrain)
const MaterialProperty< RankTwoTensor > & _mechanical_strain_old
std::vector< const VariableGradient * > _grad_disp_old
const MaterialProperty< RankTwoTensor > & _curvature_old
the Cosserat curvature strain: curvature_ij = nabla_j CosseratRotation_i
void mooseError(Args &&... args) const
void addClassDescription(const std::string &doc_string)
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
ComputeIncrementalStrainBase is the base class for strain tensors using incremental formulations...
const std::vector< const VariableValue * > _wc_old
The Cosserat rotations.
MaterialProperty< RankTwoTensor > & _rotation_increment
MaterialProperty< RankTwoTensor > & _total_strain
static const std::string k
Definition: NS.h:124
const std::vector< const VariableGradient * > _grad_wc
Grad(Cosserat rotation)
std::vector< const VariableGradient * > _grad_disp
Gradient of displacements.