https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
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
38void
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}
registerMooseObject("SolidMechanicsApp", ADComputeGreenLagrangeStrain)
ADComputeGreenLagrangeStrain defines a non-linear Green-Lagrange strain tensor.
ADComputeGreenLagrangeStrain(const InputParameters &parameters)
ADComputeStrainBase is the base class for strain tensors.
std::vector< const ADVariableGradient * > _grad_disp
Gradient of displacements.
std::vector< const ADMaterialProperty< R2 > * > _eigenstrains
ADMaterialProperty< R2 > & _total_strain
ADMaterialProperty< R2 > & _mechanical_strain
const ADMaterialProperty< R2 > *const _global_strain
static InputParameters validParams()
void addClassDescription(const std::string &doc_string)
unsigned int _qp
const QBase *const & _qrule
void paramError(const std::string &param, Args... args) const
static RankTwoTensorTempl initializeFromRows(const libMesh::TypeVector< T > &row0, const libMesh::TypeVector< T > &row1, const libMesh::TypeVector< T > &row2)