www.mooseframework.org
Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
ACGrGrPoly Class Referenceabstract

This kernel calculates the residual for grain growth for a single phase, poly-crystal system. More...

#include <ACGrGrPoly.h>

Inheritance diagram for ACGrGrPoly:
[legend]

Public Member Functions

 ACGrGrPoly (const InputParameters &parameters)
 
virtual void initialSetup ()
 

Static Public Member Functions

static InputParameters validParams ()
 

Protected Types

enum  PFFunctionType
 

Protected Member Functions

virtual Real computeDFDOP (PFFunctionType type)
 
virtual Real computeQpOffDiagJacobian (unsigned int jvar)
 
virtual Real precomputeQpResidual ()
 
virtual Real precomputeQpJacobian ()
 
virtual Real computeDFDOP (PFFunctionType type)=0
 

Protected Attributes

const MaterialProperty< Real > & _gamma
 
const unsigned int _op_num
 
std::vector< const VariableValue * > _vals
 
std::vector< unsigned int > _vals_var
 
const MaterialProperty< Real > & _mu
 
const MaterialProperty< Real > & _L
 Mobility. More...
 
const MaterialProperty< Real > & _dLdop
 Mobility derivative w.r.t. order parameter. More...
 
std::vector< const MaterialProperty< Real > *> _dLdarg
 Mobility derivative w.r.t coupled variables. More...
 

Detailed Description

This kernel calculates the residual for grain growth for a single phase, poly-crystal system.

A single material property gamma_asymm is used for the prefactor of the cross-terms between order parameters.

Definition at line 26 of file ACGrGrPoly.h.

Member Enumeration Documentation

◆ PFFunctionType

enum ACBulk::PFFunctionType
protectedinherited

Definition at line 38 of file ACBulk.h.

Constructor & Destructor Documentation

◆ ACGrGrPoly()

ACGrGrPoly::ACGrGrPoly ( const InputParameters &  parameters)

Definition at line 23 of file ACGrGrPoly.C.

24  : ACGrGrBase(parameters), _gamma(getMaterialProperty<Real>("gamma_asymm"))
25 {
26 }
ACGrGrBase(const InputParameters &parameters)
Definition: ACGrGrBase.C:22
const MaterialProperty< Real > & _gamma
Definition: ACGrGrPoly.h:35

Member Function Documentation

◆ computeDFDOP() [1/2]

Real ACGrGrPoly::computeDFDOP ( PFFunctionType  type)
protectedvirtual

Definition at line 29 of file ACGrGrPoly.C.

30 {
31  // Sum all other order parameters
32  Real SumEtaj = 0.0;
33  for (unsigned int i = 0; i < _op_num; ++i)
34  SumEtaj += (*_vals[i])[_qp] * (*_vals[i])[_qp];
35 
36  // Calculate either the residual or Jacobian of the grain growth free energy
37  switch (type)
38  {
39  case Residual:
40  {
41  return _mu[_qp] *
42  (_u[_qp] * _u[_qp] * _u[_qp] - _u[_qp] + 2.0 * _gamma[_qp] * _u[_qp] * SumEtaj);
43  }
44 
45  case Jacobian:
46  {
47  return _mu[_qp] *
48  (_phi[_j][_qp] * (3.0 * _u[_qp] * _u[_qp] - 1.0 + 2.0 * _gamma[_qp] * SumEtaj));
49  }
50 
51  default:
52  mooseError("Invalid type passed in");
53  }
54 }
const unsigned int _op_num
Definition: ACGrGrBase.h:32
const MaterialProperty< Real > & _mu
Definition: ACGrGrBase.h:37
std::vector< const VariableValue * > _vals
Definition: ACGrGrBase.h:34
const MaterialProperty< Real > & _gamma
Definition: ACGrGrPoly.h:35

◆ computeDFDOP() [2/2]

virtual Real ACBulk< Real >::computeDFDOP ( PFFunctionType  type)
protectedpure virtualinherited

◆ computeQpOffDiagJacobian()

Real ACGrGrPoly::computeQpOffDiagJacobian ( unsigned int  jvar)
protectedvirtual

Reimplemented from ACBulk< Real >.

Definition at line 57 of file ACGrGrPoly.C.

