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 "ADPressurizedCrack.h" 6 : 7 : registerMooseObject("raccoonApp", ADPressurizedCrack); 8 : 9 : InputParameters 10 146 : ADPressurizedCrack::validParams() 11 : { 12 146 : InputParameters params = ADKernelValue::validParams(); 13 146 : params += BaseNameInterface::validParams(); 14 146 : params.addClassDescription("This class computes the body force term from pressurized phase-field " 15 : "fracture. The weak form is $(w, p \\grad d)$."); 16 : 17 292 : params.addRequiredParam<MaterialPropertyName>("pressure", "pressure inside the crack"); 18 292 : params.addRequiredCoupledVar("phase_field", "coupled damage variable"); 19 292 : params.addRequiredParam<unsigned int>("component", 20 : "An integer corresponding to the direction " 21 : "the variable this kernel acts in. (0 for x, " 22 : "1 for y, 2 for z)"); 23 292 : params.addParam<MaterialPropertyName>("indicator_function", 24 : "I" 25 : "The indicator function"); 26 146 : return params; 27 0 : } 28 : 29 4 : ADPressurizedCrack::ADPressurizedCrack(const InputParameters & parameters) 30 : : ADKernelValue(parameters), 31 : BaseNameInterface(parameters), 32 : DerivativeMaterialPropertyNameInterface(), 33 4 : _comp(getParam<unsigned int>("component")), 34 8 : _p(getADMaterialProperty<Real>(prependBaseName("pressure", true))), 35 4 : _grad_d(adCoupledGradient("phase_field")), 36 16 : _dI_dd(getADMaterialProperty<Real>(derivativePropertyNameFirst( 37 8 : getParam<MaterialPropertyName>("indicator_function"), getVar("phase_field", 0)->name()))) 38 : { 39 4 : } 40 : 41 : ADReal 42 406400 : ADPressurizedCrack::precomputeQpResidual() 43 : { 44 406400 : return _p[_qp] * _grad_d[_qp](_comp) * _dI_dd[_qp]; 45 : }