Line data Source code
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 : 10 : #include "ComputeLagrangianStressPK2.h" 11 : 12 : InputParameters 13 328 : ComputeLagrangianStressPK2::validParams() 14 : { 15 328 : InputParameters params = ComputeLagrangianStressPK1::validParams(); 16 328 : return params; 17 : } 18 : 19 246 : ComputeLagrangianStressPK2::ComputeLagrangianStressPK2(const InputParameters & parameters) 20 : : ComputeLagrangianStressPK1(parameters), 21 246 : _E(declareProperty<RankTwoTensor>(_base_name + "green_lagrange_strain")), 22 246 : _S(declareProperty<RankTwoTensor>(_base_name + "pk2_stress")), 23 492 : _C(declareProperty<RankFourTensor>(_base_name + "pk2_jacobian")) 24 : { 25 246 : } 26 : 27 : void 28 6663024 : ComputeLagrangianStressPK2::computeQpPK1Stress() 29 : { 30 : // Calculate the green-lagrange strain for the benefit of the subclasses 31 6663024 : _E[_qp] = 0.5 * (_F[_qp].transpose() * _F[_qp] - RankTwoTensor::Identity()); 32 : 33 : // PK2 update 34 6663024 : computeQpPK2Stress(); 35 : 36 : // Complicated wrapping, see documentation 37 6663024 : if (_large_kinematics) 38 : { 39 3545216 : _pk1_stress[_qp] = _F[_qp] * _S[_qp]; 40 : usingTensorIndices(i_, j_, k_, l_); 41 : RankFourTensor dE = 42 3545216 : 0.5 * (RankTwoTensor::Identity().times<i_, l_, j_, k_>(_F[_qp].transpose()) + 43 10635648 : _F[_qp].transpose().times<i_, k_, j_, l_>(RankTwoTensor::Identity())); 44 : 45 7090432 : _pk1_jacobian[_qp] = RankTwoTensor::Identity().times<i_, k_, j_, l_>(_S[_qp].transpose()) + 46 7090432 : (_C[_qp] * dE).singleProductI(_F[_qp]); 47 : } 48 : // Small deformations all are equivalent 49 : else 50 : { 51 3117808 : _pk1_stress[_qp] = _S[_qp]; 52 3117808 : _pk1_jacobian[_qp] = _C[_qp]; 53 : } 54 6663024 : }