https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
ACInterface2DMultiPhase2 Class Reference

Compute the Allen-Cahn interface term with the weak form residual \( \left( \kappa \nabla \eta_{\alpha i}, \nabla (L \psi) \right) \) It is assumed kappa is a function of gradients of two order parameters eta_alpha and eta_beta. More...

#include <ACInterface2DMultiPhase2.h>

Inheritance diagram for ACInterface2DMultiPhase2:
[legend]

Public Types

typedef DerivativeMaterialPropertyNameInterface::SymbolName SymbolName
 

Public Member Functions

 ACInterface2DMultiPhase2 (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 Member Functions

virtual Real computeQpJacobian ()
 
virtual Real computeQpOffDiagJacobian (unsigned int jvar)
 
virtual Real computeQpResidual ()
 
RealGradient gradL ()
 
RealGradient gradKappa ()
 
RealGradient nablaLPsi ()
 the \( \nabla(L\psi) \) term
 
RealGradient kappaNablaLPsi ()
 the \( \kappa\nabla(L\psi) \) term
 

Protected Attributes

const MaterialProperty< RealGradient > & _dkappadgrad_etaa
 Interfacial parameter.
 
const MaterialProperty< Real > & _L
 Mobility.
 
const MaterialProperty< Real > & _kappa
 Interfacial parameter.
 
const bool _variable_L
 flag set if L is a function of non-linear variables in args
 
const MaterialProperty< Real > & _dkappadop
 kappa derivative w.r.t. order parameter
 
std::vector< const MaterialProperty< Real > * > _dkappadarg
 kappa derivative w.r.t. other coupled variables
 
std::vector< const VariableGradient * > _gradarg
 Gradients for all coupled variables.
 
const MaterialProperty< Real > & _dLdop
 Mobility derivatives w.r.t. order parameter.
 
const MaterialProperty< Real > & _d2Ldop2
 
std::vector< const MaterialProperty< Real > * > _dLdarg
 Mobility derivative w.r.t. other coupled variables.
 
std::vector< const MaterialProperty< Real > * > _d2Ldargdop
 
std::vector< std::vector< const MaterialProperty< Real > * > > _d2Ldarg2
 

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

Compute the Allen-Cahn interface term with the weak form residual \( \left( \kappa \nabla \eta_{\alpha i}, \nabla (L \psi) \right) \) It is assumed kappa is a function of gradients of two order parameters eta_alpha and eta_beta.

Therefore, kappa depends on multiple order parameters.

Definition at line 23 of file ACInterface2DMultiPhase2.h.

Constructor & Destructor Documentation

◆ ACInterface2DMultiPhase2()

ACInterface2DMultiPhase2::ACInterface2DMultiPhase2 ( const InputParameters parameters)

Definition at line 26 of file ACInterface2DMultiPhase2.C.

27 : ACInterface(parameters),
28 _dkappadgrad_etaa(getMaterialProperty<RealGradient>("dkappadgrad_etaa_name"))
29{
30}
const MaterialProperty< RealGradient > & _dkappadgrad_etaa
Interfacial parameter.
Compute the Allen-Cahn interface term with the weak form residual .
Definition ACInterface.h:21

Member Function Documentation

◆ computeQpJacobian()

Real ACInterface2DMultiPhase2::computeQpJacobian ( )
protectedvirtual

Reimplemented from ACInterface.

Definition at line 33 of file ACInterface2DMultiPhase2.C.

34{
35 // dsum is the derivative \f$ \frac\partial{\partial \eta} \left( \nabla (L\psi) \right) \f$
36 RealGradient dsum = _dLdop[_qp] * _phi[_j][_qp] * _grad_test[_i][_qp];
37
38 // compute the derivative of the gradient of the mobility
39 if (_variable_L)
40 {
41 RealGradient dgradL =
42 _grad_phi[_j][_qp] * _dLdop[_qp] + _grad_u[_qp] * _phi[_j][_qp] * _d2Ldop2[_qp];
43
44 for (unsigned int i = 0; i < _n_args; ++i)
45 dgradL += (*_gradarg[i])[_qp] * _phi[_j][_qp] * (*_d2Ldargdop[i])[_qp];
46
47 dsum += dgradL * _test[_i][_qp];
48 }
49 Real jac1 = dsum * _kappa[_qp] * _grad_u[_qp];
50 Real jac2 = nablaLPsi() * _dkappadgrad_etaa[_qp] * _grad_phi[_j][_qp] * _grad_u[_qp];
51 Real jac3 = nablaLPsi() * _kappa[_qp] * _grad_phi[_j][_qp];
52 return jac1 + jac2 + jac3;
53}
const bool _variable_L
flag set if L is a function of non-linear variables in args
Definition ACInterface.h:48
std::vector< const VariableGradient * > _gradarg
Gradients for all coupled variables.
Definition ACInterface.h:68
const MaterialProperty< Real > & _dLdop
Mobility derivatives w.r.t. order parameter.
Definition ACInterface.h:51
const MaterialProperty< Real > & _d2Ldop2
Definition ACInterface.h:52
std::vector< const MaterialProperty< Real > * > _d2Ldargdop
Definition ACInterface.h:60
RealGradient nablaLPsi()
the term
Definition ACInterface.C:82
const MaterialProperty< Real > & _kappa
Interfacial parameter.
Definition ACInterface.h:45
RealVectorValue RealGradient
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

◆ computeQpOffDiagJacobian()

Real ACInterface2DMultiPhase2::computeQpOffDiagJacobian ( unsigned int  jvar)
protectedvirtual

Reimplemented from ACInterface.

Definition at line 56 of file ACInterface2DMultiPhase2.C.

57{
58 // get the coupled variable jvar is referring to
59 const unsigned int cvar = mapJvarToCvar(jvar);
60
61 // dsum is the derivative \f$ \frac\partial{\partial \eta} \left( \nabla (L\psi) \right) \f$
62 RealGradient dsum = (*_dLdarg[cvar])[_qp] * _phi[_j][_qp] * _grad_test[_i][_qp];
63
64 // compute the derivative of the gradient of the mobility
65 if (_variable_L)
66 {
67 RealGradient dgradL = _grad_phi[_j][_qp] * (*_dLdarg[cvar])[_qp] +
68 _grad_u[_qp] * _phi[_j][_qp] * (*_d2Ldargdop[cvar])[_qp];
69
70 for (unsigned int i = 0; i < _n_args; ++i)
71 dgradL += (*_gradarg[i])[_qp] * _phi[_j][_qp] * (*_d2Ldarg2[cvar][i])[_qp];
72
73 dsum += dgradL * _test[_i][_qp];
74 }
75
76 Real jac1 = dsum * _kappa[_qp] * _grad_u[_qp];
77 Real jac2 = -nablaLPsi() * _dkappadgrad_etaa[_qp] * _grad_phi[_j][_qp] * _grad_u[_qp];
78 return jac1 + jac2;
79}
std::vector< const MaterialProperty< Real > * > _dLdarg
Mobility derivative w.r.t. other coupled variables.
Definition ACInterface.h:59
std::vector< std::vector< const MaterialProperty< Real > * > > _d2Ldarg2
Definition ACInterface.h:61

◆ computeQpResidual()

Real ACInterface::computeQpResidual ( )
protectedvirtualinherited

Reimplemented in ACInterface2DMultiPhase1, ACInterfaceChangedVariable, and ACInterfaceCleavageFracture.

Definition at line 100 of file ACInterface.C.

101{
102 return _grad_u[_qp] * kappaNablaLPsi();
103}
RealGradient kappaNablaLPsi()
the term
Definition ACInterface.C:94

Referenced by ACInterfaceChangedVariable::computeQpJacobian(), and ACInterfaceChangedVariable::computeQpResidual().

◆ gradKappa()

RealGradient ACInterface::gradKappa ( )
protectedinherited

◆ gradL()

RealGradient ACInterface::gradL ( )
protectedinherited

Definition at line 73 of file ACInterface.C.

74{
75 RealGradient g = _grad_u[_qp] * _dLdop[_qp];
76 for (unsigned int i = 0; i < _n_args; ++i)
77 g += (*_gradarg[i])[_qp] * (*_dLdarg[i])[_qp];
78 return g;
79}

Referenced by ACInterface::computeQpJacobian(), ACInterfaceCleavageFracture::computeQpJacobian(), ACInterface::computeQpOffDiagJacobian(), and ACInterface::nablaLPsi().

◆ initialSetup()

void ACInterface::initialSetup ( )
virtualinherited

Reimplemented in ACInterfaceChangedVariable.

Definition at line 66 of file ACInterface.C.

67{
68 validateCoupling<Real>("mob_name");
69 validateCoupling<Real>("kappa_name");
70}

◆ kappaNablaLPsi()

RealGradient ACInterface::kappaNablaLPsi ( )
protectedinherited

◆ nablaLPsi()

RealGradient ACInterface::nablaLPsi ( )
protectedinherited

the \( \nabla(L\psi) \) term

Definition at line 82 of file ACInterface.C.

83{
84 // sum is the product rule gradient \f$ \nabla (L\psi) \f$
85 RealGradient sum = _L[_qp] * _grad_test[_i][_qp];
86
87 if (_variable_L)
88 sum += gradL() * _test[_i][_qp];
89
90 return sum;
91}
RealGradient gradL()
Definition ACInterface.C:73
const MaterialProperty< Real > & _L
Mobility.
Definition ACInterface.h:43

Referenced by ACInterface2DMultiPhase1::computeQpJacobian(), computeQpJacobian(), ACInterface2DMultiPhase1::computeQpOffDiagJacobian(), computeQpOffDiagJacobian(), ACInterface2DMultiPhase1::computeQpResidual(), and ACInterface::kappaNablaLPsi().

◆ validParams()

InputParameters ACInterface2DMultiPhase2::validParams ( )
static

Definition at line 15 of file ACInterface2DMultiPhase2.C.

16{
19 "Gradient energy Allen-Cahn Kernel where the interface parameter kappa is considered.");
20 params.addParam<MaterialPropertyName>("dkappadgrad_etaa_name",
21 "dkappadgrad_etaa",
22 "The derivative of the kappa with respect to grad_etaa");
23 return params;
24}
static InputParameters validParams()
Definition ACInterface.C:15
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)

