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 "Compute1DIncrementalStrain.h" 11 : 12 : #include "libmesh/quadrature.h" 13 : 14 : InputParameters 15 72 : Compute1DIncrementalStrain::validParams() 16 : { 17 72 : InputParameters params = ComputeIncrementalStrain::validParams(); 18 72 : params.addClassDescription("Compute strain increment for small strains in 1D problems."); 19 : 20 72 : return params; 21 0 : } 22 : 23 54 : Compute1DIncrementalStrain::Compute1DIncrementalStrain(const InputParameters & parameters) 24 54 : : ComputeIncrementalStrain(parameters) 25 : { 26 54 : } 27 : 28 : void 29 6000 : Compute1DIncrementalStrain::computeTotalStrainIncrement(RankTwoTensor & total_strain_increment) 30 : { 31 : // Deformation gradient calculation for 1D problems 32 : auto A = RankTwoTensor::initializeFromRows( 33 6000 : (*_grad_disp[0])[_qp], (*_grad_disp[1])[_qp], (*_grad_disp[2])[_qp]); 34 : 35 : // Old Deformation gradient 36 : auto Fbar = RankTwoTensor::initializeFromRows( 37 6000 : (*_grad_disp_old[0])[_qp], (*_grad_disp_old[1])[_qp], (*_grad_disp_old[2])[_qp]); 38 : 39 : // Compute the displacement gradient dUy/dy and dUz/dz value for 1D problems 40 6000 : A(1, 1) = computeGradDispYY(); 41 6000 : A(2, 2) = computeGradDispZZ(); 42 : 43 6000 : Fbar(1, 1) = computeGradDispYYOld(); 44 6000 : Fbar(2, 2) = computeGradDispZZOld(); 45 : 46 : // Gauss point deformation gradient 47 6000 : _deformation_gradient[_qp] = A; 48 6000 : _deformation_gradient[_qp].addIa(1.0); 49 : 50 6000 : A -= Fbar; // very nearly A = gradU - gradUold, adapted to cylindrical coords 51 : 52 6000 : total_strain_increment = 0.5 * (A + A.transpose()); 53 6000 : }