www.mooseframework.org
Public Types | 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 Types

typedef DerivativeMaterialPropertyNameInterface::SymbolName SymbolName
 

Public Member Functions

 KKSACBulkF (const InputParameters &parameters)
 
virtual void initialSetup ()
 
const GenericMaterialProperty< U, is_ad > & getDefaultMaterialProperty (const std::string &name)
 
const GenericMaterialProperty< U, is_ad > & getDefaultMaterialPropertyByName (const std::string &name)
 
void validateDerivativeMaterialPropertyBase (const std::string &base)
 
const MaterialPropertyName derivativePropertyName (const MaterialPropertyName &base, const std::vector< SymbolName > &c) const
 
const MaterialPropertyName derivativePropertyNameFirst (const MaterialPropertyName &base, const SymbolName &c1) const
 
const MaterialPropertyName derivativePropertyNameSecond (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2) const
 
const MaterialPropertyName derivativePropertyNameThird (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2, const SymbolName &c3) const
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const std::vector< VariableName > &c)
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const std::vector< VariableName > &c)
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const std::vector< VariableName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const SymbolName &c1, unsigned int v2, unsigned int v3=libMesh::invalid_uint)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, unsigned int v1, unsigned int v2=libMesh::invalid_uint, unsigned int v3=libMesh::invalid_uint)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const std::vector< VariableName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const SymbolName &c1, unsigned int v2, unsigned int v3=libMesh::invalid_uint)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, unsigned int v1, unsigned int v2=libMesh::invalid_uint, unsigned int v3=libMesh::invalid_uint)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< VariableName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< SymbolName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< VariableName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< SymbolName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
void validateCoupling (const MaterialPropertyName &base, const std::vector< VariableName > &c, bool validate_aux=true)
 
void validateCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="")
 
void validateCoupling (const MaterialPropertyName &base, const std::vector< VariableName > &c, bool validate_aux=true)
 
void validateCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="")
 
void validateNonlinearCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="")
 
void validateNonlinearCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="")
 
const MaterialPropertyName propertyName (const MaterialPropertyName &base, const std::vector< SymbolName > &c) const
 
const MaterialPropertyName propertyName (const MaterialPropertyName &base, const std::vector< SymbolName > &c) const
 
const MaterialPropertyName propertyNameFirst (const MaterialPropertyName &base, const SymbolName &c1) const
 
const MaterialPropertyName propertyNameFirst (const MaterialPropertyName &base, const SymbolName &c1) const
 
const MaterialPropertyName propertyNameSecond (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2) const
 
const MaterialPropertyName propertyNameSecond (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2) const
 
const MaterialPropertyName propertyNameThird (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2, const SymbolName &c3) const
 
const MaterialPropertyName propertyNameThird (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2, const SymbolName &c3) const
 

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...
 
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 23 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 29 of file KKSACBulkF.C.

30  : KKSACBulkBase(parameters),
31  _w(getParam<Real>("w")),
32  _prop_dg(getMaterialPropertyDerivative<Real>("g_name", _eta_name)),
33  _prop_d2g(getMaterialPropertyDerivative<Real>("g_name", _eta_name, _eta_name)),
34  _prop_Fb(getMaterialProperty<Real>("fb_name")),
35  _prop_dFb(getMaterialPropertyDerivative<Real>("fb_name", _eta_name))
36 {
37 }
KKSACBulkBase(const InputParameters &parameters)
Definition: KKSACBulkBase.C:26
const MaterialProperty< Real > & _prop_Fb
Value of the free energy function .
Definition: KKSACBulkF.h:44
Real _w
double well height parameter
Definition: KKSACBulkF.h:35
const MaterialProperty< Real > & _prop_dg
Derivative of the double well function .
Definition: KKSACBulkF.h:38
const MaterialProperty< Real > & _prop_dFb
Derivative of the free energy function .
Definition: KKSACBulkF.h:47
const MaterialProperty< Real > & _prop_d2g
Second derivative of the double well function .
Definition: KKSACBulkF.h:41
VariableName _eta_name
name of the order parameter (needed to retrieve the derivative material properties) ...
Definition: KKSACBulkBase.h:33

Member Function Documentation

◆ computeDFDOP() [1/2]

Real KKSACBulkF::computeDFDOP ( PFFunctionType  type)
protectedvirtual

Definition at line 40 of file KKSACBulkF.C.

41 {
42  const Real A1 = _prop_Fa[_qp] - _prop_Fb[_qp];
43  switch (type)
44  {
45  case Residual:
46  return -_prop_dh[_qp] * A1 + _w * _prop_dg[_qp];
47 
48  case Jacobian:
49  return _phi[_j][_qp] * (-_prop_d2h[_qp] * A1 + _w * _prop_d2g[_qp]);
50  }
51 
52  mooseError("Invalid type passed in");
53 }
void mooseError(Args &&... args)
const MaterialProperty< Real > & _prop_Fa
Value of the free energy function .
Definition: KKSACBulkBase.h:42
const MaterialProperty< Real > & _prop_Fb
Value of the free energy function .
Definition: KKSACBulkF.h:44
Real _w
double well height parameter
Definition: KKSACBulkF.h:35
const MaterialProperty< Real > & _prop_dg
Derivative of the double well function .
Definition: KKSACBulkF.h:38
const MaterialProperty< Real > & _prop_dh
Derivative of the switching function .
Definition: KKSACBulkBase.h:48
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const MaterialProperty< Real > & _prop_d2g
Second derivative of the double well function .
Definition: KKSACBulkF.h:41
const MaterialProperty< Real > & _prop_d2h
Second derivative of the switching function .
Definition: KKSACBulkBase.h:51

