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

ACBulk child class that takes all the necessary data from a KKSBaseMaterial and sets up the Allen-Cahn bulk term. More...

#include <KKSACBulkBase.h>

Inheritance diagram for KKSACBulkBase:
[legend]

Public Member Functions

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

Static Public Member Functions

static InputParameters validParams ()
 

Protected Types

enum  PFFunctionType
 

Protected Member Functions

virtual Real precomputeQpResidual ()
 
virtual Real precomputeQpJacobian ()
 
virtual Real computeQpOffDiagJacobian (unsigned int jvar)
 
virtual Real computeDFDOP (PFFunctionType type)=0
 

Protected Attributes

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

ACBulk child class that takes all the necessary data from a KKSBaseMaterial and sets up the Allen-Cahn bulk term.

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

Definition at line 26 of file KKSACBulkBase.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

◆ KKSACBulkBase()

KKSACBulkBase::KKSACBulkBase ( const InputParameters &  parameters)

Definition at line 27 of file KKSACBulkBase.C.

28  : ACBulk<Real>(parameters),
29  // number of coupled variables (ca, args_a[])
30  _nvar(_coupled_moose_vars.size()),
31  _eta_name(_var.name()),
32  _prop_Fa(getMaterialProperty<Real>("fa_name")),
33  _prop_dFa(getMaterialPropertyDerivative<Real>("fa_name", _eta_name)),
34  _prop_dh(getMaterialPropertyDerivative<Real>("h_name", _eta_name)),
35  _prop_d2h(getMaterialPropertyDerivative<Real>("h_name", _eta_name, _eta_name))
36 {
37  // reserve space for derivatives
38  _derivatives_Fa.resize(_nvar);
39  _derivatives_Fb.resize(_nvar);
40  _grad_args.resize(_nvar);
41 
42  // Iterate over all coupled variables
43  for (unsigned int i = 0; i < _nvar; ++i)
44  {
45  MooseVariable * cvar = _coupled_standard_moose_vars[i];
46 
47  // get the first derivatives of Fa and Fb material property
48  _derivatives_Fa[i] = &getMaterialPropertyDerivative<Real>("fa_name", cvar->name());
49  _derivatives_Fb[i] = &getMaterialPropertyDerivative<Real>("fb_name", cvar->name());
50 
51  // get the gradient
52  _grad_args[i] = &(cvar->gradSln());
53  }
54 }

Member Function Documentation

◆ computeDFDOP()

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

◆ computeQpOffDiagJacobian()

Real ACBulk< Real >::computeQpOffDiagJacobian ( unsigned int  jvar)
protectedvirtualinherited

Reimplemented in CoupledAllenCahn, AllenCahn, KKSACBulkC, KKSACBulkF, KKSMultiACBulkC, KKSMultiACBulkF, ACGrGrMulti, ACGrGrPoly, ACBarrierFunction, and ACGBPoly.

Definition at line 116 of file ACBulk.h.

117 {
118  // Get the coupled variable jvar is referring to
119  const unsigned int cvar = mapJvarToCvar(jvar);
120 
121  // Set off-diagonal Jacobian term from mobility derivatives
122  return (*_dLdarg[cvar])[_qp] * _phi[_j][_qp] * computeDFDOP(Residual) * _test[_i][_qp];
123 }

◆ initialSetup()

void KKSACBulkBase::initialSetup ( )
virtual

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
protected

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

Definition at line 41 of file KKSACBulkBase.h.

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

◆ _derivatives_Fb

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

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

Definition at line 44 of file KKSACBulkBase.h.

Referenced by KKSACBulkF::computeQpOffDiagJacobian(), and 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
protected

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
protected

Gradients for all coupled variables.

Definition at line 59 of file KKSACBulkBase.h.

Referenced by KKSACBulkBase().

◆ _L

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

Mobility.

Definition at line 46 of file ACBulk.h.

◆ _nvar

unsigned int KKSACBulkBase::_nvar
protected

Number of coupled variables.

Definition at line 35 of file KKSACBulkBase.h.

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

◆ _prop_d2h

const MaterialProperty<Real>& KKSACBulkBase::_prop_d2h
protected

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 KKSACBulkF::computeDFDOP().

◆ _prop_dFa

const MaterialProperty<Real>& KKSACBulkBase::_prop_dFa
protected

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

Definition at line 50 of file KKSACBulkBase.h.

◆ _prop_dh

const MaterialProperty<Real>& KKSACBulkBase::_prop_dh
protected

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

Definition at line 53 of file KKSACBulkBase.h.

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

◆ _prop_Fa

const MaterialProperty<Real>& KKSACBulkBase::_prop_Fa
protected

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

Definition at line 47 of file KKSACBulkBase.h.

Referenced by KKSACBulkF::computeDFDOP().


The documentation for this class was generated from the following files:
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
KKSACBulkBase::_prop_dh
const MaterialProperty< Real > & _prop_dh
Derivative of the switching function .
Definition: KKSACBulkBase.h:53
ACBulk< Real >
ACBulk< Real >::_dLdarg
std::vector< const MaterialProperty< Real > * > _dLdarg
Mobility derivative w.r.t coupled variables.
Definition: ACBulk.h:52
KKSACBulkBase::_nvar
unsigned int _nvar
Number of coupled variables.
Definition: KKSACBulkBase.h:35
ACBulk< Real >::_dLdop
const MaterialProperty< Real > & _dLdop
Mobility derivative w.r.t. order parameter.
Definition: ACBulk.h:49
KKSACBulkBase::_grad_args
std::vector< const VariableGradient * > _grad_args
Gradients for all coupled variables.
Definition: KKSACBulkBase.h:59
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
KKSACBulkBase::_derivatives_Fa
std::vector< const MaterialProperty< Real > * > _derivatives_Fa
Derivatives of with respect to all coupled variables.
Definition: KKSACBulkBase.h:41
KKSACBulkBase::_prop_dFa
const MaterialProperty< Real > & _prop_dFa
Derivative of the free energy function .
Definition: KKSACBulkBase.h:50
ACBulk< Real >::_L
const MaterialProperty< Real > & _L
Mobility.
Definition: ACBulk.h:46