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

KKSMultiACBulkBase child class for the free energy term \( \sum_j \frac{\partial h_j}{\partial \eta_i} F_j + w_i \frac{dg}{d\eta_i} \) in the the Allen-Cahn bulk residual. More...

#include <KKSMultiACBulkF.h>

Inheritance diagram for KKSMultiACBulkF:
[legend]

Public Member Functions

 KKSMultiACBulkF (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 ()
 

Protected Attributes

Real _wi
 double well height parameter More...
 
const MaterialProperty< Real > & _prop_dgi
 Derivative of the double well function \( \frac d{d\eta} g(\eta) \). More...
 
const MaterialProperty< Real > & _prop_d2gi
 Second derivative of the double well function \( \frac {d^2}{d\eta^2} g(\eta) \). More...
 
unsigned int _nvar
 Number of coupled variables. More...
 
VariableName _etai_name
 name of order parameter that derivatives are taken wrt (needed to retrieve the derivative material properties) More...
 
unsigned int _etai_var
 index of order parameter that derivatives are taken wrt More...
 
std::vector< MaterialPropertyName > _Fj_names
 Names of free energy functions for each phase \( F_j \). More...
 
unsigned int _num_j
 
std::vector< const MaterialProperty< Real > * > _prop_Fj
 Values of the free energy functions for each phase \( F_j \). More...
 
std::vector< std::vector< const MaterialProperty< Real > * > > _prop_dFjdarg
 Derivatives of the free energy functions (needed for off-diagonal Jacobians) More...
 
std::vector< MaterialPropertyName > _hj_names
 switching function names More...
 
std::vector< const MaterialProperty< Real > * > _prop_hj
 Values of the switching functions for each phase \( h_j \). More...
 
std::vector< const MaterialProperty< Real > * > _prop_dhjdetai
 Derivatives of the switching functions wrt the order parameter for this kernel. More...
 
std::vector< const MaterialProperty< Real > * > _prop_d2hjdetai2
 Second derivatives of the switching functions wrt the order parameter for this kernel. More...
 
std::vector< std::vector< const MaterialProperty< Real > * > > _prop_d2hjdetaidarg
 Second derivatives of the switching functions (needed for off-diagonal Jacobians) 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

KKSMultiACBulkBase child class for the free energy term \( \sum_j \frac{\partial h_j}{\partial \eta_i} F_j + w_i \frac{dg}{d\eta_i} \) in the the Allen-Cahn bulk residual.

The non-linear variable for this Kernel is the order parameter \( eta_i \).

Definition at line 25 of file KKSMultiACBulkF.h.

Member Enumeration Documentation

enum ACBulk::PFFunctionType
protectedinherited

Definition at line 35 of file ACBulk.h.

Constructor & Destructor Documentation

KKSMultiACBulkF::KKSMultiACBulkF ( const InputParameters &  parameters)

Definition at line 22 of file KKSMultiACBulkF.C.

23  : KKSMultiACBulkBase(parameters),
24  _wi(getParam<Real>("wi")),
25  _prop_dgi(getMaterialPropertyDerivative<Real>("gi_name", _etai_name)),
26  _prop_d2gi(getMaterialPropertyDerivative<Real>("gi_name", _etai_name, _etai_name))
27 {
28 }
const MaterialProperty< Real > & _prop_dgi
Derivative of the double well function .
const MaterialProperty< Real > & _prop_d2gi
Second derivative of the double well function .
Real _wi
double well height parameter
VariableName _etai_name
name of order parameter that derivatives are taken wrt (needed to retrieve the derivative material pr...
KKSMultiACBulkBase(const InputParameters &parameters)

Member Function Documentation

Real KKSMultiACBulkF::computeDFDOP ( PFFunctionType  type)
protectedvirtual

Implements ACBulk< Real >.

Definition at line 31 of file KKSMultiACBulkF.C.

32 {
33  Real sum = 0.0;
34 
35  switch (type)
36  {
37  case Residual:
38  for (unsigned int n = 0; n < _num_j; ++n)
39  sum += (*_prop_dhjdetai[n])[_qp] * (*_prop_Fj[n])[_qp];
40 
41  return sum + _wi * _prop_dgi[_qp];
42 
43  case Jacobian:
44  // For when this kernel is used in the Lagrange multiplier equation
45  // In that case the Lagrange multiplier is the nonlinear variable
46  if (_etai_var != _var.number())
47  return 0.0;
48 
49  // For when eta_i is the nonlinear variable
50  for (unsigned int n = 0; n < _num_j; ++n)
51  sum += (*_prop_d2hjdetai2[n])[_qp] * (*_prop_Fj[n])[_qp];
52 
53  return _phi[_j][_qp] * (sum + _wi * _prop_d2gi[_qp]);
54  }
55 
56  mooseError("Invalid type passed in");
57 }
const MaterialProperty< Real > & _prop_dgi
Derivative of the double well function .
const MaterialProperty< Real > & _prop_d2gi
Second derivative of the double well function .
Real _wi
double well height parameter
std::vector< const MaterialProperty< Real > * > _prop_dhjdetai
Derivatives of the switching functions wrt the order parameter for this kernel.
std::vector< const MaterialProperty< Real > * > _prop_Fj
Values of the free energy functions for each phase .
std::vector< const MaterialProperty< Real > * > _prop_d2hjdetai2
Second derivatives of the switching functions wrt the order parameter for this kernel.
unsigned int _etai_var
index of order parameter that derivatives are taken wrt
Real KKSMultiACBulkF::computeQpOffDiagJacobian ( unsigned int  jvar)
protectedvirtual

Reimplemented from ACBulk< Real >.

Definition at line 60 of file KKSMultiACBulkF.C.

61 {
62  // get the coupled variable jvar is referring to
63  const unsigned int cvar = mapJvarToCvar(jvar);
64 
65  // first get dependence of mobility _L on other variables using parent class
66  // member function
68 
69  // Then add dependence of KKSMultiACBulkF on other variables
70  Real sum = 0.0;
71  for (unsigned int n = 0; n < _num_j; ++n)
72  sum += (*_prop_d2hjdetaidarg[n][cvar])[_qp] * (*_prop_Fj[n])[_qp] +
73  (*_prop_dhjdetai[n])[_qp] * (*_prop_dFjdarg[n][cvar])[_qp];
74 
75  // Handle the case when this kernel is used in the Lagrange multiplier equation
76  // In this case the second derivative of the barrier function contributes
77  // to the off-diagonal Jacobian
78  if (jvar == _etai_var)
79  sum += _wi * _prop_d2gi[_qp];
80 
81  res += _L[_qp] * sum * _phi[_j][_qp] * _test[_i][_qp];
82 
83  return res;
84 }
const MaterialProperty< Real > & _prop_d2gi
Second derivative of the double well function .
const MaterialProperty< Real > & _L
Mobility.
Definition: ACBulk.h:44
Real _wi
double well height parameter
std::vector< std::vector< const MaterialProperty< Real > * > > _prop_d2hjdetaidarg
Second derivatives of the switching functions (needed for off-diagonal Jacobians) ...
std::vector< const MaterialProperty< Real > * > _prop_dhjdetai
Derivatives of the switching functions wrt the order parameter for this kernel.
std::vector< const MaterialProperty< Real > * > _prop_Fj
Values of the free energy functions for each phase .
virtual Real computeQpOffDiagJacobian(unsigned int jvar)
Definition: ACBulk.h:114
unsigned int _etai_var
index of order parameter that derivatives are taken wrt
std::vector< std::vector< const MaterialProperty< Real > * > > _prop_dFjdarg
Derivatives of the free energy functions (needed for off-diagonal Jacobians)
void KKSMultiACBulkBase::initialSetup ( )
virtualinherited

Reimplemented from ACBulk< Real >.

Definition at line 75 of file KKSMultiACBulkBase.C.

76 {
78 
79  for (unsigned int n = 0; n < _num_j; ++n)
80  {
81  validateNonlinearCoupling<Real>(_Fj_names[n]);
82  validateNonlinearCoupling<Real>(_hj_names[n]);
83  }
84 }
virtual void initialSetup()
Definition: ACBulk.h:83
std::vector< MaterialPropertyName > _Fj_names
Names of free energy functions for each phase .
std::vector< MaterialPropertyName > _hj_names
switching function names
virtual Real ACBulk< Real >::precomputeQpJacobian ( )
protectedvirtualinherited
virtual Real ACBulk< Real >::precomputeQpResidual ( )
protectedvirtualinherited
static InputParameters ACBulk< Real >::validParams ( )
staticinherited

Member Data Documentation

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

Mobility derivative w.r.t coupled variables.

Definition at line 50 of file ACBulk.h.

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

Mobility derivative w.r.t. order parameter.

Definition at line 47 of file ACBulk.h.

VariableName KKSMultiACBulkBase::_etai_name
protectedinherited

name of order parameter that derivatives are taken wrt (needed to retrieve the derivative material properties)

Definition at line 37 of file KKSMultiACBulkBase.h.

Referenced by KKSMultiACBulkBase::KKSMultiACBulkBase().

unsigned int KKSMultiACBulkBase::_etai_var
protectedinherited

index of order parameter that derivatives are taken wrt

Definition at line 40 of file KKSMultiACBulkBase.h.

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

std::vector<MaterialPropertyName> KKSMultiACBulkBase::_Fj_names
protectedinherited

Names of free energy functions for each phase \( F_j \).

Definition at line 43 of file KKSMultiACBulkBase.h.

Referenced by KKSMultiACBulkBase::initialSetup(), KKSMultiACBulkBase::KKSMultiACBulkBase(), and KKSMultiACBulkC::KKSMultiACBulkC().

std::vector<MaterialPropertyName> KKSMultiACBulkBase::_hj_names
protectedinherited

switching function names

Definition at line 53 of file KKSMultiACBulkBase.h.

Referenced by KKSMultiACBulkBase::initialSetup(), and KKSMultiACBulkBase::KKSMultiACBulkBase().

const MaterialProperty<Real >& ACBulk< Real >::_L
protectedinherited
unsigned int KKSMultiACBulkBase::_num_j
protectedinherited
unsigned int KKSMultiACBulkBase::_nvar
protectedinherited

Number of coupled variables.

Definition at line 34 of file KKSMultiACBulkBase.h.

Referenced by KKSMultiACBulkBase::KKSMultiACBulkBase(), and KKSMultiACBulkC::KKSMultiACBulkC().

const MaterialProperty<Real>& KKSMultiACBulkF::_prop_d2gi
protected

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

Definition at line 41 of file KKSMultiACBulkF.h.

Referenced by computeDFDOP(), and computeQpOffDiagJacobian().

std::vector<const MaterialProperty<Real> *> KKSMultiACBulkBase::_prop_d2hjdetai2
protectedinherited

Second derivatives of the switching functions wrt the order parameter for this kernel.

Definition at line 62 of file KKSMultiACBulkBase.h.

Referenced by KKSMultiACBulkC::computeDFDOP(), computeDFDOP(), and KKSMultiACBulkBase::KKSMultiACBulkBase().

std::vector<std::vector<const MaterialProperty<Real> *> > KKSMultiACBulkBase::_prop_d2hjdetaidarg
protectedinherited

Second derivatives of the switching functions (needed for off-diagonal Jacobians)

Definition at line 65 of file KKSMultiACBulkBase.h.

Referenced by KKSMultiACBulkC::computeQpOffDiagJacobian(), computeQpOffDiagJacobian(), and KKSMultiACBulkBase::KKSMultiACBulkBase().

std::vector<std::vector<const MaterialProperty<Real> *> > KKSMultiACBulkBase::_prop_dFjdarg
protectedinherited

Derivatives of the free energy functions (needed for off-diagonal Jacobians)

Definition at line 50 of file KKSMultiACBulkBase.h.

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

const MaterialProperty<Real>& KKSMultiACBulkF::_prop_dgi
protected

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

Definition at line 38 of file KKSMultiACBulkF.h.

Referenced by computeDFDOP().

std::vector<const MaterialProperty<Real> *> KKSMultiACBulkBase::_prop_dhjdetai
protectedinherited

Derivatives of the switching functions wrt the order parameter for this kernel.

Definition at line 59 of file KKSMultiACBulkBase.h.

Referenced by KKSMultiACBulkC::computeDFDOP(), computeDFDOP(), computeQpOffDiagJacobian(), KKSMultiACBulkC::computeQpOffDiagJacobian(), and KKSMultiACBulkBase::KKSMultiACBulkBase().

std::vector<const MaterialProperty<Real> *> KKSMultiACBulkBase::_prop_Fj
protectedinherited

Values of the free energy functions for each phase \( F_j \).

Definition at line 47 of file KKSMultiACBulkBase.h.

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

std::vector<const MaterialProperty<Real> *> KKSMultiACBulkBase::_prop_hj
protectedinherited

Values of the switching functions for each phase \( h_j \).

Definition at line 56 of file KKSMultiACBulkBase.h.

Referenced by KKSMultiACBulkBase::KKSMultiACBulkBase().

Real KKSMultiACBulkF::_wi
protected

double well height parameter

Definition at line 35 of file KKSMultiACBulkF.h.

Referenced by computeDFDOP(), and computeQpOffDiagJacobian().


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