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 "ADThermoDiffusion.h" 11 : 12 : registerMooseObject("MiscApp", ADThermoDiffusion); 13 : 14 : InputParameters 15 54 : ADThermoDiffusion::validParams() 16 : { 17 54 : InputParameters params = ADKernel::validParams(); 18 54 : params.addClassDescription( 19 : "Calculates diffusion due to temperature gradient and Soret Coefficient"); 20 108 : params.addRequiredCoupledVar("temperature", "The coupled temperature variable."); 21 108 : params.addParam<MaterialPropertyName>("soret_coefficient", 22 : "soret_coefficient", 23 : "The name of the Soret coefficient material property"); 24 54 : return params; 25 0 : } 26 : 27 29 : ADThermoDiffusion::ADThermoDiffusion(const InputParameters & parameters) 28 : : ADKernel(parameters), 29 29 : _grad_temp(adCoupledGradient("temperature")), 30 87 : _soret_coeff(getADMaterialProperty<Real>("soret_coefficient")) 31 : { 32 29 : } 33 : 34 : ADReal 35 1448800 : ADThermoDiffusion::computeQpResidual() 36 : { 37 1448800 : return _soret_coeff[_qp] * _grad_temp[_qp] * _grad_test[_i][_qp]; 38 : }