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 "ADCHSoretMobility.h" 11 : 12 : registerMooseObject("PhaseFieldApp", ADCHSoretMobility); 13 : 14 : InputParameters 15 32 : ADCHSoretMobility::validParams() 16 : { 17 32 : InputParameters params = ADKernel::validParams(); 18 32 : params.addClassDescription("Adds contribution due to thermo-migration to the Cahn-Hilliard " 19 : "equation using a concentration 'u', temperature 'T', and thermal " 20 : "mobility 'mobility' (in units of length squared per time)."); 21 64 : params.addRequiredCoupledVar("T", "The temperature variable"); 22 64 : params.addRequiredParam<MaterialPropertyName>("mobility", "The mobility property name"); 23 32 : return params; 24 0 : } 25 : 26 17 : ADCHSoretMobility::ADCHSoretMobility(const InputParameters & parameters) 27 : : ADKernel(parameters), 28 17 : _T(adCoupledValue("T")), 29 17 : _grad_T(adCoupledGradient("T")), 30 51 : _mobility(getADMaterialProperty<Real>("mobility")) 31 : { 32 17 : } 33 : 34 : ADReal 35 80520 : ADCHSoretMobility::computeQpResidual() 36 : { 37 80520 : return _mobility[_qp] * _grad_T[_qp] / _T[_qp] * _grad_test[_i][_qp]; 38 : }