www.mooseframework.org
ADComputeGreenLagrangeStrain.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 #include "libmesh/quadrature.h"
12 
14 
17  params.addClassDescription("Compute a Green-Lagrange strain."););
18 
19 template <ComputeStage compute_stage>
21  const InputParameters & parameters)
22  : ADComputeStrainBase<compute_stage>(parameters)
23 {
24  // error out if unsupported features are to be used
25  if (_global_strain)
26  paramError("global_strain",
27  "Global strain (periodicity) is not yet supported for Green-Lagrange strains");
28  if (!_eigenstrains.empty())
29  paramError("eigenstrain_names",
30  "Eigenstrains are not yet supported for Green-Lagrange strains");
32  paramError("volumetric_locking_correction",
33  "Volumetric locking correction is not implemented for Green-Lagrange strains");
34 }
35 
36 template <ComputeStage compute_stage>
37 void
39 {
40  for (_qp = 0; _qp < _qrule->n_points(); ++_qp)
41  {
42  ADRankTwoTensor dxu((*_grad_disp[0])[_qp], (*_grad_disp[1])[_qp], (*_grad_disp[2])[_qp]);
43  ADRankTwoTensor dxuT = dxu.transpose();
44 
45  _mechanical_strain[_qp] = _total_strain[_qp] = (dxuT + dxu + dxuT * dxu) / 2.0;
46  }
47 }
ADComputeGreenLagrangeStrain(const InputParameters &parameters)
std::vector< const ADMaterialProperty(RankTwoTensor) * > _eigenstrains
const bool _volumetric_locking_correction
registerADMooseObject("TensorMechanicsApp", ADComputeGreenLagrangeStrain)
ADADComputeStrainBase is the base class for strain tensors.
ADComputeGreenLagrangeStrain defines a non-linear Green-Lagrange strain tensor.
defineADValidParams(ADComputeGreenLagrangeStrain, ADComputeStrainBase, params.addClassDescription("Compute a Green-Lagrange strain.");)