www.mooseframework.org
ADGrainGrowth.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 registerADMooseObject("PhaseFieldApp", ADGrainGrowth);
13 
16  params.addClassDescription(
17  "Grain-Boundary model poly-crystalline interface Allen-Cahn Kernel"););
18 
19 template <ComputeStage compute_stage>
20 ADGrainGrowth<compute_stage>::ADGrainGrowth(const InputParameters & parameters)
21  : ADGrainGrowthBase<compute_stage>(parameters), _gamma(getADMaterialProperty<Real>("gamma_asymm"))
22 {
23 }
24 
25 template <ComputeStage compute_stage>
26 ADReal
28 {
29  // Sum all other order parameters
30  ADReal SumEtaj = 0.0;
31  for (unsigned int i = 0; i < _op_num; ++i)
32  SumEtaj += (*_vals[i])[_qp] * (*_vals[i])[_qp];
33 
34  return _mu[_qp] * (_u[_qp] * _u[_qp] * _u[_qp] - _u[_qp] + 2.0 * _gamma[_qp] * _u[_qp] * SumEtaj);
35 }
36 
ADGrainGrowth
This kernel calculates the residual for grain growth for a single phase, poly-crystal system.
Definition: ADGrainGrowth.h:20
ADGrainGrowth.h
ADGrainGrowth::computeDFDOP
virtual ADReal computeDFDOP()
Compute the derivative of the bulk free energy w.r.t the order parameter.
Definition: ADGrainGrowth.C:27
defineADValidParams
defineADValidParams(ADGrainGrowth, ADGrainGrowthBase, params.addClassDescription("Grain-Boundary model poly-crystalline interface Allen-Cahn Kernel");)
ADGrainGrowthBase
This is the base class for kernels that calculate the residual for grain growth.
Definition: ADGrainGrowthBase.h:22
registerADMooseObject
registerADMooseObject("PhaseFieldApp", ADGrainGrowth)
ADGrainGrowth::ADGrainGrowth
ADGrainGrowth(const InputParameters &parameters)
Definition: ADGrainGrowth.C:20
adBaseClass
adBaseClass(ADGrainGrowth)