Line data Source code
1 : //* This file is part of the RACCOON application 2 : //* being developed at Dolbow lab at Duke University 3 : //* http://dolbow.pratt.duke.edu 4 : 5 : #include "LargeDeformationJIntegral.h" 6 : 7 : registerMooseObject("raccoonApp", LargeDeformationJIntegral); 8 : 9 : InputParameters 10 138 : LargeDeformationJIntegral::validParams() 11 : { 12 138 : InputParameters params = SideIntegralPostprocessor::validParams(); 13 138 : params += BaseNameInterface::validParams(); 14 138 : params.addClassDescription( 15 : "This class computes the J integral for a phase-field model of fracture"); 16 : 17 276 : params.addRequiredParam<RealVectorValue>("J_direction", "direction of J integral"); 18 276 : params.addRequiredParam<MaterialPropertyName>("strain_energy_density", 19 : "The strain energy density"); 20 138 : return params; 21 0 : } 22 : 23 0 : LargeDeformationJIntegral::LargeDeformationJIntegral(const InputParameters & parameters) 24 : : SideIntegralPostprocessor(parameters), 25 : BaseNameInterface(parameters), 26 0 : _stress(getADMaterialPropertyByName<RankTwoTensor>(prependBaseName("stress"))), 27 0 : _psie(getADMaterialPropertyByName<Real>(prependBaseName("strain_energy_density", true))), 28 0 : _Fm(getADMaterialPropertyByName<RankTwoTensor>( 29 0 : prependBaseName("mechanical_deformation_gradient"))), 30 0 : _t(getParam<RealVectorValue>("J_direction")) 31 : { 32 0 : } 33 : 34 : Real 35 0 : LargeDeformationJIntegral::computeQpIntegral() 36 : { 37 0 : ADRankTwoTensor I2(ADRankTwoTensor::initIdentity); 38 0 : ADRankTwoTensor H = _Fm[_qp] - I2; 39 0 : ADRankTwoTensor PK1 = _Fm[_qp].det() * _stress[_qp] * _Fm[_qp].inverse().transpose(); 40 0 : ADRankTwoTensor Sigma = _psie[_qp] * I2 - H.transpose() * PK1; 41 0 : return raw_value(_t * Sigma * _normals[_qp]); 42 : }