https://mooseframework.inl.gov
ComputeNeoHookeanStress.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 registerMooseObject("SolidMechanicsApp", ComputeNeoHookeanStress);
13 
16 {
18 
19  params.addParam<MaterialPropertyName>("lambda",
20  "lambda",
21  "Parameter conjugate to Lame parameter"
22  " for small deformations");
23  params.addParam<MaterialPropertyName>("mu",
24  "mu",
25  "Parameter conjugate to Lame parameter"
26  " for small deformations");
27 
28  return params;
29 }
30 
32  : ComputeLagrangianStressPK2(parameters),
33  _lambda(getMaterialProperty<Real>(getParam<MaterialPropertyName>("lambda"))),
34  _mu(getMaterialProperty<Real>(getParam<MaterialPropertyName>("mu")))
35 
36 {
37 }
38 
39 void
41 {
42  // Hyperelasticity is weird, we need to branch on the type of update if we
43  // want a truly linear model
44  //
45  // This is because we need to drop quadratic terms for the linear update
46  usingTensorIndices(i_, j_, k_, l_);
47 
48  // Large deformation = nonlinear strain
50  {
52  _S[_qp] = (_lambda[_qp] * log(_F[_qp].det()) - _mu[_qp]) * Cinv +
54  _C[_qp] =
55  -2 * (_lambda[_qp] * log(_F[_qp].det()) - _mu[_qp]) * Cinv.times<i_, k_, l_, j_>(Cinv) +
56  _lambda[_qp] * Cinv.times<i_, j_, k_, l_>(Cinv);
57  }
58  // Small deformations = linear strain
59  else
60  {
61  const auto I = RankTwoTensor::Identity();
62  RankTwoTensor strain = 0.5 * (_F[_qp] + _F[_qp].transpose()) - I;
63  _C[_qp] = _lambda[_qp] * I.times<i_, j_, k_, l_>(I) +
65  _S[_qp] = _C[_qp] * strain;
66  }
67 }
const MaterialProperty< RankTwoTensor > & _F
Deformation gradient.
static InputParameters validParams()
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
ComputeNeoHookeanStress(const InputParameters &parameters)
static InputParameters validParams()
Native interface for providing the 2nd Piola Kirchhoff stress.
void inverse(const std::vector< std::vector< Real >> &m, std::vector< std::vector< Real >> &m_inv)
static RankTwoTensorTempl Identity()
const bool _large_kinematics
If true use large deformations.
virtual void computeQpPK2Stress()
Actual stress/Jacobian update.
Compressible Neo-Hookean hyperelasticity.
unsigned int _qp
const MaterialProperty< Real > & _lambda
auto log(const T &)
MaterialProperty< RankTwoTensor > & _E
Green-Lagrange strain.
MaterialProperty< RankFourTensor > & _C
2nd PK tangent (dS/dF)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
RankFourTensorTempl< Real > times(const RankTwoTensorTempl< Real > &b) const
registerMooseObject("SolidMechanicsApp", ComputeNeoHookeanStress)
MaterialProperty< RankTwoTensor > & _S
2nd PK stress
const MaterialProperty< Real > & _mu