https://mooseframework.inl.gov
ComputeLagrangianStressCauchy.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 
14 {
16 
17  params.addClassDescription("Stress update based on the Cauchy stress");
18 
19  return params;
20 }
21 
23  : ComputeLagrangianStressBase(parameters),
24  _inv_df(getMaterialPropertyByName<RankTwoTensor>(_base_name +
25  "inverse_incremental_deformation_gradient")),
26  _inv_def_grad(
27  getMaterialPropertyByName<RankTwoTensor>(_base_name + "inverse_deformation_gradient")),
28  _F(getMaterialPropertyByName<RankTwoTensor>(_base_name + "deformation_gradient")),
29  _F_ust_inv(getMaterialPropertyByName<RankTwoTensor>(
30  _base_name + "inverse_unstabilized_deformation_gradient")),
31  _F_ust_det(
32  getMaterialPropertyByName<Real>(_base_name + "det_unstabilized_deformation_gradient"))
33 {
34 }
35 
36 void
38 {
40  computeQpPK1Stress(); // This could be "switched"
41 }
42 
43 void
45 {
46  // Wrap sigma -> PK1 using the *unstabilized* F (= F_actual at alpha = 1). F-bar enters
47  // only through sigma via the strain calc's F-bar'd `_f_inv`, NOT through this kinematic
48  // wrap -- this matches OLD's `StressDivergenceTensors`-on-displaced-mesh residual,
49  // which integrates `gradTest_spatial * sigma dV` on the actual deformed mesh (so the
50  // implicit "wrap F" is F_actual, NOT the F-bar'd F).
51  //
52  // The R4 algebra for `_pk1_jacobian` and `_pk1_jacobian_bypass_fbar` is Jacobian-only;
53  // the wrap to `_pk1_stress` is not. Gate accordingly.
54  const bool need_jacobian = _fe_problem.currentlyComputingJacobian() ||
57  {
58  // F_ust^{-1} and det(F_ust) are published once per qp by the strain calculator; reuse them
59  // instead of recomputing a 3x3 inverse + determinant here on every residual/Jacobian sweep.
60  const RankTwoTensor & F_ust_inv = _F_ust_inv[_qp];
61  const RankTwoTensor F_ust_invT = F_ust_inv.transpose();
62  const Real det_F_ust = _F_ust_det[_qp];
63  _pk1_stress[_qp] = det_F_ust * _cauchy_stress[_qp] * F_ust_invT;
64 
65  if (!need_jacobian)
66  return;
67 
68  usingTensorIndices(i_, j_, k_, l_);
69  // Geometric pieces of dPK1/d(F_ust) (independent of F-bar):
70  const RankFourTensor geom = _pk1_stress[_qp].outerProduct(F_ust_invT) -
71  _pk1_stress[_qp].times<i_, l_, j_, k_>(F_ust_inv);
72  // sigma chain WITHOUT the F-bar `_d_F_stab_d_F_ust` factor -- for specialty kernels
73  // whose coupled variable adds to F_ust AFTER F-bar (WPS strain_zz, homogenization
74  // macro_grad), so the perturbation bypasses F-bar's chain.
75  const RankFourTensor sigma_chain_no_fbar =
77  .singleProductJ(F_ust_inv);
78  _pk1_jacobian_bypass_fbar[_qp] = geom + sigma_chain_no_fbar;
79  // sigma chain WITH the F-bar chain -- the default `_pk1_jacobian` for disp Jacobian.
83  .singleProductJ(F_ust_inv);
84  }
85  else
86  {
87  // Small kinematics: PK1 = sigma (no wrap). The F-bar chain enters via
88  // `_d_F_stab_d_F_ust` for the disp Jacobian path; specialty paths bypass it.
90  if (!need_jacobian)
91  return;
94  }
95 }
const MaterialProperty< RankFourTensor > & _d_F_stab_d_F_ust
d(F_stab)/d(F_ust).
FEProblemBase & _fe_problem
bool _large_kinematics
If true use large deformations.
const MaterialProperty< Real > & _F_ust_det
virtual void computeQpPK1Stress()
Wrap the Cauchy stress to get the PK stress.
MaterialProperty< RankTwoTensor > & _pk1_stress
The 1st Piola-Kirchhoff stress.
const bool & currentlyComputingResidualAndJacobian() const
unsigned int _qp
MaterialProperty< RankFourTensor > & _pk1_jacobian
The derivative of the 1st PK stress wrt the deformation gradient (F that the stress material consumes...
MaterialProperty< RankFourTensor > & _pk1_jacobian_bypass_fbar
Variant of _pk1_jacobian computed WITHOUT the F-bar chain factor _d_F_stab_d_F_ust in the sigma-via-d...
ComputeLagrangianStressCauchy(const InputParameters &parameters)
const MaterialProperty< RankFourTensor > & _d_deformation_gradient_increment_d_F
d(spatial velocity gradient increment)/d(F_stab).
MaterialProperty< RankTwoTensor > & _cauchy_stress
The Cauchy stress.
Provide stresses in the form required for the Lagrangian kernels.
virtual void computeQpCauchyStress()=0
Provide for the actual Cauchy stress update (just cauchy)
const MaterialProperty< RankTwoTensor > & _F_ust_inv
Inverse and determinant of the unstabilized deformation gradient, published by the strain calculator ...
RankTwoTensorTempl< Real > transpose() const
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static InputParameters validParams()
void addClassDescription(const std::string &doc_string)
const bool & currentlyComputingJacobian() const
MaterialProperty< RankFourTensor > & _cauchy_jacobian
The derivative of the Cauchy stress wrt the increment in the spatial velocity gradient.
virtual void computeQpStressUpdate() override
Calculate the stress update to provide both measures (cauchy and pk)