◆ 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 56 of file KKSACBulkF.C.

57 {
58  // get the coupled variable jvar is referring to
59  const unsigned int cvar = mapJvarToCvar(jvar);
60 
61  // first get dependence of mobility _L on other variables using parent class
62  // member function
64 
65  return res - _L[_qp] * _prop_dh[_qp] *
66  ((*_derivatives_Fa[cvar])[_qp] - (*_derivatives_Fb[cvar])[_qp]) * _phi[_j][_qp] *
67  _test[_i][_qp];
68 }
const MaterialProperty< Real > & _L
Mobility.
Definition: ACBulk.h:46
std::vector< const MaterialProperty< Real > * > _derivatives_Fa
Derivatives of with respect to all coupled variables.
Definition: KKSACBulkBase.h:36
const MaterialProperty< Real > & _prop_dh
Derivative of the switching function .
Definition: KKSACBulkBase.h:48
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual Real computeQpOffDiagJacobian(unsigned int jvar)
Definition: ACBulk.h:110
std::vector< const MaterialProperty< Real > * > _derivatives_Fb
Derivatives of with respect to all coupled variables.
Definition: KKSACBulkBase.h:39

◆ initialSetup()

void KKSACBulkBase::initialSetup ( )
virtualinherited

Reimplemented from ACBulk< Real >.

Definition at line 53 of file KKSACBulkBase.C.

54 {
56  validateNonlinearCoupling<Real>("fa_name");
57  validateNonlinearCoupling<Real>("fb_name");
58 }
virtual void initialSetup()
Definition: ACBulk.h:79

◆ precomputeQpJacobian()

Real ACBulk< Real >::precomputeQpJacobian ( )
protectedvirtualinherited

Definition at line 97 of file ACBulk.h.

98 {
99  // Get free energy derivative and Jacobian
100  Real dFdop = computeDFDOP(Residual);
101 
102  Real JdFdop = computeDFDOP(Jacobian);
103 
104  // Set Jacobian value using product rule
105  return _L[_qp] * JdFdop + _dLdop[_qp] * _phi[_j][_qp] * dFdop;
106 }
const MaterialProperty< Real > & _L
Mobility.
Definition: ACBulk.h:46
virtual Real computeDFDOP(PFFunctionType type)=0
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const MaterialProperty< Real > & _dLdop
Mobility derivative w.r.t. order parameter.
Definition: ACBulk.h:49

◆ precomputeQpResidual()

Real ACBulk< Real >::precomputeQpResidual ( )
protectedvirtualinherited

Definition at line 86 of file ACBulk.h.

87 {
88  // Get free energy derivative from function
89  Real dFdop = computeDFDOP(Residual);
90 
91  // Set residual
92  return _L[_qp] * dFdop;
93 }
const MaterialProperty< Real > & _L
Mobility.
Definition: ACBulk.h:46
virtual Real computeDFDOP(PFFunctionType type)=0
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

◆ validParams()

InputParameters KKSACBulkF::validParams ( )
static

Definition at line 15 of file KKSACBulkF.C.

16 {
18  params.addClassDescription("KKS model kernel (part 1 of 2) for the Bulk Allen-Cahn. This "
19  "includes all terms NOT dependent on chemical potential.");
20  params.addRequiredParam<Real>("w", "Double well height parameter");
21  params.addParam<MaterialPropertyName>(
22  "g_name", "g", "Base name for the double well function g(eta)");
23  params.addRequiredParam<MaterialPropertyName>(
24  "fb_name",
25  "Base name of the free energy function F (f_base in the corresponding KKSBaseMaterial)");
26  return params;
27 }
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addRequiredParam(const std::string &name, const std::string &doc_string)
static InputParameters validParams()
Definition: KKSACBulkBase.C:13
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addClassDescription(const std::string &doc_string)

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 36 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 39 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 33 of file KKSACBulkBase.h.

◆ _grad_args

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

Gradients for all coupled variables.

Definition at line 54 of file KKSACBulkBase.h.

Referenced by KKSACBulkBase::KKSACBulkBase().

◆ _L

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

◆ _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 41 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 51 of file KKSACBulkBase.h.

Referenced by NestedKKSACBulkC::computeDFDOP(), NestedKKSACBulkF::computeDFDOP(), 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 45 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 47 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 38 of file KKSACBulkF.h.

Referenced by computeDFDOP().

◆ _prop_dh

const MaterialProperty<Real>& KKSACBulkBase::_prop_dh
protectedinherited

◆ _prop_Fa

const MaterialProperty<Real>& KKSACBulkBase::_prop_Fa
protectedinherited

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

Definition at line 42 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 44 of file KKSACBulkF.h.

Referenced by computeDFDOP().

◆ _w

Real KKSACBulkF::_w
protected

double well height parameter

Definition at line 35 of file KKSACBulkF.h.

Referenced by computeDFDOP().


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