Member Data Documentation

◆ _d2Ldarg2

std::vector<std::vector<const MaterialProperty<Real> *> > ACInterface::_d2Ldarg2
protectedinherited

◆ _d2Ldargdop

std::vector<const MaterialProperty<Real> *> ACInterface::_d2Ldargdop
protectedinherited

◆ _d2Ldop2

const MaterialProperty<Real>& ACInterface::_d2Ldop2
protectedinherited

◆ _dkappadarg

std::vector<const MaterialProperty<Real> *> ACInterface::_dkappadarg
protectedinherited

kappa derivative w.r.t. other coupled variables

Definition at line 65 of file ACInterface.h.

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

◆ _dkappadgrad_etaa

const MaterialProperty<RealGradient>& ACInterface2DMultiPhase2::_dkappadgrad_etaa
protected

Interfacial parameter.

Definition at line 35 of file ACInterface2DMultiPhase2.h.

Referenced by computeQpJacobian(), and computeQpOffDiagJacobian().

◆ _dkappadop

const MaterialProperty<Real>& ACInterface::_dkappadop
protectedinherited

kappa derivative w.r.t. order parameter

Definition at line 56 of file ACInterface.h.

Referenced by ACInterface::computeQpJacobian(), ACInterfaceCleavageFracture::computeQpJacobian(), and ACInterface::computeQpOffDiagJacobian().

◆ _dLdarg

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

◆ _dLdop

const MaterialProperty<Real>& ACInterface::_dLdop
protectedinherited

◆ _gradarg

std::vector<const VariableGradient *> ACInterface::_gradarg
protectedinherited

◆ _kappa

const MaterialProperty<Real>& ACInterface::_kappa
protectedinherited

◆ _L

const MaterialProperty<Real>& ACInterface::_L
protectedinherited

◆ _variable_L

const bool ACInterface::_variable_L
protectedinherited

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