https://mooseframework.inl.gov
ADCHSoretMobility.C
Go to the documentation of this file.
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 
16 {
18  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  params.addRequiredCoupledVar("T", "The temperature variable");
22  params.addRequiredParam<MaterialPropertyName>("mobility", "The mobility property name");
23  return params;
24 }
25 
27  : ADKernel(parameters),
28  _T(adCoupledValue("T")),
29  _grad_T(adCoupledGradient("T")),
30  _mobility(getADMaterialProperty<Real>("mobility"))
31 {
32 }
33 
34 ADReal
36 {
37  return _mobility[_qp] * _grad_T[_qp] / _T[_qp] * _grad_test[_i][_qp];
38 }
Adds contribution due to thermo-migration to the Cahn-Hilliard equation.
const ADMaterialProperty< Real > & _mobility
const ADTemplateVariableTestGradient< T > & _grad_test
registerMooseObject("PhaseFieldApp", ADCHSoretMobility)
ADCHSoretMobility(const InputParameters &parameters)
DualNumber< Real, DNDerivativeType, true > ADReal
void addRequiredParam(const std::string &name, const std::string &doc_string)
virtual ADReal computeQpResidual()
const ADVariableGradient & _grad_T
unsigned int _i
static InputParameters validParams()
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const ADVariableValue & _T
void addClassDescription(const std::string &doc_string)
static InputParameters validParams()
unsigned int _qp