www.mooseframework.org
ComputeDeformGradBasedStress.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
8 
9 template <>
10 InputParameters
12 {
13  InputParameters params = validParams<Material>();
14  params.addClassDescription("Computes stress based on lagrangian strain");
15  params.addRequiredParam<MaterialPropertyName>("deform_grad_name",
16  "Name of deformation gradient variable");
17  params.addRequiredParam<MaterialPropertyName>("elasticity_tensor_name",
18  "Name of elasticity tensor variable");
19  params.addRequiredParam<MaterialPropertyName>("stress_name", "Name of stress variable");
20  params.addRequiredParam<MaterialPropertyName>("jacobian_name", "Name of jacobian variable");
21  return params;
22 }
23 
25  : DerivativeMaterialInterface<Material>(parameters),
26  _deformation_gradient(getMaterialProperty<RankTwoTensor>("deform_grad_name")),
27  _elasticity_tensor(getMaterialProperty<RankFourTensor>("elasticity_tensor_name")),
28  _stress(declareProperty<RankTwoTensor>(getParam<MaterialPropertyName>("stress_name"))),
29  _Jacobian_mult(declareProperty<RankFourTensor>(getParam<MaterialPropertyName>("jacobian_name")))
30 {
31 }
32 
33 void
35 {
36  _stress[_qp].zero();
37 }
38 
39 void
41 {
43 }
44 
45 void
47 {
48  const RankTwoTensor iden(RankTwoTensor::initIdentity);
49  RankTwoTensor ee =
50  0.5 * (_deformation_gradient[_qp].transpose() * _deformation_gradient[_qp] - iden);
51  RankTwoTensor pk2 = _elasticity_tensor[_qp] * ee;
52 
53  _stress[_qp] = _deformation_gradient[_qp] * pk2 * _deformation_gradient[_qp].transpose() /
54  _deformation_gradient[_qp].det();
56 }
ComputeDeformGradBasedStress(const InputParameters &parameters)
InputParameters validParams< ComputeDeformGradBasedStress >()
MaterialProperty< RankTwoTensor > & _stress
const MaterialProperty< RankTwoTensor > & _deformation_gradient
MaterialProperty< RankFourTensor > & _Jacobian_mult
const MaterialProperty< RankFourTensor > & _elasticity_tensor