https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ComputeLagrangianStressPK2.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
18
20 : ComputeLagrangianStressPK1(parameters),
21 _E(declareProperty<RankTwoTensor>(_base_name + "green_lagrange_strain")),
22 _pk2_stress(declareProperty<RankTwoTensor>(_base_name + "pk2_stress")),
23 _pk2_jacobian(declareProperty<RankFourTensor>(_base_name + "pk2_jacobian"))
24{
25}
26
27void
29{
30 // Green-Lagrange strain uses the F-bar-stabilized F (`_F` from the strain calc) so
31 // the constitutive law receives the stabilized strain -- F-bar's purpose is precisely
32 // to feed a volumetrically-corrected strain into the constitutive update.
33 _E[_qp] = 0.5 * (_stabilized_deformation_gradient[_qp].transpose() *
36
37 // PK2 update (constitutive). This populates `_pk2_stress` (always needed) and `_pk2_jacobian`
38 // (= dPK2/dE, Jacobian-only). PK2-subclass implementers that want to skip `_pk2_jacobian` on
39 // residual sweeps can check `_fe_problem.currentlyComputingJacobian()` themselves; the wrap
40 // below doesn't read `_pk2_jacobian` in the residual path.
42
43 const bool need_jacobian = _fe_problem.currentlyComputingJacobian() ||
45
46 // The constitutive PK1 stress Pbar = Fbar Sbar and dPbar/dFbar, with
47 // Fbar = `_stabilized_deformation_gradient`. The PK1 base pushes them forward with Fbar to the
48 // Cauchy stress.
50 {
52 const RankTwoTensor & S_bar = _pk2_stress[_qp];
53 _pk1_stress[_qp] = F_bar * S_bar;
54 if (!need_jacobian)
55 return;
56
57 usingTensorIndices(i_, j_, k_, l_);
58 // dE/dFbar
59 const RankFourTensor dE_dF_bar =
60 0.5 * (RankTwoTensor::Identity().times<i_, l_, j_, k_>(F_bar.transpose()) +
61 F_bar.transpose().times<i_, k_, j_, l_>(RankTwoTensor::Identity()));
62
63 // dPbar/dFbar = dFbar/dFbar * Sbar + Fbar * dSbar/dE * dE/dFbar
64 // dFbar/dFbar * Sbar gives I x Sbar^T (per the existing template, with Sbar^T because
65 // Pbar = Fbar * Sbar and we differentiate Fbar).
66 _pk1_jacobian[_qp] = RankTwoTensor::Identity().times<i_, k_, j_, l_>(S_bar.transpose()) +
67 (_pk2_jacobian[_qp] * dE_dF_bar).singleProductI(F_bar);
68 }
69 // Small deformations: PK1 = PK2 = sigma
70 else
71 {
73 if (!need_jacobian)
74 return;
76 }
77}
MaterialProperty< RankFourTensor > & _pk1_jacobian
The derivative of the 1st PK stress wrt the deformation gradient (F that the stress material consumes...
MaterialProperty< RankTwoTensor > & _pk1_stress
The 1st Piola-Kirchhoff stress.
bool _large_kinematics
If true use large deformations.
Native interface for providing the 1st Piola Kirchhoff stress.
static InputParameters validParams()
const MaterialProperty< RankTwoTensor > & _stabilized_deformation_gradient
F-bar-stabilized deformation gradient (= the strain calc's published _F).
ComputeLagrangianStressPK2(const InputParameters &parameters)
virtual void computeQpPK2Stress()=0
Provide the PK2 stress and dS/dE.
static InputParameters validParams()
virtual void computeQpPK1Stress() override
Wrap PK2 -> PK1.
MaterialProperty< RankTwoTensor > & _pk2_stress
2nd PK stress
MaterialProperty< RankTwoTensor > & _E
Green-Lagrange strain.
MaterialProperty< RankFourTensor > & _pk2_jacobian
2nd PK tangent (dS/dE)
unsigned int _qp
FEProblemBase & _fe_problem
RankFourTensorTempl< T > times(const RankTwoTensorTempl< T > &b) const
RankTwoTensorTempl< T > transpose() const
static RankTwoTensorTempl Identity()
const bool & currentlyComputingJacobian() const
const bool & currentlyComputingResidualAndJacobian() const