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

#include <ACGBPoly.h>

Inheritance diagram for ACGBPoly:
[legend]

Public Member Functions

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

Static Public Member Functions

static InputParameters validParams ()
 

Protected Types

enum  PFFunctionType
 

Protected Member Functions

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 VariableValue & _c
 
unsigned int _c_var
 
const MaterialProperty< Real > & _mu
 
const MaterialProperty< Real > & _gamma
 
Real _en_ratio
 
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

Definition at line 21 of file ACGBPoly.h.

Member Enumeration Documentation

◆ PFFunctionType

enum ACBulk::PFFunctionType
protectedinherited

Definition at line 38 of file ACBulk.h.

Constructor & Destructor Documentation

◆ ACGBPoly()

ACGBPoly::ACGBPoly ( const InputParameters &  parameters)

Definition at line 26 of file ACGBPoly.C.

27  : ACBulk<Real>(parameters),
28  _c(coupledValue("c")),
29  _c_var(coupled("c")),
30  _mu(getMaterialProperty<Real>("mu")),
31  _gamma(getMaterialProperty<Real>("gamma_asymm")),
32  _en_ratio(getParam<Real>("en_ratio"))
33 {
34 }
const MaterialProperty< Real > & _mu
Definition: ACGBPoly.h:33
unsigned int _c_var
Definition: ACGBPoly.h:31
const MaterialProperty< Real > & _gamma
Definition: ACGBPoly.h:34
Real _en_ratio
Definition: ACGBPoly.h:36
const VariableValue & _c
Definition: ACGBPoly.h:30

Member Function Documentation

◆ computeDFDOP() [1/2]

Real ACGBPoly::computeDFDOP ( PFFunctionType  type)
protectedvirtual

Definition at line 37 of file ACGBPoly.C.

38 {
39  Real mult = 2.0 * _en_ratio * _mu[_qp] * _gamma[_qp];
40 
41  Real c = _c[_qp];
42  if (c < 1.0e-8)
43  c = 0.0;
44  if (c > 1.0)
45  c = 1.0;
46 
47  switch (type)
48  {
49  case Residual:
50  return mult * _u[_qp] * c * c;
51 
52  case Jacobian:
53  return mult * _phi[_j][_qp] * c * c;
54  }
55 
56  mooseError("Invalid type passed in");
57 }
const MaterialProperty< Real > & _mu
Definition: ACGBPoly.h:33
const MaterialProperty< Real > & _gamma
Definition: ACGBPoly.h:34
Real _en_ratio
Definition: ACGBPoly.h:36
const VariableValue & _c
Definition: ACGBPoly.h:30

◆ computeDFDOP() [2/2]

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

◆ computeQpOffDiagJacobian()

Real ACGBPoly::computeQpOffDiagJacobian ( unsigned int  jvar)
protectedvirtual

Reimplemented from ACBulk< Real >.

Definition at line 60 of file ACGBPoly.C.

61 {
62  Real c = _c[_qp];
63  if (c < 1.0e-8)
64  c = 0.0;
65  if (c > 1.0)
66  c = 1.0;
67 
68  if (jvar == _c_var)
69  {
70  Real mult = 2.0 * _en_ratio * _mu[_qp] * _gamma[_qp];
71  Real dDFDOP = 2.0 * mult * _u[_qp] * c * _phi[_j][_qp];
72 
73  return _L[_qp] * _test[_i][_qp] * dDFDOP;
74  }
75 
76  return 0.0;
77 }
const MaterialProperty< Real > & _L
Mobility.
Definition: ACBulk.h:47
const MaterialProperty< Real > & _mu
Definition: ACGBPoly.h:33
unsigned int _c_var
Definition: ACGBPoly.h:31
const MaterialProperty< Real > & _gamma
Definition: ACGBPoly.h:34
Real _en_ratio
Definition: ACGBPoly.h:36
const VariableValue & _c
Definition: ACGBPoly.h:30

◆ 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

◆ _c

const VariableValue& ACGBPoly::_c
protected

Definition at line 30 of file ACGBPoly.h.

Referenced by computeDFDOP(), and computeQpOffDiagJacobian().

◆ _c_var

unsigned int ACGBPoly::_c_var
protected

Definition at line 31 of file ACGBPoly.h.

Referenced by computeQpOffDiagJacobian().

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

◆ _en_ratio

Real ACGBPoly::_en_ratio
protected

Definition at line 36 of file ACGBPoly.h.

Referenced by computeDFDOP(), and computeQpOffDiagJacobian().

◆ _gamma

const MaterialProperty<Real>& ACGBPoly::_gamma
protected

Definition at line 34 of file ACGBPoly.h.

Referenced by computeDFDOP(), and computeQpOffDiagJacobian().

◆ _L

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

◆ _mu

const MaterialProperty<Real>& ACGBPoly::_mu
protected

Definition at line 33 of file ACGBPoly.h.

Referenced by computeDFDOP(), and computeQpOffDiagJacobian().


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