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 "ComputeHypoelasticStVenantKirchhoffStress.h" 11 : 12 : registerMooseObject("TensorMechanicsApp", ComputeHypoelasticStVenantKirchhoffStress); 13 : 14 : InputParameters 15 36 : ComputeHypoelasticStVenantKirchhoffStress::validParams() 16 : { 17 36 : InputParameters params = ComputeLagrangianObjectiveStress::validParams(); 18 36 : params.addClassDescription( 19 : "Calculate a small strain elastic stress that is equivalent to the hyperelastic St. " 20 : "Venant-Kirchhoff model if integrated using the Truesdell rate."); 21 : 22 72 : params.addParam<MaterialPropertyName>( 23 : "elasticity_tensor", "elasticity_tensor", "The name of the elasticity tensor."); 24 : 25 36 : return params; 26 0 : } 27 : 28 27 : ComputeHypoelasticStVenantKirchhoffStress::ComputeHypoelasticStVenantKirchhoffStress( 29 27 : const InputParameters & parameters) 30 : : ComputeLagrangianObjectiveStress(parameters), 31 27 : _elasticity_tensor(getMaterialProperty<RankFourTensor>( 32 54 : getParam<MaterialPropertyName>(_base_name + "elasticity_tensor"))), 33 81 : _def_grad(getMaterialProperty<RankTwoTensor>(_base_name + "deformation_gradient")) 34 : { 35 27 : } 36 : 37 : void 38 1953024 : ComputeHypoelasticStVenantKirchhoffStress::computeQpSmallStress() 39 : { 40 : usingTensorIndices(i, j, k, l); 41 : 42 : // The increment in the spatial velocity gradient 43 1953024 : RankTwoTensor dL = _strain_increment[_qp] + _vorticity_increment[_qp]; 44 : 45 : // If small kinematics, it falls back to the grade-zero hypoelasticity 46 1953024 : if (!_large_kinematics) 47 : { 48 976384 : _small_stress[_qp] = _small_stress_old[_qp] + _elasticity_tensor[_qp] * dL; 49 976384 : _small_jacobian[_qp] = _elasticity_tensor[_qp]; 50 : return; 51 : } 52 : 53 : // Large kinematics: 54 : // First push forward the elasticity tensor 55 976640 : const RankTwoTensor F = _def_grad[_qp]; 56 976640 : const Real J = F.det(); 57 976640 : const RankFourTensor FF = F.times<i, k, j, l>(F); 58 976640 : const RankFourTensor FtFt = F.times<k, i, l, j>(F); 59 976640 : const RankFourTensor C0 = _elasticity_tensor[_qp]; 60 976640 : const RankFourTensor C = FF * C0 * FtFt / J; 61 : 62 : // Update the small stress 63 976640 : const RankTwoTensor dS = C * dL; 64 976640 : _small_stress[_qp] = _small_stress_old[_qp] + dS; 65 : 66 : // Compute the small Jacobian 67 976640 : if (_fe_problem.currentlyComputingJacobian()) 68 : { 69 3632 : const RankFourTensor dFddL = _inv_df[_qp].inverse().times<i, k, l, j>(F); 70 3632 : _small_jacobian[_qp] = 71 3632 : C + 72 3632 : (dFddL.singleProductJ((C0.tripleProductJkl(F, F, F) * dL).transpose()) + 73 7264 : dFddL.singleProductJ(C0.tripleProductIkl(F, F, F) * dL).transposeIj() + 74 7264 : FF * C0.singleProductL(F * dL).transposeKl() * dFddL + 75 7264 : FF * C0.singleProductK(dL.transpose() * F) * dFddL) / 76 3632 : J - 77 7264 : dS.outerProduct(_inv_def_grad[_qp].transpose().initialContraction(dFddL)); 78 : } 79 : }