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

This is the base class for kernels that calculate the residual for grain growth. More...

#include <ACGrGrBase.h>

Inheritance diagram for ACGrGrBase:
[legend]

Public Member Functions

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

Static Public Member Functions

static InputParameters validParams ()
 

Protected Types

enum  PFFunctionType
 

Protected Member Functions

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

Protected Attributes

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 is the base class for kernels that calculate the residual for grain growth.

It calculates the residual of the ith order parameter, and the values of all other order parameters are coupled variables and are stored in vals.

Definition at line 26 of file ACGrGrBase.h.

Member Enumeration Documentation

◆ PFFunctionType

enum ACBulk::PFFunctionType
protectedinherited

Definition at line 38 of file ACBulk.h.

Constructor & Destructor Documentation

◆ ACGrGrBase()

ACGrGrBase::ACGrGrBase ( const InputParameters &  parameters)

Definition at line 22 of file ACGrGrBase.C.

23  : ACBulk<Real>(parameters),
24  _op_num(coupledComponents("v")),
25  _vals(_op_num),
27  _mu(getMaterialProperty<Real>("mu"))
28 {
29  // Loop through grains and load coupled variables into the arrays
30  for (unsigned int i = 0; i < _op_num; ++i)
31  {
32  _vals[i] = &coupledValue("v", i);
33  _vals_var[i] = coupled("v", i);
34  }
35 }
const unsigned int _op_num
Definition: ACGrGrBase.h:32
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

Member Function Documentation

◆ computeDFDOP()

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

◆ computeQpOffDiagJacobian()

Real ACBulk< Real >::computeQpOffDiagJacobian ( unsigned int  jvar)
protectedvirtualinherited

Reimplemented in CoupledAllenCahn, AllenCahn, KKSACBulkC, KKSACBulkF, KKSMultiACBulkC, KKSMultiACBulkF, ACGrGrMulti, ACGrGrPoly, ACBarrierFunction, and ACGBPoly.

Definition at line 117 of file ACBulk.h.

118 {
119  // Get the coupled variable jvar is referring to
120  const unsigned int cvar = mapJvarToCvar(jvar);
121 
122  // Set off-diagonal Jacobian term from mobility derivatives
123  return (*_dLdarg[cvar])[_qp] * _phi[_j][_qp] * computeDFDOP(Residual) * _test[_i][_qp];
124 }
virtual Real computeDFDOP(PFFunctionType type)=0
std::vector< const MaterialProperty< Real > *> _dLdarg
Mobility derivative w.r.t coupled variables.
Definition: ACBulk.h:53

◆ 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.

◆ _L

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

◆ _mu

const MaterialProperty<Real>& ACGrGrBase::_mu
protected

◆ _op_num

const unsigned int ACGrGrBase::_op_num
protected

◆ _vals

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

◆ _vals_var

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

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