58 {
59  for (unsigned int i = 0; i < _op_num; ++i)
60  if (jvar == _vals_var[i])
61  {
62  // Derivative of SumEtaj
63  const Real dSumEtaj = 2.0 * (*_vals[i])[_qp] * _phi[_j][_qp];
64  const Real dDFDOP = _mu[_qp] * 2.0 * _gamma[_qp] * _u[_qp] * dSumEtaj;
65 
66  return _L[_qp] * _test[_i][_qp] * dDFDOP;
67  }
68 
69  return 0.0;
70 }
const unsigned int _op_num
Definition: ACGrGrBase.h:32
const MaterialProperty< Real > & _L
Mobility.
Definition: ACBulk.h:47
std::vector< unsigned int > _vals_var
Definition: ACGrGrBase.h:35
const MaterialProperty< Real > & _mu
Definition: ACGrGrBase.h:37
std::vector< const VariableValue * > _vals
Definition: ACGrGrBase.h:34
const MaterialProperty< Real > & _gamma
Definition: ACGrGrPoly.h:35

◆ initialSetup()

void ACBulk< Real >::initialSetup ( )
virtualinherited

Reimplemented in KKSMultiACBulkBase, CoupledAllenCahn, KKSACBulkBase, and AllenCahn.

Definition at line 86 of file ACBulk.h.

87 {
88  validateNonlinearCoupling<Real>("mob_name");
89 }

◆ precomputeQpJacobian()

Real ACBulk< Real >::precomputeQpJacobian ( )
protectedvirtualinherited

Definition at line 104 of file ACBulk.h.

105 {
106  // Get free energy derivative and Jacobian
107  Real dFdop = computeDFDOP(Residual);
108 
109  Real JdFdop = computeDFDOP(Jacobian);
110 
111  // Set Jacobian value using product rule
112  return _L[_qp] * JdFdop + _dLdop[_qp] * _phi[_j][_qp] * dFdop;
113 }
const MaterialProperty< Real > & _L
Mobility.
Definition: ACBulk.h:47
virtual Real computeDFDOP(PFFunctionType type)=0
const MaterialProperty< Real > & _dLdop
Mobility derivative w.r.t. order parameter.
Definition: ACBulk.h:50

◆ precomputeQpResidual()

Real ACBulk< Real >::precomputeQpResidual ( )
protectedvirtualinherited

Definition at line 93 of file ACBulk.h.

94 {
95  // Get free energy derivative from function
96  Real dFdop = computeDFDOP(Residual);
97 
98  // Set residual
99  return _L[_qp] * dFdop;
100 }
const MaterialProperty< Real > & _L
Mobility.
Definition: ACBulk.h:47
virtual Real computeDFDOP(PFFunctionType type)=0

◆ validParams()

InputParameters ACBulk< Real >::validParams ( )
staticinherited

Definition at line 75 of file ACBulk.h.

76 {
77  InputParameters params = ::validParams<KernelValue>();
78  params.addClassDescription("Allen-Cahn base Kernel");
79  params.addParam<MaterialPropertyName>("mob_name", "L", "The mobility used with the kernel");
80  params.addCoupledVar("args", "Vector of arguments of the mobility");
81  return params;
82 }

Member Data Documentation

◆ _dLdarg

std::vector<const MaterialProperty<Real > *> ACBulk< Real >::_dLdarg
protectedinherited

Mobility derivative w.r.t coupled variables.

Definition at line 53 of file ACBulk.h.

◆ _dLdop

const MaterialProperty<Real >& ACBulk< Real >::_dLdop
protectedinherited

Mobility derivative w.r.t. order parameter.

Definition at line 50 of file ACBulk.h.

◆ _gamma

const MaterialProperty<Real>& ACGrGrPoly::_gamma
protected

Definition at line 35 of file ACGrGrPoly.h.

Referenced by computeDFDOP(), and computeQpOffDiagJacobian().

◆ _L

const MaterialProperty<Real >& ACBulk< Real >::_L
protectedinherited

◆ _mu

const MaterialProperty<Real>& ACGrGrBase::_mu
protectedinherited

◆ _op_num

const unsigned int ACGrGrBase::_op_num
protectedinherited

◆ _vals

std::vector<const VariableValue *> ACGrGrBase::_vals
protectedinherited

◆ _vals_var

std::vector<unsigned int> ACGrGrBase::_vals_var
protectedinherited

The documentation for this class was generated from the following files: