https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ComputeLagrangianStressCustomPK2.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 params.addRequiredParam<MaterialPropertyName>("custom_pk2_stress", "The name of the PK2 stress.");
19 params.addRequiredParam<MaterialPropertyName>(
20 "custom_pk2_jacobian", "The name of the PK2 Jacobian (w.r.t. the deformation gradient).");
21 return params;
22}
23
25 const InputParameters & parameters)
26 : ComputeLagrangianStressPK1(parameters),
27 _pk2(getMaterialProperty<RankTwoTensor>("custom_pk2_stress")),
28 _dpk2_dF(getMaterialProperty<RankFourTensor>("custom_pk2_jacobian"))
29{
30}
31
32void
34{
35 // Derives _large_kinematics from the strain calculator's LARGE_KINEMATICS guarantee.
37
39 mooseError("This material requires large kinematics; set large_kinematics = true on the "
40 "ComputeLagrangianStrain calculator.");
41}
42
43void
45{
46 // Pbar = Fbar * Sbar, with Fbar the strain calc's F-bar'd `_F` (which is what NEML2 sees
47 // as `forces/F`) and Sbar = PK2(Fbar). The PK1 base pushes it forward with Fbar to the Cauchy
48 // stress.
50 const RankTwoTensor & S_bar = _pk2[_qp];
51 _pk1_stress[_qp] = F_bar * S_bar;
52
53 // The R4 algebra for `_pk1_jacobian` is read only on Jacobian sweeps; skip it on
54 // residual-only sweeps.
57 return;
58
59 // dPbar/dFbar = del_ik Sbar_lj + Fbar * dSbar/dFbar.
60 usingTensorIndices(i_, j_, k_, l_);
61 const auto I = RankTwoTensor::Identity();
63 I.template times<i_, k_, j_, l_>(S_bar.transpose()) + _dpk2_dF[_qp].singleProductI(F_bar);
64}
registerMooseObject("SolidMechanicsApp", ComputeLagrangianStressCustomPK2)
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.
virtual void initialSetup() override
Derive _large_kinematics from the strain calculator's LARGE_KINEMATICS guarantee.
bool _large_kinematics
If true use large deformations.
Adapt a custom-defined PK2 stress and its Jacobian to provide the PK1 stress and its Jacobian.
ComputeLagrangianStressCustomPK2(const InputParameters &parameters)
const MaterialProperty< RankTwoTensor > & _pk2
2nd PK stress
void computeQpPK1Stress() override
Provide for the actual PK stress update (just PK1)
void initialSetup() override
Derive _large_kinematics from the strain calculator's LARGE_KINEMATICS guarantee.
const MaterialProperty< RankFourTensor > & _dpk2_dF
2nd PK tangent dPK2/d(F_stab).
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).
void addRequiredParam(const std::string &name, const std::string &doc_string)
unsigned int _qp
FEProblemBase & _fe_problem
void mooseError(Args &&... args) const
RankTwoTensorTempl< T > transpose() const
static RankTwoTensorTempl Identity()
const bool & currentlyComputingJacobian() const
const bool & currentlyComputingResidualAndJacobian() const