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 "ComputeLagrangianStressCauchy.h" 11 : 12 : InputParameters 13 4956 : ComputeLagrangianStressCauchy::validParams() 14 : { 15 4956 : InputParameters params = ComputeLagrangianStressBase::validParams(); 16 : 17 4956 : params.addClassDescription("Stress update based on the Cauchy stress"); 18 : 19 4956 : return params; 20 0 : } 21 : 22 3717 : ComputeLagrangianStressCauchy::ComputeLagrangianStressCauchy(const InputParameters & parameters) 23 : : ComputeLagrangianStressBase(parameters), 24 3717 : _inv_df(getMaterialPropertyByName<RankTwoTensor>(_base_name + 25 : "inverse_incremental_deformation_gradient")), 26 3717 : _inv_def_grad( 27 3717 : getMaterialPropertyByName<RankTwoTensor>(_base_name + "inverse_deformation_gradient")), 28 11151 : _F(getMaterialPropertyByName<RankTwoTensor>(_base_name + "deformation_gradient")) 29 : { 30 3717 : } 31 : 32 : void 33 64746612 : ComputeLagrangianStressCauchy::computeQpStressUpdate() 34 : { 35 64746612 : computeQpCauchyStress(); 36 64746612 : computeQpPK1Stress(); // This could be "switched" 37 64746612 : } 38 : 39 : void 40 64746612 : ComputeLagrangianStressCauchy::computeQpPK1Stress() 41 : { 42 : // Actually do the (annoying) wrapping 43 64746612 : if (_large_kinematics) 44 : { 45 30672828 : _pk1_stress[_qp] = _F[_qp].det() * _cauchy_stress[_qp] * _inv_def_grad[_qp].transpose(); 46 : 47 : usingTensorIndices(i_, j_, k_, l_); 48 61345656 : _pk1_jacobian[_qp] = _pk1_stress[_qp].outerProduct(_inv_def_grad[_qp].transpose()); 49 30672828 : _pk1_jacobian[_qp] -= _pk1_stress[_qp].times<i_, l_, j_, k_>(_inv_def_grad[_qp]); 50 30672828 : _pk1_jacobian[_qp] += 51 30672828 : _F[_qp].det() * _cauchy_jacobian[_qp].tripleProductJkl( 52 61345656 : _inv_def_grad[_qp], _inv_df[_qp].transpose(), _inv_def_grad[_qp]); 53 : } 54 : else 55 : { 56 34073784 : _pk1_stress[_qp] = _cauchy_stress[_qp]; 57 34073784 : _pk1_jacobian[_qp] = _cauchy_jacobian[_qp]; 58 : } 59 64746612 : }