Line data Source code
1 : //* This file is part of the MOOSE framework 2 : //* https://www.mooseframework.org 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 2384 : ComputeLagrangianStressCauchy::validParams() 14 : { 15 2384 : InputParameters params = ComputeLagrangianStressBase::validParams(); 16 : 17 2384 : params.addClassDescription("Stress update based on the Cauchy stress"); 18 : 19 2384 : return params; 20 0 : } 21 : 22 1788 : ComputeLagrangianStressCauchy::ComputeLagrangianStressCauchy(const InputParameters & parameters) 23 : : ComputeLagrangianStressBase(parameters), 24 1788 : _inv_df(getMaterialPropertyByName<RankTwoTensor>(_base_name + 25 : "inverse_incremental_deformation_gradient")), 26 1788 : _inv_def_grad( 27 1788 : getMaterialPropertyByName<RankTwoTensor>(_base_name + "inverse_deformation_gradient")), 28 5364 : _F(getMaterialPropertyByName<RankTwoTensor>(_base_name + "deformation_gradient")) 29 : { 30 1788 : } 31 : 32 : void 33 38784580 : ComputeLagrangianStressCauchy::computeQpStressUpdate() 34 : { 35 38784580 : computeQpCauchyStress(); 36 38784580 : computeQpPK1Stress(); // This could be "switched" 37 38784580 : } 38 : 39 : void 40 38784580 : ComputeLagrangianStressCauchy::computeQpPK1Stress() 41 : { 42 : // Actually do the (annoying) wrapping 43 38784580 : if (_large_kinematics) 44 : { 45 17913852 : _pk1_stress[_qp] = _F[_qp].det() * _cauchy_stress[_qp] * _inv_def_grad[_qp].transpose(); 46 : 47 : usingTensorIndices(i_, j_, k_, l_); 48 35827704 : _pk1_jacobian[_qp] = _pk1_stress[_qp].outerProduct(_inv_def_grad[_qp].transpose()); 49 17913852 : _pk1_jacobian[_qp] -= _pk1_stress[_qp].times<i_, l_, j_, k_>(_inv_def_grad[_qp]); 50 17913852 : _pk1_jacobian[_qp] += 51 17913852 : _F[_qp].det() * _cauchy_jacobian[_qp].tripleProductJkl( 52 35827704 : _inv_def_grad[_qp], _inv_df[_qp].transpose(), _inv_def_grad[_qp]); 53 : } 54 : else 55 : { 56 20870728 : _pk1_stress[_qp] = _cauchy_stress[_qp]; 57 20870728 : _pk1_jacobian[_qp] = _cauchy_jacobian[_qp]; 58 : } 59 38784580 : }