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
ACGrGrPolyLinearizedInterface Class Referenceabstract

This kernel calculates the residual for grain growth for a single phase, polycrystal system using the linearized interface grain growth model. More...

#include <ACGrGrPolyLinearizedInterface.h>

Inheritance diagram for ACGrGrPolyLinearizedInterface:
[legend]

Public Types

typedef DerivativeMaterialPropertyNameInterface::SymbolName SymbolName
 

Public Member Functions

 ACGrGrPolyLinearizedInterface (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 computeDFDOP (PFFunctionType type)=0
 
virtual Real precomputeQpResidual ()
 
virtual Real precomputeQpJacobian ()
 

Protected Attributes

const std::vector< MaterialPropertyName > _other_op_names
 
const unsigned int _num_ops
 
const MaterialProperty< Real > & _gamma
 
const MaterialProperty< Real > & _op
 
const MaterialProperty< Real > & _dopdphi
 
std::vector< const MaterialProperty< Real > * > _opj
 
std::vector< const MaterialProperty< Real > * > _dopjdarg
 
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, polycrystal system using the linearized interface grain growth model.

Definition at line 20 of file ACGrGrPolyLinearizedInterface.h.

Member Enumeration Documentation

◆ PFFunctionType

enum ACBulk::PFFunctionType
protectedinherited

Definition at line 37 of file ACBulk.h.

38 {
41 };

Constructor & Destructor Documentation

◆ ACGrGrPolyLinearizedInterface()

ACGrGrPolyLinearizedInterface::ACGrGrPolyLinearizedInterface ( const InputParameters parameters)

Definition at line 29 of file ACGrGrPolyLinearizedInterface.C.

30 : ACGrGrPoly(parameters),
31 _other_op_names(getParam<std::vector<MaterialPropertyName>>("other_ops")),
33 _gamma(getMaterialProperty<Real>("gamma_asymm")),
34 _op(getMaterialProperty<Real>("this_op")),
35 _dopdphi(getMaterialPropertyDerivative<Real>("this_op", _var.name())),
38{
39 if (_num_ops != _op_num)
41 "In ACGrGrPolyLinearizedInterface, number of coupled variables in v must match number of "
42 "coupled materials in other_ops");
43
44 // Iterate over all coupled order parameters
45 for (unsigned int i = 0; i < _op_num; ++i)
46 {
47 _opj[i] = &getMaterialPropertyByName<Real>(_other_op_names[i]);
48 _dopjdarg[i] = &getMaterialPropertyDerivative<Real>(_other_op_names[i], i);
49 }
50}
void mooseError(Args &&... args)
const unsigned int _op_num
Definition ACGrGrBase.h:29
const MaterialProperty< Real > & _dopdphi
const MaterialProperty< Real > & _gamma
const MaterialProperty< Real > & _op
std::vector< const MaterialProperty< Real > * > _dopjdarg
std::vector< const MaterialProperty< Real > * > _opj
const std::vector< MaterialPropertyName > _other_op_names
This kernel calculates the residual for grain growth for a single phase, poly-crystal system.
Definition ACGrGrPoly.h:22

Member Function Documentation

◆ assignOtherOps()

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

Reimplemented from ACGrGrPoly.

Definition at line 59 of file ACGrGrPolyLinearizedInterface.C.

60{
61 std::vector<Real> other_ops(_op_num);
62 for (unsigned int i = 0; i < _op_num; ++i)
63 other_ops[i] = (*_opj[i])[_qp];
64
65 return other_ops;
66}

◆ assignThisOp()

Real ACGrGrPolyLinearizedInterface::assignThisOp ( )
protectedvirtual

Reimplemented from ACGrGrPoly.

Definition at line 53 of file ACGrGrPolyLinearizedInterface.C.

54{
55 return _op[_qp];
56}

◆ computeDFDOP() [1/2]

Real ACGrGrPolyLinearizedInterface::computeDFDOP ( PFFunctionType  type)
protectedvirtual

Reimplemented from ACGrGrPoly.

Definition at line 69 of file ACGrGrPolyLinearizedInterface.C.

