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

KKSACBulkBase child class for the free energy difference term \( -\frac{dh}{d\eta}(F_a-F_b)+w\frac{dg}{d\eta} \) in the the Allen-Cahn bulk residual. More...

#include <KKSACBulkF.h>

Inheritance diagram for KKSACBulkF:
[legend]

Public Member Functions

 KKSACBulkF (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

Real _w
 double well height parameter More...
 
const MaterialProperty< Real > & _prop_dg
 Derivative of the double well function \( \frac d{d\eta} g(\eta) \). More...
 
const MaterialProperty< Real > & _prop_d2g
 Second derivative of the double well function \( \frac {d^2}{d\eta^2} g(\eta) \). More...
 
const MaterialProperty< Real > & _prop_Fb
 Value of the free energy function \( F_b \). More...
 
const MaterialProperty< Real > & _prop_dFb
 Derivative of the free energy function \( \frac d{d\eta} F_b \). More...
 
unsigned int _nvar
 Number of coupled variables. More...
 
VariableName _eta_name
 name of the order parameter (needed to retrieve the derivative material properties) More...
 
std::vector< const MaterialProperty< Real > * > _derivatives_Fa
 Derivatives of \( F_a \) with respect to all coupled variables. More...
 
std::vector< const MaterialProperty< Real > * > _derivatives_Fb
 Derivatives of \( F_b \) with respect to all coupled variables. More...
 
const MaterialProperty< Real > & _prop_Fa
 Value of the free energy function \( F_a \). More...
 
const MaterialProperty< Real > & _prop_dFa
 Derivative of the free energy function \( \frac d{d\eta} F_a \). More...
 
const MaterialProperty< Real > & _prop_dh
 Derivative of the switching function \( \frac d{d\eta} h(\eta) \). More...
 
const MaterialProperty< Real > & _prop_d2h
 Second derivative of the switching function \( \frac {d^2}{d\eta^2} h(\eta) \). More...
 
std::vector< const VariableGradient * > _grad_args
 Gradients for all coupled variables. More...
 
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

KKSACBulkBase child class for the free energy difference term \( -\frac{dh}{d\eta}(F_a-F_b)+w\frac{dg}{d\eta} \) in the the Allen-Cahn bulk residual.

The non-linear variable for this Kernel is the order parameter 'eta'.

Definition at line 27 of file KKSACBulkF.h.

Member Enumeration Documentation

◆ PFFunctionType

enum ACBulk::PFFunctionType
protectedinherited

Definition at line 37 of file ACBulk.h.

38  {
39  Jacobian,
40  Residual
41  };

Constructor & Destructor Documentation

◆ KKSACBulkF()

KKSACBulkF::KKSACBulkF ( const InputParameters &  parameters)

Definition at line 30 of file KKSACBulkF.C.

31  : KKSACBulkBase(parameters),
32  _w(getParam<Real>("w")),
33  _prop_dg(getMaterialPropertyDerivative<Real>("g_name", _eta_name)),
34  _prop_d2g(getMaterialPropertyDerivative<Real>("g_name", _eta_name, _eta_name)),
35  _prop_Fb(getMaterialProperty<Real>("fb_name")),
36  _prop_dFb(getMaterialPropertyDerivative<Real>("fb_name", _eta_name))
37 {
38 }

Member Function Documentation

◆ computeDFDOP() [1/2]

Real KKSACBulkF::computeDFDOP ( PFFunctionType  type)
protectedvirtual

Definition at line 41 of file KKSACBulkF.C.

42 {
43  const Real A1 = _prop_Fa[_qp] - _prop_Fb[_qp];
44  switch (type)
45  {
46  case Residual:
47  return -_prop_dh[_qp] * A1 + _w * _prop_dg[_qp];
48 
49  case Jacobian:
50  return _phi[_j][_qp] * (-_prop_d2h[_qp] * A1 + _w * _prop_d2g[_qp]);
51  }
52 
53  mooseError("Invalid type passed in");
54 }

◆ computeDFDOP() [2/2]

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

◆ computeQpOffDiagJacobian()

Real KKSACBulkF::computeQpOffDiagJacobian ( unsigned int  jvar)
protectedvirtual

Reimplemented from ACBulk< Real >.

Definition at line 57 of file KKSACBulkF.C.

58 {
59  // get the coupled variable jvar is referring to
60  const unsigned int cvar = mapJvarToCvar(jvar);
61 
62  // first get dependence of mobility _L on other variables using parent class
63  // member function
65 
66  return res - _L[_qp] * _prop_dh[_qp] *
67  ((*_derivatives_Fa[cvar])[_qp] - (*_derivatives_Fb[cvar])[_qp]) * _phi[_j][_qp] *
68  _test[_i][_qp];
69 }

◆ initialSetup()

void KKSACBulkBase::initialSetup ( )
virtualinherited

Reimplemented from ACBulk< Real >.

Definition at line 57 of file KKSACBulkBase.C.

58 {
60  validateNonlinearCoupling<Real>("fa_name");
61  validateNonlinearCoupling<Real>("fb_name");
62 }

◆ precomputeQpJacobian()

Real ACBulk< Real >::precomputeQpJacobian ( )
protectedvirtualinherited

Definition at line 103 of file ACBulk.h.

104 {
105  // Get free energy derivative and Jacobian
106  Real dFdop = computeDFDOP(Residual);
107 
108  Real JdFdop = computeDFDOP(Jacobian);
109 
110  // Set Jacobian value using product rule
111  return _L[_qp] * JdFdop + _dLdop[_qp] * _phi[_j][_qp] * dFdop;
112 }

◆ precomputeQpResidual()

Real ACBulk< Real >::precomputeQpResidual ( )
protectedvirtualinherited

Definition at line 92 of file ACBulk.h.

93 {
94  // Get free energy derivative from function
95  Real dFdop = computeDFDOP(Residual);
96 
97  // Set residual
98  return _L[_qp] * dFdop;
99 }

◆ validParams()

InputParameters ACBulk< Real >::validParams ( )
staticinherited

Definition at line 74 of file ACBulk.h.

75 {
76  InputParameters params = ::validParams<KernelValue>();
77  params.addClassDescription("Allen-Cahn base Kernel");
78  params.addParam<MaterialPropertyName>("mob_name", "L", "The mobility used with the kernel");
79  params.addCoupledVar("args", "Vector of arguments of the mobility");
80  return params;
81 }

Member Data Documentation

◆ _derivatives_Fa

std::vector<const MaterialProperty<Real> *> KKSACBulkBase::_derivatives_Fa
protectedinherited

Derivatives of \( F_a \) with respect to all coupled variables.

Definition at line 41 of file KKSACBulkBase.h.

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

◆ _derivatives_Fb

std::vector<const MaterialProperty<Real> *> KKSACBulkBase::_derivatives_Fb
protectedinherited

Derivatives of \( F_b \) with respect to all coupled variables.

Definition at line 44 of file KKSACBulkBase.h.

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

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

◆ _eta_name

VariableName KKSACBulkBase::_eta_name
protectedinherited

name of the order parameter (needed to retrieve the derivative material properties)

Definition at line 38 of file KKSACBulkBase.h.

◆ _grad_args

std::vector<const VariableGradient *> KKSACBulkBase::_grad_args
protectedinherited

Gradients for all coupled variables.

Definition at line 59 of file KKSACBulkBase.h.

Referenced by KKSACBulkBase::KKSACBulkBase().

◆ _L

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

Mobility.

Definition at line 46 of file ACBulk.h.

◆ _nvar

unsigned int KKSACBulkBase::_nvar
protectedinherited

Number of coupled variables.

Definition at line 35 of file KKSACBulkBase.h.

Referenced by KKSACBulkBase::KKSACBulkBase(), and KKSACBulkC::KKSACBulkC().

◆ _prop_d2g

const MaterialProperty<Real>& KKSACBulkF::_prop_d2g
protected

Second derivative of the double well function \( \frac {d^2}{d\eta^2} g(\eta) \).

Definition at line 43 of file KKSACBulkF.h.

Referenced by computeDFDOP().

◆ _prop_d2h

const MaterialProperty<Real>& KKSACBulkBase::_prop_d2h
protectedinherited

Second derivative of the switching function \( \frac {d^2}{d\eta^2} h(\eta) \).

Definition at line 56 of file KKSACBulkBase.h.

Referenced by KKSACBulkC::computeDFDOP(), and computeDFDOP().

◆ _prop_dFa

const MaterialProperty<Real>& KKSACBulkBase::_prop_dFa
protectedinherited

Derivative of the free energy function \( \frac d{d\eta} F_a \).

Definition at line 50 of file KKSACBulkBase.h.

◆ _prop_dFb

const MaterialProperty<Real>& KKSACBulkF::_prop_dFb
protected

Derivative of the free energy function \( \frac d{d\eta} F_b \).

Definition at line 49 of file KKSACBulkF.h.

◆ _prop_dg

const MaterialProperty<Real>& KKSACBulkF::_prop_dg
protected

Derivative of the double well function \( \frac d{d\eta} g(\eta) \).

Definition at line 40 of file KKSACBulkF.h.

Referenced by computeDFDOP().

◆ _prop_dh

const MaterialProperty<Real>& KKSACBulkBase::_prop_dh
protectedinherited

Derivative of the switching function \( \frac d{d\eta} h(\eta) \).

Definition at line 53 of file KKSACBulkBase.h.

Referenced by KKSACBulkC::computeDFDOP(), computeDFDOP(), computeQpOffDiagJacobian(), and KKSACBulkC::computeQpOffDiagJacobian().

◆ _prop_Fa

const MaterialProperty<Real>& KKSACBulkBase::_prop_Fa
protectedinherited

Value of the free energy function \( F_a \).

Definition at line 47 of file KKSACBulkBase.h.

Referenced by computeDFDOP().

◆ _prop_Fb

const MaterialProperty<Real>& KKSACBulkF::_prop_Fb
protected

Value of the free energy function \( F_b \).

Definition at line 46 of file KKSACBulkF.h.

Referenced by computeDFDOP().

◆ _w

Real KKSACBulkF::_w
protected

double well height parameter

Definition at line 37 of file KKSACBulkF.h.

Referenced by computeDFDOP().


The documentation for this class was generated from the following files:
KKSACBulkF::_prop_dg
const MaterialProperty< Real > & _prop_dg
Derivative of the double well function .
Definition: KKSACBulkF.h:40
KKSACBulkBase::_prop_d2h
const MaterialProperty< Real > & _prop_d2h
Second derivative of the switching function .
Definition: KKSACBulkBase.h:56
KKSACBulkBase::_prop_Fa
const MaterialProperty< Real > & _prop_Fa
Value of the free energy function .
Definition: KKSACBulkBase.h:47
KKSACBulkBase::_eta_name
VariableName _eta_name
name of the order parameter (needed to retrieve the derivative material properties)
Definition: KKSACBulkBase.h:38
ACBulk< Real >::Residual
Definition: ACBulk.h:40
KKSACBulkF::_prop_d2g
const MaterialProperty< Real > & _prop_d2g
Second derivative of the double well function .
Definition: KKSACBulkF.h:43
KKSACBulkBase::_prop_dh
const MaterialProperty< Real > & _prop_dh
Derivative of the switching function .
Definition: KKSACBulkBase.h:53
ACBulk::computeQpOffDiagJacobian
virtual Real computeQpOffDiagJacobian(unsigned int jvar)
Definition: ACBulk.h:116
KKSACBulkBase::KKSACBulkBase
KKSACBulkBase(const InputParameters &parameters)
Definition: KKSACBulkBase.C:27
ACBulk< Real >::_dLdop
const MaterialProperty< Real > & _dLdop
Mobility derivative w.r.t. order parameter.
Definition: ACBulk.h:49
ACBulk< Real >::computeDFDOP
virtual Real computeDFDOP(PFFunctionType type)=0
KKSACBulkBase::_derivatives_Fb
std::vector< const MaterialProperty< Real > * > _derivatives_Fb
Derivatives of with respect to all coupled variables.
Definition: KKSACBulkBase.h:44
ACBulk::initialSetup
virtual void initialSetup()
Definition: ACBulk.h:85
ACBulk< Real >::Jacobian
Definition: ACBulk.h:39
KKSACBulkF::_prop_Fb
const MaterialProperty< Real > & _prop_Fb
Value of the free energy function .
Definition: KKSACBulkF.h:46
KKSACBulkF::_w
Real _w
double well height parameter
Definition: KKSACBulkF.h:37
KKSACBulkBase::_derivatives_Fa
std::vector< const MaterialProperty< Real > * > _derivatives_Fa
Derivatives of with respect to all coupled variables.
Definition: KKSACBulkBase.h:41
ACBulk< Real >::_L
const MaterialProperty< Real > & _L
Mobility.
Definition: ACBulk.h:46
KKSACBulkF::_prop_dFb
const MaterialProperty< Real > & _prop_dFb
Derivative of the free energy function .
Definition: KKSACBulkF.h:49