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

Kernel 2 of 2 for interfacial energy anisotropy in the Allen-Cahn equation as implemented in R. More...

#include <ACInterfaceKobayashi2.h>

Inheritance diagram for ACInterfaceKobayashi2:
[legend]

Public Types

typedef DerivativeMaterialPropertyNameInterface::SymbolName SymbolName
 

Public Member Functions

 ACInterfaceKobayashi2 (const InputParameters &parameters)
 
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 Member Functions

virtual RealGradient precomputeQpResidual ()
 
virtual RealGradient precomputeQpJacobian ()
 
virtual Real computeQpOffDiagJacobian (unsigned int jvar)
 

Protected Attributes

const MaterialProperty< Real > & _L
 Mobility. More...
 
const MaterialProperty< Real > & _dLdop
 
const MaterialProperty< Real > & _eps
 Interfacial parameter. More...
 
const MaterialProperty< RealGradient > & _depsdgrad_op
 
std::vector< const MaterialProperty< Real > * > _dLdarg
 Mobility derivative w.r.t. other coupled variables. More...
 
std::vector< const MaterialProperty< Real > * > _depsdarg
 

Detailed Description

Kernel 2 of 2 for interfacial energy anisotropy in the Allen-Cahn equation as implemented in R.

Kobayashi, Physica D, 63, 410-423 (1993). doi:10.1016/0167-2789(93)90120-P This kernel implements the third term on the right side of eq. (3) of the paper.

Definition at line 22 of file ACInterfaceKobayashi2.h.

Constructor & Destructor Documentation

◆ ACInterfaceKobayashi2()

ACInterfaceKobayashi2::ACInterfaceKobayashi2 ( const InputParameters parameters)

Definition at line 28 of file ACInterfaceKobayashi2.C.

30  _L(getMaterialProperty<Real>("mob_name")),
31  _dLdop(getMaterialPropertyDerivative<Real>("mob_name", _var.name())),
32  _eps(getMaterialProperty<Real>("eps_name")),
33  _depsdgrad_op(getMaterialProperty<RealGradient>("depsdgrad_op_name")),
34  _dLdarg(_n_args),
35  _depsdarg(_n_args)
36 {
37  // Iterate over all coupled variables
38  for (unsigned int i = 0; i < _n_args; ++i)
39  {
40  _dLdarg[i] = &getMaterialPropertyDerivative<Real>("mob_name", i);
41  _depsdarg[i] = &getMaterialPropertyDerivative<Real>("eps_name", i);
42  }
43 }
const MaterialProperty< RealGradient > & _depsdgrad_op
const MaterialProperty< Real > & _L
Mobility.
const MaterialProperty< Real > & _eps
Interfacial parameter.
const MaterialProperty< Real > & _dLdop
std::vector< const MaterialProperty< Real > * > _depsdarg
std::vector< const MaterialProperty< Real > * > _dLdarg
Mobility derivative w.r.t. other coupled variables.

Member Function Documentation

◆ computeQpOffDiagJacobian()

Real ACInterfaceKobayashi2::computeQpOffDiagJacobian ( unsigned int  jvar)
protectedvirtual

Definition at line 64 of file ACInterfaceKobayashi2.C.

65 {
66  // get the coupled variable jvar is referring to
67  const unsigned int cvar = mapJvarToCvar(jvar);
68 
69  // Set off-diagonal jaocbian terms from mobility and epsilon dependence
70  Real dsum = _L[_qp] * 2.0 * _eps[_qp] * (*_depsdarg[cvar])[_qp] * _phi[_j][_qp] * _grad_u[_qp] *
71  _grad_test[_i][_qp];
72  dsum += _eps[_qp] * _eps[_qp] * (*_dLdarg[cvar])[_qp] * _phi[_j][_qp] * _grad_u[_qp] *
73  _grad_test[_i][_qp];
74 
75  return dsum;
76 }
const MaterialProperty< Real > & _L
Mobility.
const MaterialProperty< Real > & _eps
Interfacial parameter.
std::vector< const MaterialProperty< Real > * > _depsdarg
std::vector< const MaterialProperty< Real > * > _dLdarg
Mobility derivative w.r.t. other coupled variables.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

