https://mooseframework.inl.gov
ComputeCosseratSmallStrain.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
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 small Cosserat strains");
24  params.addRequiredCoupledVar("Cosserat_rotations", "The 3 Cosserat rotation variables");
25  return params;
26 }
27 
29  : ComputeStrainBase(parameters),
30  _curvature(declareProperty<RankTwoTensor>("curvature")),
31  _nrots(coupledComponents("Cosserat_rotations")),
32  _wc(coupledValues("Cosserat_rotations")),
33  _grad_wc(coupledGradients("Cosserat_rotations"))
34 {
35  if (_nrots != 3)
36  mooseError("ComputeCosseratSmallStrain: This Material is only defined for 3-dimensional "
37  "simulations so 3 Cosserat rotation variables are needed");
38 }
39 
40 void
42 {
44  (*_grad_disp[0])[_qp], (*_grad_disp[1])[_qp], (*_grad_disp[2])[_qp]);
45  RealVectorValue wc_vector((*_wc[0])[_qp], (*_wc[1])[_qp], (*_wc[2])[_qp]);
46 
47  for (unsigned i = 0; i < LIBMESH_DIM; ++i)
48  for (unsigned j = 0; j < LIBMESH_DIM; ++j)
49  for (unsigned k = 0; k < LIBMESH_DIM; ++k)
50  strain(i, j) += PermutationTensor::eps(i, j, k) * wc_vector(k);
51 
52  _total_strain[_qp] = strain;
53 
54  _mechanical_strain[_qp] = strain;
55  for (auto es : _eigenstrains)
56  _mechanical_strain[_qp] -= (*es)[_qp];
57 
59  (*_grad_wc[0])[_qp], (*_grad_wc[1])[_qp], (*_grad_wc[2])[_qp]);
60 }
int eps(unsigned int i, unsigned int j)
ComputeCosseratSmallStrain(const InputParameters &parameters)
const unsigned int _nrots
the number of Cosserat rotation variables supplied by the user (must be 3 in current implementation) ...
ComputeCosseratSmallStrain defines Cossserat strain tensor, assuming small strains.
const std::vector< const VariableGradient * > _grad_wc
Grad(Cosserat rotation)
static InputParameters validParams()
static RankTwoTensorTempl initializeFromRows(const libMesh::TypeVector< Real > &row0, const libMesh::TypeVector< Real > &row1, const libMesh::TypeVector< Real > &row2)
MaterialProperty< RankTwoTensor > & _mechanical_strain
MaterialProperty< RankTwoTensor > & _curvature
the Cosserat curvature strain: curvature_ij = nabla_j CosseratRotation_i
virtual void computeQpProperties() override
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
static InputParameters validParams()
const std::vector< const VariableValue * > _wc
The Cosserat rotations.
void mooseError(Args &&... args) const
void addClassDescription(const std::string &doc_string)
ComputeStrainBase is the base class for strain tensors.
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
MaterialProperty< RankTwoTensor > & _total_strain
static const std::string k
Definition: NS.h:130
std::vector< const MaterialProperty< RankTwoTensor > * > _eigenstrains
registerMooseObject("SolidMechanicsApp", ComputeCosseratSmallStrain)
std::vector< const VariableGradient * > _grad_disp
Gradient of displacements.