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 "ComputePlaneSmallStrainNOSPD.h" 11 : 12 : registerMooseObject("PeridynamicsApp", ComputePlaneSmallStrainNOSPD); 13 : 14 : InputParameters 15 465 : ComputePlaneSmallStrainNOSPD::validParams() 16 : { 17 465 : InputParameters params = ComputeSmallStrainNOSPD::validParams(); 18 465 : params.addClassDescription( 19 : "Class for computing nodal quantities for residual and jacobian calculation " 20 : "for peridynamic correspondence models under planar small strain assumptions"); 21 : 22 930 : params.addCoupledVar("scalar_out_of_plane_strain", 23 : "Scalar out-of-plane strain variable for generalized plane strain"); 24 930 : params.addCoupledVar("out_of_plane_strain", 25 : "Nonlinear out-of-plane strain variable for plane stress condition"); 26 : 27 465 : return params; 28 0 : } 29 : 30 366 : ComputePlaneSmallStrainNOSPD::ComputePlaneSmallStrainNOSPD(const InputParameters & parameters) 31 : : ComputeSmallStrainNOSPD(parameters), 32 366 : _scalar_out_of_plane_strain_coupled(isCoupledScalar("scalar_out_of_plane_strain")), 33 732 : _scalar_out_of_plane_strain(_scalar_out_of_plane_strain_coupled 34 366 : ? coupledScalarValue("scalar_out_of_plane_strain") 35 : : _zero), 36 366 : _out_of_plane_strain_coupled(isCoupled("out_of_plane_strain")), 37 732 : _out_of_plane_strain(_out_of_plane_strain_coupled ? coupledValue("out_of_plane_strain") : _zero) 38 : { 39 366 : } 40 : 41 : void 42 2175672 : ComputePlaneSmallStrainNOSPD::computeQpTotalStrain() 43 : { 44 : // the green-lagrange strain tensor 45 2175672 : _total_strain[_qp] = 0.5 * (_deformation_gradient[_qp].transpose() + _deformation_gradient[_qp]) - 46 2175672 : RankTwoTensor(RankTwoTensor::initIdentity); 47 2175672 : _total_strain[_qp](2, 2) = computeOutOfPlaneStrain(); 48 2175672 : } 49 : 50 : Real 51 2175672 : ComputePlaneSmallStrainNOSPD::computeOutOfPlaneStrain() 52 : { 53 2175672 : if (_scalar_out_of_plane_strain_coupled) 54 287140 : return _scalar_out_of_plane_strain[0]; 55 : else 56 1888532 : return _out_of_plane_strain[_qp]; 57 : }