https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions | Private 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 Types

typedef DerivativeMaterialPropertyNameInterface::SymbolName SymbolName
 

Public Member Functions

 ACGrGrPoly (const InputParameters &parameters)
 
virtual void initialSetup ()
 
const GenericMaterialProperty< U, is_ad > & getDefaultMaterialProperty (const std::string &name)
 
const GenericMaterialProperty< U, is_ad > & getDefaultMaterialPropertyByName (const std::string &name)
 
void validateDerivativeMaterialPropertyBase (const std::string &base)
 
const MaterialPropertyName derivativePropertyName (const MaterialPropertyName &base, const std::vector< SymbolName > &c) const
 
const MaterialPropertyName derivativePropertyNameFirst (const MaterialPropertyName &base, const SymbolName &c1) const
 
const MaterialPropertyName derivativePropertyNameSecond (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2) const
 
const MaterialPropertyName derivativePropertyNameThird (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2, const SymbolName &c3) const
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const std::vector< VariableName > &c)
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const std::vector< VariableName > &c)
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const std::vector< VariableName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const SymbolName &c1, unsigned int v2, unsigned int v3=libMesh::invalid_uint)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, unsigned int v1, unsigned int v2=libMesh::invalid_uint, unsigned int v3=libMesh::invalid_uint)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const std::vector< VariableName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const SymbolName &c1, unsigned int v2, unsigned int v3=libMesh::invalid_uint)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, unsigned int v1, unsigned int v2=libMesh::invalid_uint, unsigned int v3=libMesh::invalid_uint)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< VariableName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< SymbolName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< VariableName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< SymbolName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
void validateCoupling (const MaterialPropertyName &base, const std::vector< VariableName > &c, bool validate_aux=true)
 
void validateCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="")
 
void validateCoupling (const MaterialPropertyName &base, const std::vector< VariableName > &c, bool validate_aux=true)
 
void validateCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="")
 
void validateNonlinearCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="")
 
void validateNonlinearCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="")
 
const MaterialPropertyName propertyName (const MaterialPropertyName &base, const std::vector< SymbolName > &c) const
 
const MaterialPropertyName propertyName (const MaterialPropertyName &base, const std::vector< SymbolName > &c) const
 
const MaterialPropertyName propertyNameFirst (const MaterialPropertyName &base, const SymbolName &c1) const
 
const MaterialPropertyName propertyNameFirst (const MaterialPropertyName &base, const SymbolName &c1) const
 
const MaterialPropertyName propertyNameSecond (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2) const
 
const MaterialPropertyName propertyNameSecond (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2) const
 
const MaterialPropertyName propertyNameThird (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2, const SymbolName &c3) const
 
const MaterialPropertyName propertyNameThird (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2, const SymbolName &c3) const
 

Static Public Member Functions

static InputParameters validParams ()
 

Protected Types

enum  PFFunctionType
 

Protected Member Functions

virtual Real assignThisOp ()
 
virtual std::vector< Real > assignOtherOps ()
 
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
 
const std::vector< const VariableValue * > _vals
 
const std::vector< unsigned int_vals_var
 
const MaterialProperty< Real > & _mu
 
const MaterialProperty< Real > & _L
 Mobility.
 
const MaterialProperty< Real > & _dLdop
 Mobility derivative w.r.t. order parameter.
 
std::vector< const MaterialProperty< Real > * > _dLdarg
 Mobility derivative w.r.t coupled variables.
 

Private Member Functions

bool haveMaterialProperty (const std::string &prop_name)
 
std::vector< VariableName > buildVariableVector (const VariableName &c1, const VariableName &c2, const VariableName &c3)
 
void validateCouplingHelper (const MaterialPropertyName &base, const std::vector< VariableName > &c, const System &system, std::vector< VariableName > &missing)
 
bool isNotObjectVariable (const VariableName &name)
 

Private Attributes

FEProblemBase_dmi_fe_problem
 

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 21 of file ACGrGrPoly.h.

Member Enumeration Documentation

◆ PFFunctionType

enum ACBulk::PFFunctionType
protectedinherited

Definition at line 37 of file ACBulk.h.

38 {
41 };

Constructor & Destructor Documentation

◆ ACGrGrPoly()

ACGrGrPoly::ACGrGrPoly ( const InputParameters parameters)

Definition at line 22 of file ACGrGrPoly.C.

23 : ACGrGrBase(parameters), _gamma(getMaterialProperty<Real>("gamma_asymm"))
24{
25}
This is the base class for kernels that calculate the residual for grain growth.
Definition ACGrGrBase.h:22
const MaterialProperty< Real > & _gamma
Definition ACGrGrPoly.h:34

Member Function Documentation

◆ assignOtherOps()

std::vector< Real > ACGrGrPoly::assignOtherOps ( )
protectedvirtual

Reimplemented in ACGrGrPolyLinearizedInterface.

Definition at line 34 of file ACGrGrPoly.C.

35{
36 std::vector<Real> other_ops(_op_num);
37 for (unsigned int i = 0; i < _op_num; ++i)
38 other_ops[i] = (*_vals[i])[_qp];
39
40 return other_ops;
41}
const unsigned int _op_num
Definition ACGrGrBase.h:29
const std::vector< const VariableValue * > _vals
Definition ACGrGrBase.h:31

Referenced by computeDFDOP(), and computeQpOffDiagJacobian().

◆ assignThisOp()

Real ACGrGrPoly::assignThisOp ( )
protectedvirtual

Reimplemented in ACGrGrPolyLinearizedInterface.

Definition at line 28 of file ACGrGrPoly.C.

29{
30 return _u[_qp];
31}

Referenced by computeDFDOP(), and computeQpOffDiagJacobian().

◆ computeDFDOP() [1/2]

