https://mooseframework.inl.gov
ComputeLagrangianObjectiveStress.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 
13 
16 {
18 
19  params.addClassDescription("Stress update based on the small (engineering) stress");
20 
21  MooseEnum objectiveRate("truesdell jaumann green_naghdi", "truesdell");
22  params.addParam<MooseEnum>(
23  "objective_rate", objectiveRate, "Which type of objective integration to use");
24 
25  return params;
26 }
27 
29  const InputParameters & parameters)
30  : ComputeLagrangianStressCauchy(parameters),
31  _small_stress(declareProperty<RankTwoTensor>(_base_name + "small_stress")),
32  _small_stress_old(getMaterialPropertyOld<RankTwoTensor>(_base_name + "small_stress")),
33  _small_jacobian(declareProperty<RankFourTensor>(_base_name + "small_jacobian")),
34  _cauchy_stress_old(getMaterialPropertyOld<RankTwoTensor>(_base_name + "cauchy_stress")),
35  _mechanical_strain(getMaterialPropertyByName<RankTwoTensor>(_base_name + "mechanical_strain")),
36  _strain_increment(getMaterialPropertyByName<RankTwoTensor>(_base_name + "strain_increment")),
37  _vorticity_increment(
38  getMaterialPropertyByName<RankTwoTensor>(_base_name + "vorticity_increment")),
39  _def_grad(getMaterialPropertyByName<RankTwoTensor>(_base_name + "deformation_gradient")),
40  _def_grad_old(getMaterialPropertyOldByName<RankTwoTensor>(_base_name + "deformation_gradient")),
41  _rate(getParam<MooseEnum>("objective_rate").getEnum<ObjectiveRate>()),
42  _polar_decomp(_rate == ObjectiveRate::GreenNaghdi),
43  _rotation(_polar_decomp ? &declareProperty<RankTwoTensor>(_base_name + "rotation") : nullptr),
44  _rotation_old(_polar_decomp ? &getMaterialPropertyOld<RankTwoTensor>(_base_name + "rotation")
45  : nullptr),
46  _d_rotation_d_def_grad(
47  _polar_decomp ? &declareProperty<RankFourTensor>(derivativePropertyName(
48  _base_name + "rotation", {_base_name + "deformation_gradient"}))
49  : nullptr),
50  _stretch(_polar_decomp ? &declareProperty<RankTwoTensor>(_base_name + "stretch") : nullptr)
51 {
52 }
53 
54 void
56 {
58 
59  _small_stress[_qp].zero();
60  _cauchy_stress[_qp].zero();
61 
62  if (_polar_decomp)
63  (*_rotation)[_qp] = RankTwoTensor::Identity();
64 }
65 
66 void
68 {
70 
71  if (!_large_kinematics)
72  {
75  }
76  else
77  {
78  // If large_kinematics = true, do the objective integration
80 
83  else if (_rate == ObjectiveRate::Jaumann)
87  else
88  mooseError("Internal error: unsupported objective rate.");
89  }
90 }
91 
94 {
95  // Get the kinematic tensor
97 
98  // Update the Cauchy stress
99  auto [S, Jinv] = advectStress(_cauchy_stress_old[_qp] + dS, dL);
100 
101  // Get the appropriate tangent tensor
103  _cauchy_jacobian[_qp] = cauchyJacobian(Jinv, U);
104 
105  return S;
106 }
107 
110 {
111  usingTensorIndices(i, j, k, l);
112 
113  // Get the kinematic tensor
115  RankTwoTensor dW = 0.5 * (dL - dL.transpose());
116 
117  // Update the Cauchy stress
118  auto [S, Jinv] = advectStress(_cauchy_stress_old[_qp] + dS, dW);
119 
120  // Get the appropriate tangent tensor
122  RankFourTensor ddW_ddL = 0.5 * (I.times<i, k, j, l>(I) - I.times<i, l, j, k>(I));
124  _cauchy_jacobian[_qp] = cauchyJacobian(Jinv, U);
125 
126  return S;
127 }
128 
131 {
132  usingTensorIndices(i, j, k, l, m);
133 
134  // The kinematic tensor for the Green-Naghdi rate is
135  // Omega = dot(R) R^T
138  RankTwoTensor dR = (*_rotation)[_qp] * (*_rotation_old)[_qp].transpose() - I;
139  RankTwoTensor dO = dR * _inv_df[_qp];
140 
141  // Update the Cauchy stress
142  auto [S, Jinv] = advectStress(_cauchy_stress_old[_qp] + dS, dO);
143 
144  // Get the appropriate tangent tensor
145  RankFourTensor d_R_d_F = (*_d_rotation_d_def_grad)[_qp];
146  RankFourTensor d_F_d_dL = _inv_df[_qp].inverse().times<i, k, l, j>(_def_grad[_qp]);
147  RankTwoTensor T = (*_rotation_old)[_qp].transpose() * _inv_df[_qp];
148  RankFourTensor d_dO_d_dL =
149  T.times<m, j, i, m, k, l>(d_R_d_F * d_F_d_dL) - dR.times<i, k, j, l>(I);
150  RankFourTensor U = stressAdvectionDerivative(S) * d_dO_d_dL;
151  _cauchy_jacobian[_qp] = cauchyJacobian(Jinv, U);
152 
153  return S;
154 }
155 
156 std::tuple<RankTwoTensor, RankFourTensor>
158  const RankTwoTensor & dQ) const
159 {
161  RankFourTensor Jinv = J.inverse();
162  RankTwoTensor S = Jinv * S0;
163  return {S, Jinv};
164 }
165 
168 {
169  auto I = RankTwoTensor::Identity();
170  usingTensorIndices(i, j, k, l);
171  return (1.0 + dQ.trace()) * I.times<i, k, j, l>(I) - dQ.times<i, k, j, l>(I) -
172  I.times<i, k, j, l>(dQ);
173 }
174 
177 {
178  auto I = RankTwoTensor::Identity();
179  usingTensorIndices(i, j, k, l);
180  return S.times<i, j, k, l>(I) - I.times<i, k, l, j>(S) - S.times<i, l, j, k>(I);
181 }
182 
185  const RankFourTensor & U) const
186 {
187  return Jinv * (_small_jacobian[_qp] - U);
188 }
189 
190 void
192 {
194  (*_stretch)[_qp] = MathUtils::sqrt(C).get();
195  RankTwoTensor Uinv = MathUtils::sqrt(C).inverse().get();
196  (*_rotation)[_qp] = _def_grad[_qp] * Uinv;
197 
198  // Derivative of rotation w.r.t. the deformation gradient
200  RankTwoTensor Y = (*_stretch)[_qp].trace() * I - (*_stretch)[_qp];
201  RankTwoTensor Z = (*_rotation)[_qp] * Y;
202  RankTwoTensor O = Z * (*_rotation)[_qp].transpose();
203  usingTensorIndices(i, j, k, l);
204  (*_d_rotation_d_def_grad)[_qp] = (O.times<i, k, l, j>(Y) - Z.times<i, l, k, j>(Z)) / Y.det();
205 }
void polarDecomposition()
Perform polar decomposition.
RankFourTensor stressAdvectionDerivative(const RankTwoTensor &S) const
Derivative of the action to advect stress with respect to the kinematic tensor.
RankFourTensorTempl< T > inverse() const
RankTwoTensorTempl< Real > inverse() const
ObjectiveRate
Types of objective integrations.
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
static RankTwoTensorTempl Identity()
RankFourTensor updateTensor(const RankTwoTensor &Q) const
Make the tensor used to advect the stress.
const bool _large_kinematics
If true use large deformations.
const std::string _base_name
Prepend to the material properties.
virtual void computeQpSmallStress()=0
Method to implement to provide the small stress update.
unsigned int _qp
virtual void initQpStatefulProperties() override
Initialize everything with zeros.
virtual void initQpStatefulProperties() override
Initialize the new (small) stress.
static const std::string S
Definition: NS.h:163
RankTwoTensor objectiveUpdateTruesdell(const RankTwoTensor &dS)
Objective update using the Truesdell rate.
const MaterialProperty< RankTwoTensor > & _def_grad
Deformation gradient.
std::tuple< RankTwoTensor, RankFourTensor > advectStress(const RankTwoTensor &S0, const RankTwoTensor &dQ) const
Advect the stress using the provided kinematic tensor.
enum ComputeLagrangianObjectiveStress::ObjectiveRate _rate
MaterialProperty< RankTwoTensor > & _cauchy_stress
The Cauchy stress.
const MaterialProperty< RankTwoTensor > & _cauchy_stress_old
We need the old Cauchy stress to do the objective integration.
const MooseArray< Moose::GenericType< T, is_ad > > & get() const
const bool _polar_decomp
Whether we need to perform polar decomposition.
Native interface for providing the Cauchy stress.
const MaterialProperty< RankTwoTensor > & _small_stress_old
We need the old value to get the increment.
virtual void computeQpCauchyStress() override
Implement the objective update.
RankTwoTensorTempl< Real > transpose() const
const MaterialProperty< RankTwoTensor > & _inv_df
Inverse incremental deformation gradient.
RankTwoTensor objectiveUpdateJaumann(const RankTwoTensor &dS)
Objective update using the Jaumann rate.
static const std::string Z
Definition: NS.h:169
MaterialProperty< RankFourTensor > & _small_jacobian
The updated small algorithmic tangent.
RankFourTensorTempl< Real > times(const RankTwoTensorTempl< Real > &b) const
ComputeLagrangianObjectiveStress(const InputParameters &parameters)
MaterialProperty< RankTwoTensor > & _small_stress
The updated small stress.
void mooseError(Args &&... args) const
void addClassDescription(const std::string &doc_string)
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
RankFourTensor cauchyJacobian(const RankFourTensor &Jinv, const RankFourTensor &U) const
Compute the consistent tangent.
static const std::string k
Definition: NS.h:130
MaterialProperty< RankFourTensor > & _cauchy_jacobian
The derivative of the Cauchy stress wrt the increment in the spatial velocity gradient.
static const std::string C
Definition: NS.h:168
RankTwoTensor objectiveUpdateGreenNaghdi(const RankTwoTensor &dS)
Objective update using the Green-Naghdi rate.