https://mooseframework.inl.gov
ADGrainGrowth.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 "ADGrainGrowth.h"
11 
12 registerMooseObject("PhaseFieldApp", ADGrainGrowth);
13 
16 {
18  params.addClassDescription("Grain-Boundary model poly-crystalline interface Allen-Cahn Kernel");
19  return params;
20 }
21 
23  : ADGrainGrowthBase(parameters), _gamma(getADMaterialProperty<Real>("gamma_asymm"))
24 {
25 }
26 
27 ADReal
29 {
30  // Sum all other order parameters
31  ADReal SumEtaj = 0.0;
32  for (unsigned int i = 0; i < _op_num; ++i)
33  SumEtaj += (*_vals[i])[_qp] * (*_vals[i])[_qp];
34 
35  return _mu[_qp] * (_u[_qp] * _u[_qp] * _u[_qp] - _u[_qp] + 2.0 * _gamma[_qp] * _u[_qp] * SumEtaj);
36 }
const ADMaterialProperty< Real > & _mu
virtual ADReal computeDFDOP()
Compute the derivative of the bulk free energy w.r.t the order parameter.
Definition: ADGrainGrowth.C:28
This kernel calculates the residual for grain growth for a single phase, poly-crystal system...
Definition: ADGrainGrowth.h:20
DualNumber< Real, DNDerivativeType, true > ADReal
ADGrainGrowth(const InputParameters &parameters)
Definition: ADGrainGrowth.C:22
static InputParameters validParams()
Definition: ADGrainGrowth.C:15
This is the base class for kernels that calculate the residual for grain growth.
registerMooseObject("PhaseFieldApp", ADGrainGrowth)
const std::vector< const ADVariableValue * > _vals
static InputParameters validParams()
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const unsigned int _op_num
void addClassDescription(const std::string &doc_string)
const ADMaterialProperty< Real > & _gamma
Definition: ADGrainGrowth.h:30