https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
40void
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}
registerMooseObject("SolidMechanicsApp", ComputeCosseratSmallStrain)
void mooseError(Args &&... args)
ComputeCosseratSmallStrain defines Cossserat strain tensor, assuming small strains.
const unsigned int _nrots
the number of Cosserat rotation variables supplied by the user (must be 3 in current implementation)
static InputParameters validParams()
MaterialProperty< RankTwoTensor > & _curvature
the Cosserat curvature strain: curvature_ij = nabla_j CosseratRotation_i
const std::vector< const VariableValue * > _wc
The Cosserat rotations.
const std::vector< const VariableGradient * > _grad_wc
Grad(Cosserat rotation)
ComputeCosseratSmallStrain(const InputParameters &parameters)
virtual void computeQpProperties() override
ComputeStrainBase is the base class for strain tensors.
std::vector< const VariableGradient * > _grad_disp
Gradient of displacements.
MaterialProperty< RankTwoTensor > & _mechanical_strain
std::vector< const MaterialProperty< RankTwoTensor > * > _eigenstrains
MaterialProperty< RankTwoTensor > & _total_strain
static InputParameters validParams()
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
static RankTwoTensorTempl initializeFromRows(const libMesh::TypeVector< T > &row0, const libMesh::TypeVector< T > &row1, const libMesh::TypeVector< T > &row2)
int eps(unsigned int i, unsigned int j)