https://mooseframework.inl.gov
ADComputeGreenLagrangeStrain.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 #include "libmesh/quadrature.h"
12 
14 
17 {
19  params.addClassDescription("Compute a Green-Lagrange strain.");
20  return params;
21 }
22 
24  : ADComputeStrainBase(parameters)
25 {
26  // error out if unsupported features are to be used
27  if (_global_strain)
28  paramError("global_strain",
29  "Global strain (periodicity) is not yet supported for Green-Lagrange strains");
30  if (!_eigenstrains.empty())
31  paramError("eigenstrain_names",
32  "Eigenstrains are not yet supported for Green-Lagrange strains");
34  paramError("volumetric_locking_correction",
35  "Volumetric locking correction is not implemented for Green-Lagrange strains");
36 }
37 
38 void
40 {
41  for (_qp = 0; _qp < _qrule->n_points(); ++_qp)
42  {
44  (*_grad_disp[0])[_qp], (*_grad_disp[1])[_qp], (*_grad_disp[2])[_qp]);
45  auto dxuT = dxu.transpose();
46 
47  _mechanical_strain[_qp] = _total_strain[_qp] = (dxuT + dxu + dxuT * dxu) / 2.0;
48  }
49 }
const QBase *const & _qrule
registerMooseObject("SolidMechanicsApp", ADComputeGreenLagrangeStrain)
static RankTwoTensorTempl initializeFromRows(const libMesh::TypeVector< ADReal > &row0, const libMesh::TypeVector< ADReal > &row1, const libMesh::TypeVector< ADReal > &row2)
unsigned int _qp
ADComputeStrainBase is the base class for strain tensors.
std::vector< const ADVariableGradient * > _grad_disp
Gradient of displacements.
static InputParameters validParams()
std::vector< const ADMaterialProperty< R2 > * > _eigenstrains
ADMaterialProperty< R2 > & _mechanical_strain
void paramError(const std::string &param, Args... args) const
ADComputeGreenLagrangeStrain(const InputParameters &parameters)
void addClassDescription(const std::string &doc_string)
ADComputeGreenLagrangeStrain defines a non-linear Green-Lagrange strain tensor.
const ADMaterialProperty< R2 > *const _global_strain
ADMaterialProperty< R2 > & _total_strain