70{
71 switch (type)
72 {
73 case Residual:
74 return ACGrGrPoly::computeDFDOP(type);
75
76 case Jacobian:
77 return ACGrGrPoly::computeDFDOP(type) * _dopdphi[_qp];
78
79 default:
80 mooseError("Invalid type passed in");
81 }
82}
virtual Real computeDFDOP(PFFunctionType type)
Definition ACGrGrPoly.C:44

◆ computeDFDOP() [2/2]

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

◆ computeQpOffDiagJacobian()

Real ACGrGrPolyLinearizedInterface::computeQpOffDiagJacobian ( unsigned int  jvar)
protectedvirtual

Reimplemented from ACGrGrPoly.

Definition at line 85 of file ACGrGrPolyLinearizedInterface.C.

86{
87
88 for (unsigned int i = 0; i < _op_num; ++i)
89 if (jvar == _vals_var[i])
90 return ACGrGrPoly::computeQpOffDiagJacobian(jvar) * (*_dopjdarg[i])[_qp];
91
92 return 0.0;
93}
const std::vector< unsigned int > _vals_var
Definition ACGrGrBase.h:32
virtual Real computeQpOffDiagJacobian(unsigned int jvar)
Definition ACGrGrPoly.C:75

◆ 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}
const MaterialProperty< Real > & _L
Mobility.
Definition ACBulk.h:46
virtual Real computeDFDOP(PFFunctionType type)=0
const MaterialProperty< Real > & _dLdop
Mobility derivative w.r.t. order parameter.
Definition ACBulk.h:49
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

◆ 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 ACGrGrPolyLinearizedInterface::validParams ( )
static

Definition at line 17 of file ACGrGrPolyLinearizedInterface.C.

18{
21 "Grain growth model Allen-Cahn Kernel with linearized interface variable transformation");
22 params.addRequiredParam<MaterialPropertyName>(
23 "this_op", "The material property defining the order parameter for this variable");
24 params.addRequiredParam<std::vector<MaterialPropertyName>>(
25 "other_ops", "List of properties defining the order parameters for the variables in v");
26 return params;
27}
static InputParameters validParams()
Definition ACGrGrPoly.C:15
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)

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.

◆ _dopdphi

const MaterialProperty<Real>& ACGrGrPolyLinearizedInterface::_dopdphi
protected

Definition at line 37 of file ACGrGrPolyLinearizedInterface.h.

Referenced by computeDFDOP().

◆ _dopjdarg

std::vector<const MaterialProperty<Real> *> ACGrGrPolyLinearizedInterface::_dopjdarg
protected

◆ _gamma

const MaterialProperty<Real>& ACGrGrPolyLinearizedInterface::_gamma
protected

Definition at line 35 of file ACGrGrPolyLinearizedInterface.h.

◆ _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 ACGrGrPoly::computeDFDOP(), and ACGrGrPoly::computeQpOffDiagJacobian().

◆ _num_ops

const unsigned int ACGrGrPolyLinearizedInterface::_num_ops
protected

Definition at line 34 of file ACGrGrPolyLinearizedInterface.h.

Referenced by ACGrGrPolyLinearizedInterface().

◆ _op

const MaterialProperty<Real>& ACGrGrPolyLinearizedInterface::_op
protected

Definition at line 36 of file ACGrGrPolyLinearizedInterface.h.

Referenced by assignThisOp().

◆ _op_num

const unsigned int ACGrGrBase::_op_num
protectedinherited

◆ _opj

std::vector<const MaterialProperty<Real> *> ACGrGrPolyLinearizedInterface::_opj
protected

◆ _other_op_names

const std::vector<MaterialPropertyName> ACGrGrPolyLinearizedInterface::_other_op_names
protected

Definition at line 33 of file ACGrGrPolyLinearizedInterface.h.

Referenced by ACGrGrPolyLinearizedInterface().

◆ _vals

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

Definition at line 31 of file ACGrGrBase.h.

Referenced by ACGrGrPoly::assignOtherOps().

◆ _vals_var

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

Definition at line 32 of file ACGrGrBase.h.

Referenced by ACGrGrPoly::computeQpOffDiagJacobian(), and computeQpOffDiagJacobian().


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