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_Fb
 Value of the free energy function \( F_b \). More...
 
const MaterialProperty< Real > & _prop_dFa
 Derivative of the free energy function \( \frac d{d\eta} F_a \). More...
 
const MaterialProperty< Real > & _prop_dFb
 Derivative of the free energy function \( \frac d{d\eta} F_b \). 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 27 of file KKSACBulkBase.h.

Member Enumeration Documentation

◆ PFFunctionType

enum ACBulk::PFFunctionType
protectedinherited

Definition at line 38 of file ACBulk.h.

Constructor & Destructor Documentation

◆ KKSACBulkBase()

KKSACBulkBase::KKSACBulkBase ( const InputParameters &  parameters)

Definition at line 30 of file KKSACBulkBase.C.

31  : ACBulk<Real>(parameters),
32  // number of coupled variables (ca, args_a[])
33  _nvar(_coupled_moose_vars.size()),
34  _eta_name(_var.name()),
35  _prop_Fa(getMaterialProperty<Real>("fa_name")),
36  _prop_Fb(getMaterialProperty<Real>("fb_name")),
37  _prop_dFa(getMaterialPropertyDerivative<Real>("fa_name", _eta_name)),
38  _prop_dFb(getMaterialPropertyDerivative<Real>("fb_name", _eta_name)),
39  _prop_dh(getMaterialPropertyDerivative<Real>("h_name", _eta_name)),
40  _prop_d2h(getMaterialPropertyDerivative<Real>("h_name", _eta_name, _eta_name))
41 {
42  // reserve space for derivatives
43  _derivatives_Fa.resize(_nvar);
44  _derivatives_Fb.resize(_nvar);
45  _grad_args.resize(_nvar);
46 
47  // Iterate over all coupled variables
48  for (unsigned int i = 0; i < _nvar; ++i)
49  {
50  MooseVariable * cvar = _coupled_standard_moose_vars[i];
51 
52  // get the first derivatives of Fa and Fb material property
53  _derivatives_Fa[i] = &getMaterialPropertyDerivative<Real>("fa_name", cvar->name());
54  _derivatives_Fb[i] = &getMaterialPropertyDerivative<Real>("fb_name", cvar->name());
55 
56  // get the gradient
57  _grad_args[i] = &(cvar->gradSln());
58  }
59 }
const MaterialProperty< Real > & _prop_dFa
Derivative of the free energy function .
Definition: KKSACBulkBase.h:54
const MaterialProperty< Real > & _prop_Fa
Value of the free energy function .
Definition: KKSACBulkBase.h:48
std::vector< const VariableGradient * > _grad_args
Gradients for all coupled variables.
Definition: KKSACBulkBase.h:66
const MaterialProperty< Real > & _prop_Fb
Value of the free energy function .
Definition: KKSACBulkBase.h:51
unsigned int _nvar
Number of coupled variables.
Definition: KKSACBulkBase.h:36
std::vector< const MaterialProperty< Real > * > _derivatives_Fa
Derivatives of with respect to all coupled variables.
Definition: KKSACBulkBase.h:42
const MaterialProperty< Real > & _prop_dFb
Derivative of the free energy function .
Definition: KKSACBulkBase.h:57
const MaterialProperty< Real > & _prop_dh
Derivative of the switching function .
Definition: KKSACBulkBase.h:60
const MaterialProperty< Real > & _prop_d2h
Second derivative of the switching function .
Definition: KKSACBulkBase.h:63
std::vector< const MaterialProperty< Real > * > _derivatives_Fb
Derivatives of with respect to all coupled variables.
Definition: KKSACBulkBase.h:45
VariableName _eta_name
name of the order parameter (needed to retrieve the derivative material properties) ...
Definition: KKSACBulkBase.h:39

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 117 of file ACBulk.h.

118 {
119  // Get the coupled variable jvar is referring to
120  const unsigned int cvar = mapJvarToCvar(jvar);
121 
122  // Set off-diagonal Jacobian term from mobility derivatives
123  return (*_dLdarg[cvar])[_qp] * _phi[_j][_qp] * computeDFDOP(Residual) * _test[_i][_qp];
124 }
virtual Real computeDFDOP(PFFunctionType type)=0
std::vector< const MaterialProperty< Real > *> _dLdarg
Mobility derivative w.r.t coupled variables.
Definition: ACBulk.h:53

◆ initialSetup()

void KKSACBulkBase::initialSetup ( )
virtual

Reimplemented from ACBulk< Real >.

Definition at line 62 of file KKSACBulkBase.C.

63 {
65  validateNonlinearCoupling<Real>("fa_name");
66  validateNonlinearCoupling<Real>("fb_name");
67 }
virtual void initialSetup()
Definition: ACBulk.h:86

◆ 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

◆ _derivatives_Fa

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

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

Definition at line 42 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 45 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 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.

◆ _eta_name

VariableName KKSACBulkBase::_eta_name
protected

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

Definition at line 39 of file KKSACBulkBase.h.

◆ _grad_args

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

Gradients for all coupled variables.

Definition at line 66 of file KKSACBulkBase.h.

Referenced by KKSACBulkBase().

◆ _L

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

◆ _nvar

unsigned int KKSACBulkBase::_nvar
protected

Number of coupled variables.

Definition at line 36 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 63 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 54 of file KKSACBulkBase.h.

◆ _prop_dFb

const MaterialProperty<Real>& KKSACBulkBase::_prop_dFb
protected

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

Definition at line 57 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 60 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 48 of file KKSACBulkBase.h.

Referenced by KKSACBulkF::computeDFDOP().

◆ _prop_Fb

const MaterialProperty<Real>& KKSACBulkBase::_prop_Fb
protected

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

Definition at line 51 of file KKSACBulkBase.h.

Referenced by KKSACBulkF::computeDFDOP().


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