◆ precomputeQpJacobian()

RealGradient ACInterfaceKobayashi2::precomputeQpJacobian ( )
protectedvirtual

Definition at line 53 of file ACInterfaceKobayashi2.C.

54 {
55  // Calculate depsdop_i
56  Real depsdop_i = _depsdgrad_op[_qp] * _grad_phi[_j][_qp];
57 
58  // Set Jacobian using product rule
59  return _L[_qp] *
60  (_eps[_qp] * _eps[_qp] * _grad_phi[_j][_qp] + 2.0 * _eps[_qp] * depsdop_i * _grad_u[_qp]);
61 }
const MaterialProperty< RealGradient > & _depsdgrad_op
const MaterialProperty< Real > & _L
Mobility.
const MaterialProperty< Real > & _eps
Interfacial parameter.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

◆ precomputeQpResidual()

RealGradient ACInterfaceKobayashi2::precomputeQpResidual ( )
protectedvirtual

Definition at line 46 of file ACInterfaceKobayashi2.C.

47 {
48  // Set interfacial part of residual
49  return _eps[_qp] * _eps[_qp] * _L[_qp] * _grad_u[_qp];
50 }
const MaterialProperty< Real > & _L
Mobility.
const MaterialProperty< Real > & _eps
Interfacial parameter.

◆ validParams()

InputParameters ACInterfaceKobayashi2::validParams ( )
static

Definition at line 15 of file ACInterfaceKobayashi2.C.

16 {
18  params.addClassDescription("Anisotropic Gradient energy Allen-Cahn Kernel Part 2");
19  params.addParam<MaterialPropertyName>("mob_name", "L", "The mobility used with the kernel");
20  params.addParam<MaterialPropertyName>("eps_name", "eps", "The anisotropic parameter");
21  params.addParam<MaterialPropertyName>(
22  "depsdgrad_op_name",
23  "depsdgrad_op",
24  "The derivative of the anisotropic interface parameter eps with respect to grad_op");
25  return params;
26 }
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
static InputParameters validParams()
void addClassDescription(const std::string &doc_string)

Member Data Documentation

◆ _depsdarg

std::vector<const MaterialProperty<Real> *> ACInterfaceKobayashi2::_depsdarg
protected

Definition at line 44 of file ACInterfaceKobayashi2.h.

Referenced by ACInterfaceKobayashi2(), and computeQpOffDiagJacobian().

◆ _depsdgrad_op

const MaterialProperty<RealGradient>& ACInterfaceKobayashi2::_depsdgrad_op
protected

Definition at line 40 of file ACInterfaceKobayashi2.h.

Referenced by precomputeQpJacobian().

◆ _dLdarg

std::vector<const MaterialProperty<Real> *> ACInterfaceKobayashi2::_dLdarg
protected

Mobility derivative w.r.t. other coupled variables.

Definition at line 43 of file ACInterfaceKobayashi2.h.

Referenced by ACInterfaceKobayashi2(), and computeQpOffDiagJacobian().

◆ _dLdop

const MaterialProperty<Real>& ACInterfaceKobayashi2::_dLdop
protected

Definition at line 36 of file ACInterfaceKobayashi2.h.

◆ _eps

const MaterialProperty<Real>& ACInterfaceKobayashi2::_eps
protected

Interfacial parameter.

Definition at line 39 of file ACInterfaceKobayashi2.h.

Referenced by computeQpOffDiagJacobian(), precomputeQpJacobian(), and precomputeQpResidual().

◆ _L

const MaterialProperty<Real>& ACInterfaceKobayashi2::_L
protected

Mobility.

Definition at line 35 of file ACInterfaceKobayashi2.h.

Referenced by computeQpOffDiagJacobian(), precomputeQpJacobian(), and precomputeQpResidual().


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