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