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 "ADPFFDiffusion.h" 6 : 7 : registerMooseObject("raccoonApp", ADPFFDiffusion); 8 : 9 : InputParameters 10 190 : ADPFFDiffusion::validParams() 11 : { 12 190 : InputParameters params = ADKernel::validParams(); 13 190 : params += BaseNameInterface::validParams(); 14 190 : params.addClassDescription("The diffusion term in the phase-field evolution equation. The weak " 15 : "form is $(\\grad w, \\dfrac{2\\Gc l}{c_0} \\grad d)$."); 16 : 17 380 : params.addParam<MaterialPropertyName>( 18 : "fracture_toughness", "Gc", "The fracture toughness $\\Gc$"); 19 380 : params.addParam<MaterialPropertyName>( 20 : "normalization_constant", "c0", "The normalization constant $c_0$"); 21 380 : params.addParam<MaterialPropertyName>( 22 : "regularization_length", "l", "The phase-field regularization length"); 23 190 : return params; 24 0 : } 25 : 26 26 : ADPFFDiffusion::ADPFFDiffusion(const InputParameters & parameters) 27 : : ADKernel(parameters), 28 : BaseNameInterface(parameters), 29 78 : _Gc(getADMaterialProperty<Real>(prependBaseName("fracture_toughness", true))), 30 78 : _c0(getADMaterialProperty<Real>(prependBaseName("normalization_constant", true))), 31 78 : _l(getADMaterialProperty<Real>(prependBaseName("regularization_length", true))) 32 : { 33 26 : } 34 : 35 : ADReal 36 32536040 : ADPFFDiffusion::computeQpResidual() 37 : { 38 32536040 : ADReal value = _grad_test[_i][_qp] * _grad_u[_qp]; 39 : 40 65072080 : return 2 * _Gc[_qp] * _l[_qp] / _c0[_qp] * value; 41 : }