https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
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
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}
registerMooseObject("PhaseFieldApp", ADGrainGrowth)
DualNumber< Real, DNDerivativeType, true > ADReal
This is the base class for kernels that calculate the residual for grain growth.
static InputParameters validParams()
const unsigned int _op_num
const std::vector< const ADVariableValue * > _vals
const ADMaterialProperty< Real > & _mu
This kernel calculates the residual for grain growth for a single phase, poly-crystal system.
const ADMaterialProperty< Real > & _gamma
ADGrainGrowth(const InputParameters &parameters)
virtual ADReal computeDFDOP()
Compute the derivative of the bulk free energy w.r.t the order parameter.
static InputParameters validParams()
void addClassDescription(const std::string &doc_string)