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 "ADACInterfaceKobayashi1.h" 11 : 12 : registerMooseObject("PhaseFieldApp", ADACInterfaceKobayashi1); 13 : 14 : InputParameters 15 23 : ADACInterfaceKobayashi1::validParams() 16 : { 17 23 : InputParameters params = ADKernelGrad::validParams(); 18 23 : params.addClassDescription("Anisotropic gradient energy Allen-Cahn Kernel Part 1"); 19 46 : params.addParam<MaterialPropertyName>("mob_name", "L", "The mobility used with the kernel"); 20 46 : params.addParam<MaterialPropertyName>("eps_name", "eps", "The anisotropic interface parameter"); 21 46 : params.addParam<MaterialPropertyName>( 22 : "deps_name", 23 : "deps", 24 : "The derivative of the anisotropic interface parameter with respect to angle"); 25 23 : return params; 26 0 : } 27 : 28 12 : ADACInterfaceKobayashi1::ADACInterfaceKobayashi1(const InputParameters & parameters) 29 : : ADKernelGrad(parameters), 30 12 : _mob(getADMaterialProperty<Real>("mob_name")), 31 24 : _eps(getADMaterialProperty<Real>("eps_name")), 32 36 : _deps(getADMaterialProperty<Real>("deps_name")) 33 : { 34 12 : } 35 : 36 : ADRealGradient 37 1667072 : ADACInterfaceKobayashi1::precomputeQpResidual() 38 : { 39 : // Set modified gradient vector 40 1667072 : const ADRealGradient v(-_grad_u[_qp](1), _grad_u[_qp](0), 0); 41 : 42 : // Define anisotropic interface residual 43 1667072 : return _eps[_qp] * _deps[_qp] * _mob[_qp] * v; 44 : }