Real ACGrGrPoly::computeDFDOP ( PFFunctionType  type)
protectedvirtual

Reimplemented in ACGrGrPolyLinearizedInterface.

Definition at line 44 of file ACGrGrPoly.C.

45{
46 // assign op and other_ops
47 Real op = assignThisOp();
48 std::vector<Real> other_ops(_op_num);
49 other_ops = assignOtherOps();
50
51 // Sum all other order parameters
52 Real SumOPj = 0.0;
53 for (unsigned int i = 0; i < _op_num; ++i)
54 SumOPj += other_ops[i] * other_ops[i];
55
56 // Calculate either the residual or Jacobian of the grain growth free energy
57 switch (type)
58 {
59 case Residual:
60 {
61 return _mu[_qp] * (op * op * op - op + 2.0 * _gamma[_qp] * op * SumOPj);
62 }
63
64 case Jacobian:
65 {
66 return _mu[_qp] * (_phi[_j][_qp] * (3.0 * op * op - 1.0 + 2.0 * _gamma[_qp] * SumOPj));
67 }
68
69 default:
70 mooseError("Invalid type passed in");
71 }
72}
void mooseError(Args &&... args)
const MaterialProperty< Real > & _mu
Definition ACGrGrBase.h:34
virtual Real assignThisOp()
Definition ACGrGrPoly.C:28
virtual std::vector< Real > assignOtherOps()
Definition ACGrGrPoly.C:34
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

Referenced by ACGrGrPolyLinearizedInterface::computeDFDOP().

◆ computeDFDOP() [2/2]

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

◆ computeQpOffDiagJacobian()

Real ACGrGrPoly::computeQpOffDiagJacobian ( unsigned int  jvar)
protectedvirtual

Reimplemented from ACBulk< Real >.

Reimplemented in ACGrGrPolyLinearizedInterface.

Definition at line 75 of file ACGrGrPoly.C.

76{
77 // assign op and other_ops
78 Real op = assignThisOp();
79 std::vector<Real> other_ops(_op_num);
80 other_ops = assignOtherOps();
81
82 for (unsigned int i = 0; i < _op_num; ++i)
83 if (jvar == _vals_var[i])
84 {
85 // Derivative of Sumopj
86 const Real dSumOPj = 2.0 * other_ops[i] * _phi[_j][_qp];
87 const Real dDFDOP = _mu[_qp] * 2.0 * _gamma[_qp] * op * dSumOPj;
88
89 return _L[_qp] * _test[_i][_qp] * dDFDOP;
90 }
91
92 return 0.0;
93}
const MaterialProperty< Real > & _L
Mobility.
Definition ACBulk.h:46
const std::vector< unsigned int > _vals_var
Definition ACGrGrBase.h:32

Referenced by ACGrGrPolyLinearizedInterface::computeQpOffDiagJacobian().

◆ initialSetup()

void ACBulk< Real >::initialSetup ( )
virtualinherited

Reimplemented in AllenCahn, CoupledAllenCahn, KKSACBulkBase, and KKSMultiACBulkBase.

Definition at line 30 of file ACBulk.h.

80{
81 validateNonlinearCoupling<Real>("mob_name");
82}

◆ precomputeQpJacobian()

Real ACBulk< Real >::precomputeQpJacobian ( )
protectedvirtualinherited

Definition at line 34 of file ACBulk.h.

98{
99 // Get free energy derivative and Jacobian
100 Real dFdop = computeDFDOP(Residual);
101
102 Real JdFdop = computeDFDOP(Jacobian);
103
104 // Set Jacobian value using product rule
105 return _L[_qp] * JdFdop + _dLdop[_qp] * _phi[_j][_qp] * dFdop;
106}
virtual Real computeDFDOP(PFFunctionType type)=0
const MaterialProperty< Real > & _dLdop
Mobility derivative w.r.t. order parameter.
Definition ACBulk.h:49

◆ precomputeQpResidual()

Real ACBulk< Real >::precomputeQpResidual ( )
protectedvirtualinherited

Definition at line 33 of file ACBulk.h.

87{
88 // Get free energy derivative from function
89 Real dFdop = computeDFDOP(Residual);
90
91 // Set residual
92 return _L[_qp] * dFdop;
93}

◆ validParams()

InputParameters ACGrGrPoly::validParams ( )
static

Definition at line 15 of file ACGrGrPoly.C.

16{
18 params.addClassDescription("Grain-Boundary model poly-crystalline interface Allen-Cahn Kernel");
19 return params;
20}
static InputParameters validParams()
Definition ACGrGrBase.C:13
void addClassDescription(const std::string &doc_string)

Referenced by ACGrGrPolyLinearizedInterface::validParams().

Member Data Documentation

◆ _dLdarg

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

Mobility derivative w.r.t coupled variables.

Definition at line 52 of file ACBulk.h.

◆ _dLdop

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

Mobility derivative w.r.t. order parameter.

Definition at line 49 of file ACBulk.h.

◆ _gamma

const MaterialProperty<Real>& ACGrGrPoly::_gamma
protected

Definition at line 34 of file ACGrGrPoly.h.

Referenced by computeDFDOP(), and computeQpOffDiagJacobian().

◆ _L

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

Mobility.

Definition at line 46 of file ACBulk.h.

◆ _mu

const MaterialProperty<Real>& ACGrGrBase::_mu
protectedinherited

Definition at line 34 of file ACGrGrBase.h.

Referenced by computeDFDOP(), and computeQpOffDiagJacobian().

◆ _op_num

const unsigned int ACGrGrBase::_op_num
protectedinherited

◆ _vals

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

Definition at line 31 of file ACGrGrBase.h.

Referenced by assignOtherOps().

◆ _vals_var

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

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