www.mooseframework.org
Public Member Functions | Protected Member Functions | Protected 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 Member Functions

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

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 More...
 
RealGradient kappaNablaLPsi ()
 the \( \kappa\nabla(L\psi) \) term More...
 

Protected Attributes

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

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 29 of file ACInterface2DMultiPhase2.h.

Constructor & Destructor Documentation

◆ ACInterface2DMultiPhase2()

ACInterface2DMultiPhase2::ACInterface2DMultiPhase2 ( const InputParameters &  parameters)

Definition at line 27 of file ACInterface2DMultiPhase2.C.

28  : ACInterface(parameters),
29  _dkappadgrad_etaa(getMaterialProperty<RealGradient>("dkappadgrad_etaa_name"))
30 {
31 }
ACInterface(const InputParameters &parameters)
Definition: ACInterface.C:31
const MaterialProperty< RealGradient > & _dkappadgrad_etaa
Interfacial parameter.

Member Function Documentation

◆ computeQpJacobian()

Real ACInterface2DMultiPhase2::computeQpJacobian ( )
protectedvirtual

Reimplemented from ACInterface.

Definition at line 34 of file ACInterface2DMultiPhase2.C.

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

◆ computeQpOffDiagJacobian()

Real ACInterface2DMultiPhase2::computeQpOffDiagJacobian ( unsigned int  jvar)
protectedvirtual

Reimplemented from ACInterface.

Definition at line 57 of file ACInterface2DMultiPhase2.C.

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

◆ computeQpResidual()

Real ACInterface::computeQpResidual ( )
protectedvirtualinherited

Reimplemented in ACInterface2DMultiPhase1.

Definition at line 104 of file ACInterface.C.

105 {
106  return _grad_u[_qp] * kappaNablaLPsi();
107 }
RealGradient kappaNablaLPsi()
the term
Definition: ACInterface.C:98

◆ gradKappa()

RealGradient ACInterface::gradKappa ( )
protectedinherited

◆ gradL()

RealGradient ACInterface::gradL ( )
protectedinherited

Definition at line 77 of file ACInterface.C.

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

78 {
79  RealGradient g = _grad_u[_qp] * _dLdop[_qp];
80  for (unsigned int i = 0; i < _nvar; ++i)
81  g += (*_gradarg[i])[_qp] * (*_dLdarg[i])[_qp];
82  return g;
83 }
std::vector< const VariableGradient * > _gradarg
Gradients for all coupled variables.
Definition: ACInterface.h:75
const MaterialProperty< Real > & _dLdop
Mobility derivatives w.r.t. order parameter.
Definition: ACInterface.h:55
const unsigned int _nvar
number of coupled variables
Definition: ACInterface.h:63
std::vector< const MaterialProperty< Real > * > _dLdarg
Mobility derivative w.r.t. other coupled variables.
Definition: ACInterface.h:66

◆ initialSetup()

void ACInterface::initialSetup ( )
virtualinherited

Definition at line 70 of file ACInterface.C.

71 {
72  validateCoupling<Real>("mob_name");
73  validateCoupling<Real>("kappa_name");
74 }

◆ kappaNablaLPsi()

RealGradient ACInterface::kappaNablaLPsi ( )
protectedinherited

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

Definition at line 98 of file ACInterface.C.

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

99 {
100  return _kappa[_qp] * nablaLPsi();
101 }
RealGradient nablaLPsi()
the term
Definition: ACInterface.C:86
const MaterialProperty< Real > & _kappa
Interfacial parameter.
Definition: ACInterface.h:49

◆ nablaLPsi()

RealGradient ACInterface::nablaLPsi ( )
protectedinherited

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

Definition at line 86 of file ACInterface.C.

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

87 {
88  // sum is the product rule gradient \f$ \nabla (L\psi) \f$
89  RealGradient sum = _L[_qp] * _grad_test[_i][_qp];
90 
91  if (_variable_L)
92  sum += gradL() * _test[_i][_qp];
93 
94  return sum;
95 }
const MaterialProperty< Real > & _L
Mobility.
Definition: ACInterface.h:47
const bool _variable_L
flag set if L is a function of non-linear variables in args
Definition: ACInterface.h:52
RealGradient gradL()
Definition: ACInterface.C:77

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 72 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 39 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 60 of file ACInterface.h.

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

◆ _dLdarg

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

◆ _dLdop

const MaterialProperty<Real>& ACInterface::_dLdop
protectedinherited

Mobility derivatives w.r.t. order parameter.

Definition at line 55 of file ACInterface.h.

Referenced by ACInterface::computeQpJacobian(), computeQpJacobian(), ACInterface2DMultiPhase1::computeQpJacobian(), and ACInterface::gradL().

◆ _gradarg

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

◆ _kappa

const MaterialProperty<Real>& ACInterface::_kappa
protectedinherited

◆ _L

const MaterialProperty<Real>& ACInterface::_L
protectedinherited

◆ _nvar

const unsigned int ACInterface::_nvar
protectedinherited

◆ _variable_L

const bool ACInterface::_variable_L
protectedinherited

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